php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1159 Compile failure on link
Submitted: 1999-02-18 06:38 UTC Modified: 1999-02-27 09:40 UTC
From: orj at ihug dot co dot nz Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0.6 OS: Linux 2.0.35 (Redhat 5.2), Apach
Private report: No CVE-ID: None
 [1999-02-18 06:38 UTC] orj at ihug dot co dot nz
LDFLAGS=-s \
./configure --with-system-regex --with-apxs=/usr/sbin/apxs --prefix=/usr --with-gd \
--with-mysql=/usr --with-zlib --with-dbase --with-filepro --with-config-file-path=/etc/httpd/conf \
--disable-debug --enable-url-includes --enable-magic-quotes --enable-debugger --enable-bcmath \
--enable-track-vars  --enable-sysvsem --enable-sysvshm

make

Fixed with this diff:
----8<--------8<--------8<--------8<----

--- configure.orig      Fri Feb 19 00:31:51 1999
+++ configure   Fri Feb 19 00:22:22 1999
@@ -3766,7 +3766,7 @@
         withval=apxs
     fi
     APXS="$withval"
-    APXS_LDFLAGS="@DBASE_LIB@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MYSQL_LFLAGS@ @MYSQL_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @EMPRESS_LIBS@ @OPENLINK_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @CODBC_LFLAGS@ @CODBC_LIBS@ @ZLIB_LIBS@ @PDFLIB_LIBS@ @FDFTK_LIBS@ @IFX_LFLAGS@ @IFX_LIBS@ @IBASE_LFLAGS@ @IBASE_LIBS@"
+    APXS_LDFLAGS="@MYSQL_LFLAGS@ @MYSQL_LIBS@ @DBASE_LIB@ @ORACLE_LFLAGS@ @ORACLE_LIBS@ @IODBC_LFLAGS@ @IODBC_LIBS@ @SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@ @MSQL_LFLAGS@ @MSQL_LIBS@ @ADA_LFLAGS@ @ADA_LIBS@ @SOLID_LIBS@ @EMPRESS_LIBS@ @OPENLINK_LIBS@ @PGSQL_LFLAGS@ @PGSQL_LIBS@ @LDAP_LFLAGS@ @LDAP_LIBS@ @VELOCIS_LIBS@ @CODBC_LFLAGS@ @CODBC_LIBS@ @ZLIB_LIBS@ @PDFLIB_LIBS@ @FDFLIB_LIBS@ @IFX_LFLAGS@ @IFX_LIBS@ @IBASE_LFLAGS@ @IBASE_LIBS@"
     APACHE_INCLUDE="-I`$APXS -q INCLUDEDIR`"
     BINNAME=libphp3.so
     INSTALL_IT="\$(APXS) -i -a -n php3 $BINNAME"

----8<--------8<--------8<--------8<----

The offending line in the make file is this:

APXS_LDFLAGS = dbase/libdbf.a '-Wl,-rpath /usr/lib/mysql' -L/usr/lib/mysql -lmysqlclient -lz  @FDFTK_LIBS@

I'm compiling this against Apache 1.3.4 and apxs expects all -Wl options BEFORE the file to link against.  And of course there is also a sed problem in the configure script because @FDFTK_LIBS@ hasn't been removed.  That is because everywhere else in the configure script it is called @FDFLIB_LIBS@.  Kinda stupid bug eh. Me thinks that you should move all of @*_LFAGS@ macros to the beginning of APXS_LDFLAGS.  The patch above doesn't do this.  It just solves the problem for MySQL.

Later

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-27 09:40 UTC] sas
There were a whole number of problems related to APXS in Apache 1.3.4/PHP 3.0.6. The  next release of PHP will address these problems (it has been fixed in CVS for some time).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 10:01:32 2024 UTC