GNOME Bugzilla – Bug 599396
libxslt-1.1.26 fails to compile on Solaris/GCC/GNU ld due to wrong linkmap
Last modified: 2021-07-05 10:59:38 UTC
compilation simply dies like this: ... gentoo/prefix64/usr/lib/libiconv.so -lsocket -lnsl -lm -lc -march=athlon64 -Wl,-M -Wl,./libxslt.syms -Wl,-soname -Wl,libxslt.so.1 -o .libs/libxslt.so.1.1.26 ./libxslt.syms: file not recognized: File format not recognized collect2: ld returned 1 exit status make[2]: *** [libxslt.la] Error 1 reason is that the libxslt.syms file seems to be a GNU linkmap or something, and not the linkmap that the Sun linker expects. In this case, however I'm using GNU ld, but the configure script didn't detect this properly: @@ -128,9 +128,9 @@ dnl then add it dnl VERSION_SCRIPT_FLAGS= -$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ +$(ld --help 2>&1 | grep -- --version-script >/dev/null) && \ VERSION_SCRIPT_FLAGS=-Wl,--version-script= -test "`uname`" == "SunOS" && \ +test -z "$VERSION_SCRIPT_FLAGS" && test "`uname`" == "SunOS" && \ VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," AC_SUBST(VERSION_SCRIPT_FLAGS) AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"]) this, however it makes libxslt compile fine because it now uses the GNU --version-script option to which the map corresponds, is still wrong, since the check should check which linker the compiler is using. Configure already checks that ("checking whether the linker used by the compiler is GNU ...") so I guess it leaves around a variable for that. I haven't investigated if there is conditional code somewhere that generates the linkmap, and if this code can build a Sun-style linkmap. If it doesn't then most probably this will make it fail to compile when using the Sun ld. If that's not the case, then GNU ld's -M implementation simply is broken, but detecting properly if GNU ld is used by the compiler would solve that again, as described above. % gcc -v Using built-in specs. Target: x86_64-pc-solaris2.11 Configured with: /net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/var/tmp/portage/sys-devel/gcc-4.4.2/work/gcc-4.4.2/configure --prefix=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr --bindir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/x86_64-pc-solaris2.11/gcc-bin/4.4.2 --includedir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/lib/gcc/x86_64-pc-solaris2.11/4.4.2/include --datadir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/share/gcc-data/x86_64-pc-solaris2.11/4.4.2 --mandir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/share/gcc-data/x86_64-pc-solaris2.11/4.4.2/man --infodir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/share/gcc-data/x86_64-pc-solaris2.11/4.4.2/info --with-gxx-include-dir=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr/lib/gcc/x86_64-pc-solaris2.11/4.4.2/include/g++-v4 --host=x86_64-pc-solaris2.11 --build=x86_64-pc-solaris2.11 --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --disable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-solaris2.11/4.4.2/python --enable-objc-gc --enable-languages=c,c++,java,objc,obj-c++,fortran --enable-shared --enable-threads=posix --with-local-prefix=/net/pegasus.ins.cwi.nl/export/scratch/stripe/fabian/gentoo/prefix64/usr --enable-__cxa_atexit --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.2 p1.0' --with-gnu-ld --with-gnu-as Thread model: posix gcc version 4.4.2 (Gentoo 4.4.2 p1.0) % ld -v GNU ld (Linux/GNU Binutils) 2.20.51.0.2.20091009
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxslt/-/issues/ Thank you for your understanding and your help.