logo       

How is relinking with DESTDIR != installdir in newish libtool?: msg#00092

gnu.libtool.general

Subject: How is relinking with DESTDIR != installdir in newish libtool?

With libtool-1.4.2, I was using a patch (see below) that introduced DESTDIR that fixed the problems with relinking that happened when building RPMS. The problem was that when libraries were temporarily installed to /tmp/buildroot/usr/lib the re-linker would look in the final destination /usr/lib and fail.

Has this problem been solved in the newer libtool such as 1.4.3 or 1.5? How? I just looked at ltmain.sh from 1.4.3 and there is no DESTDIR.


The patch that worked for me was written by Bruno Haible and I found it here:
http://mail.gnu.org/pipermail/bug-libtool/2002-February/003019.html
That web link appears dead now, but this is a diff I made showing what it did:

RCS file: /cvsroot/swarm/swarm/ltmain.sh,v
retrieving revision 1.16
diff -r1.16 ltmain.sh
1887c1887,1891
< add_dir="-L$libdir"
---
> if test "X$installed" = Xyes; then
> add_dir="-L$libdir"
> else
> add_dir="-L$DESTDIR$libdir"
> fi
4143a4148
> DESTDIR=
4149a4155,4162
> case "$destdir" in
> *"$libdir")
> DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
> if test "X$destdir" != "X$DESTDIR$libdir"; then
> DESTDIR=
> fi
> ;;
> esac
4162a4176
> export DESTDIR
4169a4184
> unset DESTDIR


--
Paul E. Johnson email: pauljohn@xxxxxxxxx
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise