|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-09-19 17:45 UTC] jtaisto at iocenter dot net
Description:
------------
Linker dies when trying to build with xml2 support.
Reproduce code:
---------------
export CC="gcc"
export CXX="gcc"
export CFLAGS="-O2 -m64 -mcpu=ultrasparc -mtune=ultrasparc"
export CXXFLAGS="-O2 -m64 -mcpu=ultrasparc -mtune=ultrasparc"
libxml2 build:./configure --prefix=/u1/xml/libxml2-2.6.13 \
--exec-prefix /u1/xml/libxml2-2.6.13/sparcv9 \
--with-xml2=/u1/xml/libxml2-2.6.13 \
--with-threads
./configure --with-libxml-dir=/u1/xml/libxml2-2.6.13/sparcv9 \
linker (/usr/ccs/bin/ld ) dies on this: configure:18080: gcc -o conftest -O2 -m64 -mcpu=ultrasparc -mtune=ultrasparc -pthreads -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -R/u1/xml/libxml2-2.6.13/sparcv9/lib -L/u1/xml/libxml2-2.6.13/sparcv9/lib conftest.c
-lresolv -lm -ldl -lnsl -lsocket -lgcc -lxml2 -lz -lm -lsocket -lnsl 1>&5
configure: failed program was:
#line 18069 "configure"
#include "confdefs.h"
char xmlInitParser();
int main() {xmlInitParser();return 0;}
Expected result:
----------------
Not to see a fatal ld from the configure script. Configure able to use xml2 library that is most recent stable. I've tried this even with just 32-bit using different version with no avail. Can't seem to get a 64-bit version supporting xml2 on Solaris 9 to work.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
configure exits with this: Configuring extensions checking whether to enable LIBXML support... yes checking libxml2 install dir... /u1/xml/libxml2-2.6.13/sparcv9 checking whether libxml build works... no configure: error: build test failed. Please check the config.log for details. The last lines in the config.log say: configure:17846: checking whether to enable LIBXML support configure:17893: checking libxml2 install dir configure:18053: checking whether libxml build works configure:18080: gcc -o conftest -O2 -m64 -mcpu=ultrasparc -mtune=ultrasparc -pthreads -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -R/u1/xml/libxml2-2.6.13/sparcv9/lib -L/u1/xml/libxml2-2.6.13/sparcv9/lib conftest.c -lresolv -lm -ldl -lnsl -lsocket -lgcc -lxml2 -lz -lm -lsocket -lnsl 1>&5 configure: failed program was: #line 18069 "configure" #include "confdefs.h" char xmlInitParser(); int main() { xmlInitParser(); return 0; }Problem Fixed: At first going through the configure script, the finding was: (around line 18071) LIBS=" $LIBXML_SHARED_LIBADD $LIBS" Which we thought could have been the issue, (returns/spaces) but we knew better that it shouldn't matter. We changed it to: LIBS="$LIBXML_SHARED_LIBADD $LIBS" And of course we still got the error. After coping out the small source and running the gcc (found in the config.log) it compiled fine, but wasn't finding the correct library. We added /usr/local/lib/sparcv9 to the LD_LIBRARY_PATH and the configure ran fine. I am not sure why the CFLAGS or LDFLAGS were not picked up properly for only this instance. (-m64 and -mcpu=v9 should automatically source the sparcv9 libs) But reguardless of that, it works and it's time to move on. Good luck. Robafter a bit of hacking in configure changing the line with testcompiling for this issue to if { (eval echo configure:18092: \"$ac_link\") 1>5; (eval $ac_link) 2>6; } ... i found out, the link-error occuring was "cannot find -lz" prob was solved after i installed zlib-devel packages hope that helps Stephan