[[ I tried posting this to the libtool mailing list last week but no responses there... I wonder if anyone here has any ideas? ]] I have a situation where I'm constructing a filesystem image, and I need to use the contents of that image to build new packages to be installed in the image. For example, I have $ROOT, which might be something like /usr/local/images or whatever. Under $ROOT will be a complete image of a working filesystem, so I'll have $ROOT/etc, $ROOT/usr/bin, $ROOT/var, etc. etc. The thing about this image is that I will be taking it and actually booting off of it: at _runtime_ the paths will be /usr/lib, not $ROOT/usr/lib. In other words, when I'm building packages to be placed into that image, I need to link with libraries in $ROOT/usr/lib (for example), but at runtime those libraries will be at /usr/lib. I have this all working very well for many packages, but now I'm trying to get a package set up that uses glib, and glib was installed with libtool. I can't figure out how to make this work in this situation. The problem is when libtool is invoked by my package (Ethereal in this case) it looks like this: /bin/sh ../../libtool --mode=link powerpc-unknown-linux-gnu-3.2.3-gcc -D_U_="__attribute__((unused))" -Wall -W -I/usr/local/images/usr/include/glib-1.2 -I/usr/local/images/usr/lib/glib/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -L/usr/local/images/usr/lib -lglib -L/usr/local/lib -L/usr/local/lib -o lemon lemon.o -lz Note how the first -L has the proper pathname, to my $ROOT/usr/lib. Now, libtool actually invokes this command: mkdir .libs powerpc-unknown-linux-gnu-3.2.3-gcc "-D_U_=__attribute__((unused))" -Wall -W -I/usr/local/images/usr/include/glib-1.2 -I/usr/local/images/usr/lib/glib/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -o lemon lemon.o -L/usr/local/images/usr/lib /usr/lib/libglib.so -L/usr/local/lib -lz /usr/lib/libglib.so: could not read symbols: Invalid operation Note how the path to glib can been changed from -lglib, to "/usr/lib/libglib.so", ignoring my -L setting. And of course, this is the wrong one so it fails. I've never developed with libtool before: I read the libtool manual but I'm not sure what's going on here: somehow libtool is coming up with "/usr/lib" instead of my $ROOT/usr/lib. Where is that coming from, and how do I override it? And, does anyone have any suggestions for working with libtool in an environment such as I describe above? Thanks! -- ------------------------------------------------------------------------------- Paul D. Smith <psmith@xxxxxxxxxxxxxxxxxx> HASMAT--HA Software Mthds & Tools "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ------------------------------------------------------------------------------- These are my opinions---Nortel Networks takes no responsibility for them.