[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems using libtool



>> Dale Scheetz <dwarf@polaris.net> writes:

 > Why is libtool trying to install the .so file when I only asked for the
 > .la file to be installed? (This is probably down in those internals ;-)

 Because the .la file represents the library (static *and* dynamic) from
 libtool's point of view.  If you use the convinience library to
 generate an static executable, libtool will do the right thing.  Same
 goes for dynamic linked binaries (modulo -rpath -- which you have to
 work arround of, depending on libtool's version, *IIRC*).  You can tell
 libtool to generate only a static library if that's what you really
 want.  I'm not sure if you can tell it to generate only a dynamic
 library, but I don't think so.  Look at (libtool.info)Static Libraries,
 and (libtool.info)Linking Libraries.

 > It appears that if I specify ./libgmp.la in the install line,
 > ./.lib/libgmp.so.3.1.1 will be "installed" which is not desired

 Why, exactly?  I see both libgmp3 and libgmp3-dev on the archive.  You
 can compile both versions of the library on one pass.  You just have to
 sort out the files afterwards (i.e., move the .la, .a and .so files to
 the -dev package, or move the .so.x and .so.x.y.z files to the non -dev
 package).  As long as upstream doesn't discover (and starts using) the
 -release option, nothing has gotten much different than before.

 The one thing I discovered recently is that some versions of libtool
 don't process .la files recursively.  That is:

 $ libtool --mode=link gcc -o foo -lbar

 will fail if libbar.la exists and happens to list a libbaz for which
 there's a libbaz.la file on the system.  But this doesn't have anything
 to do with your question :-\

-- 
Marcelo



Reply to: