GNOME Bugzilla – Bug 340163
libxml2 2.6.24 compile error under gcc 4.1.0 & gcc 3.4.5
Last modified: 2006-06-01 22:19:34 UTC
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.4 -I../include -I../include -I../python -march=athlon-mp -mmmx -mfpmath=sse -msse -m3dnow -pipe -DPIC -fPIC -O3 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -MT libxml2-py.lo -MD -MP -MF .deps/libxml2-py.Tpo -c libxml2-py.c -o libxml2-py.o >/dev/null 2>&1 /bin/sh ../libtool --tag=CC --mode=link gcc -march=athlon-mp -mmmx -mfpmath=sse -msse -m3dnow -pipe -DPIC -fPIC -O3 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -z combreloc -s -o libxml2mod.la -rpath -module -avoid-version -L../.libs libxml.lo types.lo libxml2-py.lo ../libxml2.la libtool: link: only absolute run-paths are allowed make[3]: *** [libxml2mod.la] Error 1 make[3]: Leaving directory `/usr/src/libxml2-2.6.24/python' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/libxml2-2.6.24/python' make[1]: Leaving directory `/usr/src/libxml2-2.6.24' make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
2.6.23 compiles fine with gcc 4.1.0
I compile on Fedora Core 5 with gcc-4.1 , I can't reproduce this, the rpms on xmlsoft.org were built on fedora core 5, the same package compiled on rawhide also with gcc-4.1 . You're doing something triggering this, and I have no idea what... Daniel
The immediate cause of the error message is "-rpath -module", i.e., no path argument being passed for the -rpath flag. The deeper problem ("why not?") is the mystery here...
Not sure as I posted the previous version compiles just fine with the same everything. I will attach the failed compile log and the config.log
Created attachment 64649 [details] bziped text file of compile log with config.log appended to the end
Glanced though the logs, I have no idea what is going on there, all I can say is that it works fine for me doing exactly the same thing... paphio:~ -> rpm -q libtool gcc libtool-1.5.22-2.2 gcc-4.1.0-3 paphio:~ -> Daniel
I have the same failure with compiling the python bindings for libxslt-1.1.16 (see Bug #340592). In attachment #64649 [details] here for libxml2, I see the same pattern in the configure output that appears to indicate the problem for my libxslt: checking for python... /usr/bin/python Found Python version 2.4 ./configure: line 26877: PYTHON_SITE_PACKAGES: command not found so presumably the same bug is affecting you here as me there?
I just tried the new libxslt and yes I am having the same problem with it. So I'll see if the patch fixes it and see if there is a similar fix for libxml2.
Created attachment 64841 [details] [review] this patch fixes my compile problem.
I think changing foo='$(bar)' to foo=$bar changes the functional meaning (foo becomes "what bar is now" instead of being evaluated for bar at a later time. Don't know if it matters for this situation though.
Created attachment 64924 [details] [review] Better patch
Sweet, very nice to discover the patch to fix this problem already existed. In my smoketesting of Gnome 2.15.2, I had to apply Robin's patch from comment 11 (well, the half of it for configure since I'm just building from tarballs) to get libxml2-2.6.24 to build. I'm using gcc-3.4.5 (& libtool-1.5.22 and Python 2.4.3).
Note that the python bindings are installed in $(libdir)/lib/python-2.4/site-packages/ There's a "lib/" that shouldn't be there.
I can reproduce this problem with libxml2-2.6.24, when passing the --with-python flag to configure. To fix it, I ended up using a similar patch to the one in comment #11, only I wrapped the variable in single quotes, which is what I think the author of those autoconf lines meant to write (but of course, I can't know for sure :). That is: diff -NurdB libxml2-2.6.24/configure.in libxml2-2.6.24-patched/configure.in --- libxml2-2.6.24/configure.in 2006-04-28 11:21:20.000000000 -0500 +++ libxml2-2.6.24-patched/configure.in 2006-05-17 18:42:55.000000000 -0500 @@ -701,7 +701,7 @@ fi if test "$with_python" != "" then - pythondir=$(PYTHON_SITE_PACKAGES) + pythondir='$(PYTHON_SITE_PACKAGES)' else pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' fi
Okay, most of this looks outdated w.r.t. the state in CVS. I think CVS has the fixes, and I'm planning a release, but since I never reproduced the problem myself I suggest people who reported problems here fetch the snapshot from ftp://xmlsoft.org/xml/libxml2-cvs-snapshot.tar.gz and tell if thing are really fixed there, thanks in advance, Daniel
The tarball mentioned in comment 15 builds for me without patches. :)
Excellent, so fixed in CVS, thanks for the report ! Daniel