On Sat, 2009-02-14 at 21:21 +0100, Ralf Wildenhues wrote: > Hi Dennis, > > * Dennis van Dok wrote on Fri, Feb 13, 2009 at 12:46:49PM CET: > > I'm breaking my head over a problem that others must also have found, > > chewed on and spit out. I found plenty of messages related to my > > problem, such as the chroot discussion, but I just can't find the > > definitive answer anywhere. > > Libtool has a problem with this. > > I know how to work around this in some of the cases, using -rpath-link), > and/or messing around with the staged .la files. > > I have no idea how to fix this issue in libtool in a more or less > general way, for anything but the GNU binutils linkers and maybe the > Solaris linker (haven't checked). That this isn't fixed for binutils > yet, has practical reasons, for which there is at least a tiny chance > of becoming less of a problem in the near future. That said, even for > binutils I am not yet sure we can fix the general case fully > deterministically. > > > What I'm doing is building a collection of software, comprised of shared > > libraries and programs, in a way that all of this can be packaged later > > (as RPMs, or debs, or whatever). All of it is staged by using > > DESTDIR=/someplace during 'make install'. > > > > This is OK for a single library; it is even OK for a program using a > > library; but I run into a wall when it involves a program using a > > library that uses another library. > > ACK. > > The libtool/tests/destdir.at file shows what currently works, and on > which systems it works. If you provide a further example that should > work, then we can base that for tests when we do fix things. > > Hope that helps. > > Cheers, > Ralf >
I run into the problem in a similar situation, which is: cross-compiling and deploying a full embedded Linux distro to a customizable directory on the BUILD system, so that it can be built and then archived using mksquashfs, but it expects to be installed to "/" on the host. Since I have a Makefile to automate the configuring/building/installing of all of the packages, I have the install stage install into a sandbox directory, then I have it run a script that executes some sed magic on the ${sandbox}/lib/*.la and ${sandbox}/lib/pkgconfig/*.pc files, and all the other .la files in subdirectories of ${sandbox}/lib/, to properly replace the "-L/lib/?" (regex) paths with -L${sandbox}/lib path, as well as to force the prefix=${sandbox} in the .pc files. The install target subsequently follows up with an: lockf /tmp/${lockfile} rsync -a ${sandbox}/ ${deployment_dir}/ To perform the actual placement of the installed files safely in the shared deployment directory, which would be used for building the package. Both the .la files and the .pc files are only of use on the BUILD system. On the host, they won't be needed unless you plan on building more stuff, native, on the host platform. -- Coleman Kane _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool