Bug 182927 - LDFLAGS missing in databases/php53-sqlite3
LDFLAGS missing in databases/php53-sqlite3
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Any Any
: Normal Affects Only Me
Assigned To: Florian Smeets
Depends on:
  Show dependency treegraph
Reported: 2013-10-12 16:30 UTC by birger.schacht
Modified: 2015-06-07 21:05 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description birger.schacht 2013-10-12 16:30:00 UTC
The configure script of php53-sqlite3 is figuring out options by compiling c  snipplets and testing for options of the sqlite library. For example:

(from work/php-5.3.27/ext/sqlite3/config.log:)

configure:4663: checking for sqlite3_load_extension in -lsqlite3
configure:4688: cc -o conftest -O2 -pipe -fno-strict-aliasing   conftest.c -lsqlite3   >&5
/usr/bin/ld: cannot find -lsqlite3
configure:4688: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""  
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char sqlite3_load_extension ();
| int
| main ()
| {
| return sqlite3_load_extension ();
|   ;
|   return 0;
| }
configure:4697: result: no

The result of these tests is always negative, because the sqlite3 shared library isn't found (which is installed)


LDFLAGS+=       -L${LOCALBASE}/lib
to the lang/php53/Makefile.ext in the sqlite3 block:

.if ${PHP_MODNAME} == "sqlite3"
USE_SQLITE=     yes
LDFLAGS+=       -L${LOCALBASE}/lib

so the c snipplets can be compiled and deliver the correct options:

configure:4663: checking for sqlite3_load_extension in -lsqlite3
configure:4688: cc -o conftest -O2 -pipe -fno-strict-aliasing   -L/usr/local/lib conftest.c -lsqlite3   >&5
configure:4688: $? = 0
configure:4697: result: yes
How-To-Repeat: compile php53-sqlite3
Comment 1 Edwin Groothuis freebsd_committer 2013-10-12 16:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flo

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2013-11-02 00:56:31 UTC
Author: flo
Date: Sat Nov  2 00:56:23 2013
New Revision: 332437
URL: http://svnweb.freebsd.org/changeset/ports/332437

  Add LDFLAGS to the sqlite3 section, otherwise configure cannot properly
  detect whether sqlite3 was built with sqlite3_load_extension or not.
  PR:		ports/182927
  Submitted by:	Birger Schacht <birger.schacht@tuwien.ac.at>


Modified: head/lang/php53/Makefile.ext
--- head/lang/php53/Makefile.ext	Sat Nov  2 00:51:49 2013	(r332436)
+++ head/lang/php53/Makefile.ext	Sat Nov  2 00:56:23 2013	(r332437)
@@ -372,6 +372,7 @@ UTF8_DESC=	UTF-8 support
 .if ${PHP_MODNAME} == "sqlite3"
 .if ${PHP_MODNAME} == "sybase_ct"
svn-ports-all@freebsd.org mailing list
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Florian Smeets freebsd_committer 2013-11-02 00:56:47 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 birger.schacht 2014-10-03 08:58:39 UTC

this problem also exists in php5.4, php5.5 and php5.6.
the LDFLAGS should be added in any of these Makefile.exts in the sqlite3 block.

Comment 5 Florian Smeets freebsd_committer 2015-06-07 21:05:42 UTC
php53 is no more...