Problems with compiling and linking

From: Date: Thu, 26 Oct 2000 09:12:50 +0000
Subject: Problems with compiling and linking
Groups: php.install 
Request: Send a blank email to php-install+get-488@lists.php.net to get a copy of this message
Hi everybody, I'm trying to compile a php4 DSO module on SuSE 7.0 (intel) with InterBase support and I'm running into a lot of problems. My intention was to compile php with all the options SuSE did and just add the '--with-interbase' to the configure script. I had to leave 3 or 4 configuration options like --with-gettext to get configure running without errors but that doesn't matter. First of all I even can't compile the MySQL module if I use all the other '--with-???' options that I want to use. Here is my debug.log: ------------------------------------------------------------------------------- CONFIGURE: './configure' '--with-gd=/usr' '--with-xpm-dir=/usr/X11R6' '--with-mysql=yes' '--with-pgsql=/usr' '--with-interbase=/opt/interbase' '--with-tiff-dir' '--with-jpeg-dir' '--with-png-dir' '--with-ldap=yes' '--with-imap=yes' '--with-xml' '--with-ttf' '--with-ftp' '--with-db3' '--with-dbm' '--with-ndbm' '--with-gdbm' '--with-snmp' '--with-mm' '--with-config-file-path=/etc/httpd' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/lib/apache/bin' '--enable-versioning' '--enable-yp' '--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--enable-memory-limit' '--enable-wddx' '--with-readline' '--with-openssl' CC: gcc CFLAGS: -g -O2 CPPFLAGS: -DEAPI CXX: CXXFLAGS: INCLUDES: -I/usr/include/apache -I$(top_builddir)/Zend -I$(top_srcdir) -I/usr/include/freetype -I/usr/include/gd -I/usr/include/imap -I/opt/interbase/include -I/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql -I/usr/include/ucd-snmp LDFLAGS: -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/opt/interbase/lib -L/opt/interbase/lib -Wl,-rpath,/usr/lib/pgsql -L/usr/lib/pgsql LIBS: -lsnmp -lmm -lreadline -lhistory -lpq -lldap -llber -lgds -lttf -lX11 -lXpm -ljpeg -lgd -l -l -lgdbm -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/local/lib -ljpeg -L/usr/X11R6/lib -lXpm -lX11 DLIBS: -lc-client SAPI: apache PHP_RPATHS: /usr/local/lib /usr/X11R6/lib /opt/interbase/lib /usr/lib/pgsql uname -a: Linux bmag 2.2.16-SMP #1 SMP Wed Aug 2 20:01:21 GMT 2000 i686 unknown gcc -o conftest -g -O2 -DEAPI -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/opt/interbase/lib -L/opt/interbase/lib -Wl,-rpath,/usr/lib/pgsql -L/usr/lib/pgsql conftest.c -lsnmp -lmm -lreadline -lhistory -lpq -lldap -llber -lgds -lttf -lX11 -lXpm -ljpeg -lgd -l -l -lgdbm -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/local/lib -ljpeg -L/usr/X11R6/lib -lXpm -lX11 1>&5 /usr/i486-suse-linux/bin/ld: cannot find -l-l collect2: ld returned 1 exit status ------------------------------------------------------------------------------- When I do the make the following error message arises: ------------------------------------------------------------------------------- make[4]: Entering directory `/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql' /bin/sh /usr/local/src/php-4.0.3pl1/libtool --silent --mode=compile gcc -I. -I/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql -I/usr/local/src/php-4.0.3pl1 -I/usr/local/src/php-4.0.3pl1/main -I/usr/include/apache -I/usr/local/src/php-4.0.3pl1/Zend -I/usr/local/src/php-4.0.3pl1 -I/usr/include/freetype -I/usr/include/gd -I/usr/include/imap -I/opt/interbase/include -I/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql -I/usr/include/ucd-snmp -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmltok -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmlparse -I/usr/local/src/php-4.0.3pl1/TSRM -DEAPI -DXML_BYTE_ORDER=12 -g -O2 -c libmysql.c In file included from libmysql.c:11: global.h:194: warning: redefinition of `uint' /usr/include/sys/types.h:132: warning: `uint' previously declared here global.h:195: warning: redefinition of `ushort' /usr/include/sys/types.h:131: warning: `ushort' previously declared here In file included from libmysql.c:14: m_string.h:165: parse error before `__extension__' m_string.h:165: parse error before `&&' make[4]: *** [libmysql.lo] Error 1 make[4]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext/mysql' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/php-4.0.3pl1/ext' make: *** [all-recursive] Error 1 ------------------------------------------------------------------------------- I also can't compile MySQL if I just leave away the '--with-interbase'. So it's not a special '--with-interbase' problem (this was my first idea because interbase support is new in php4). I was able to compile and link php4 if the only option for configure was --with-mysql. If I do a 'make clean' (not a make distclean) after that and run a configure with all the options I really want everything compiles fine (even the mysql stuff) but I get a linker error: ------------------------------------------------------------------------------- /bin/sh /usr/local/src/php-4.0.3pl1/libtool --silent --mode=link gcc -I. -I/usr/local/src/php-4.0.3pl1/ -I/usr/local/src/php-4.0.3pl1 -I/usr/local/src/php-4.0.3pl1/main -I/usr/include/apache -I/usr/local/src/php-4.0.3pl1/Zend -I/usr/local/src/php-4.0.3pl1 -I/usr/include/freetype -I/usr/include/gd -I/usr/include/imap -I/opt/interbase/include -I/usr/local/src/php-4.0.3pl1/ext/mysql/libmysql -I/usr/include/ucd-snmp -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmltok -I/usr/local/src/php-4.0.3pl1/ext/xml/expat/xmlparse -I/usr/local/src/php-4.0.3pl1/TSRM -DEAPI -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath /usr/local/src/php-4.0.3pl1/libs -export-symbols /usr/local/src/php-4.0.3pl1/sapi/apache/php.sym -avoid-version -L/opt/interbase/lib -L/usr/lib/pgsql -R /opt/interbase/lib -R /usr/lib/pgsql stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/calendar/libcalendar.la ext/dba/libdba.la ext/gd/libgd.la ext/imap/libimap.la ext/interbase/libinterbase.la ext/ldap/libldap.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pgsql/libpgsql.la ext/posix/libposix.la ext/readline/libreadline.la ext/session/libsession.la ext/snmp/libsnmp.la ext/standard/libstandard.la ext/sysvsem/libsysvsem.la ext/sysvshm/libsysvshm.la ext/wddx/libwddx.la ext/xml/libxml.la ext/yp/libyp.la TSRM/libtsrm.la -lpam -lc-client -ldl -lsnmp -lmm -lreadline -lhistory -lpq -lldap -llber -lgds -lttf -lpng -lz -lgd -l -l -lgdbm -lresolv -lm -ldl -lcrypt -lnsl -lresolv /usr/i486-suse-linux/bin/ld: cannot find -l-l collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/usr/local/src/php-4.0.3pl1' make: *** [all-recursive] Error 1 ------------------------------------------------------------------------------- Well this is not surprising because in the command line there is a '-l -l' inside which does not make much sense. But even if I try to execute this command by hand without the '-l -l' part I get the same error message: ------------------------------------------------------------------------------- /usr/i486-suse-linux/bin/ld: cannot find -l-l collect2: ld returned 1 exit status ------------------------------------------------------------------------------- So what can I do? Any help would be greatly appreciated. Servus, Andreas Gaßner

« previous php.install (#488) next »