ports/182927: LDFLAGS missing in databases/php53-sqlite3
Birger Schacht
birger.schacht at tuwien.ac.at
Sat Oct 12 15:30:00 UTC 2013
>Number: 182927
>Category: ports
>Synopsis: LDFLAGS missing in databases/php53-sqlite3
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 12 15:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Birger Schacht
>Release: FreeBSD 9.2-RELEASE
>Organization:
TU Wien
>Environment:
FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root at bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
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_BUGREPORT ""
| #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)
>How-To-Repeat:
compile php53-sqlite3
>Fix:
add
LDFLAGS+= -L${LOCALBASE}/lib
to the lang/php53/Makefile.ext in the sqlite3 block:
.if ${PHP_MODNAME} == "sqlite3"
USE_SQLITE= yes
CONFIGURE_ARGS+=--with-sqlite3=${LOCALBASE}
LDFLAGS+= -L${LOCALBASE}/lib
.endif
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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list