GNOME Bugzilla – Bug 336709
DESTDIR not applied for libexslt during make install
Last modified: 2021-07-05 11:00:44 UTC
When compiling libxslt 1.1.15 (which includes libexslt), 'make DESTDIR=$RPM_BUILD_ROOT install' fails during the 'make install' in the directory libexslt, as it tries to locate libxslt.a using its full (final) path -- /usr/local/lib/libxslt.a as the prefix was set to /usr/local during configuration -- instead of $RPM_BUILD_ROOT/usr/local/lib/libxslt.a.
The error message during RPM's execution of 'make DESTDIR=$RPM_BUILD_ROOT install' is: ---8<--- /../ Target "install-data-am" is up to date. Target "install" is up to date. Making install in libexslt test -z "/usr/local/lib" || /bin/sh ../mkinstalldirs "/var/opt/freeware/tmp/build-root-libxslt-1.1.15/usr/local/lib" /bin/sh ../libtool --mode=install /opt/freeware/bin/install -c 'libexslt.la' '/var/opt/freeware/tmp/build-root-libxslt-1.1.15/usr/local/lib/libexslt.la' libtool: install: warning: relinking `libexslt.la' (cd /home/bwiberg/rpm/BUILD/libxslt-1.1.15/libexslt; /bin/sh ../libtool --tag=CC --mode=relink gcc -g -O2 -Wall -o libexslt.la -rpath /usr/local/lib -version-info 8:12:8 exslt.lo common.lo crypto.lo math.lo sets. lo functions.lo strings.lo date.lo saxon.lo dynamic.lo ../libxslt/libxslt.la -L/usr/local/lib -lxml2 -lz -lpthread -liconv -lm -lm -inst-prefix-dir /var/opt/freeware/tmp/build-root-libxslt-1.1.15) generating symbol list for `libexslt.la' /usr/bin/nm -B -BCpg .libs/exslt.o .libs/common.o .libs/crypto.o .libs/math.o .libs/sets.o .libs/functions.o .libs/strings.o .libs/date.o .libs/saxon.o .libs/dynamic.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort -u > .libs/libexslt.exp gcc -shared -o .libs/libexslt.so.0 .libs/exslt.o .libs/common.o .libs/crypto.o .libs/math.o .libs/sets.o .libs/functions.o .libs/strings.o .libs/date.o .libs/saxon.o .libs/dynamic.o -Wl,-blibpath:/usr/local/lib: /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2:/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0/3.3.2/../../..:/usr/lib:/lib -L/usr/local/lib /usr/local/lib/libxslt.a /usr/local/lib/libxml2.a -lz -lpthread -liconv -lm -lc -Wl,-bE:.libs/libexslt.exp -Wl,-bnoentry ${wl}-berok gcc: /usr/local/lib/libxslt.a: No such file or directory libtool: install: error: relink `libexslt.la' with the above command before installing it make: The error code from the last command is 1. Stop. make: The error code from the last command is 2. Stop. make: The error code from the last command is 1. Stop. Dålig slutstatus från /var/opt/freeware/tmp/rpm-tmp.22702 (%install) --->8--- Notice the "-L/usr/local/lib /usr/local/lib/libxslt.a" part.
Created attachment 62441 [details] Spec file for my RPM compilation of libxslt 1.1.15
Created attachment 62442 [details] [review] libxslt 1.1.15 date patch for IBM AIX This patch has been entered into the bug system by me, earlier on.
The patch doesn't look very clean, but safe. On the other hand it seems completely related to the bug as defined, i.e. not related to DESTDIR, nor to make install... W.r.t. the spec file, there is nothing I can do with it. Libxslt ships with a spec file already, so suggest a patch to it if that's where the problem lies, but I doubt it, the core of the issue for this bug is related to making sure libexslt/Makefile.am properly handles DESTDIR. If you expect me to retry your build on AIX, send me first an AIX machine, I don't have that around... Daniel
Hello Daniel! The patch is not the cause of or the solution to the bug, as you probably figured out already. :-) I only submitted the .patch file as it was mentioned in the spec file. If you have the possibility -- probably on just about any OS -- to try the following, that would be very kind of you: cd /usr/local/src/libxslt-1.1.15 ./configure --disable-static --prefix=/usr/local --without-python ...and then: make mkdir /anotherdir make DESTDIR=/anotherdir install ...to see if you get any error messages during the libexslt install part. Many thanks in advance! Best regards, Björn
The problem appears to be with the generated libtool(s), on AIX. Can be fixed by adding the following to the %build section, after ./configure: # Ask libtool not to hardcode library paths into libraries %{__perl} -i.bak -pe 's/^hardcode_into_libs=yes$/hardcode_into_libs=no/' libtool %{__perl} -i.bak -pe 's/^hardcode_into_libs=yes$/hardcode_into_libs=no/' libltdl/libtool Might be needed for Drivers/MySQL/libtool as well if compiling drivers (I do not). Best regards, Björn
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.