[Top][All Lists]

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

libtool adds an annoying -L/usr/lib in link command

From: christian caremoli
Subject: libtool adds an annoying -L/usr/lib in link command
Date: Wed, 9 Jun 2010 14:27:35 +0200

Hello Gary

I resend my question from gmail.

Most likely your has -L/usr/libs in its dependency_libs entry.  You can fix that by editing the file to pass the library name by its full path, or by adjusting the install process of libhdf not to record -L/usr/libs there.

dependency_libs in does not contain -L/usr/lib. I have already checked that.
dependency_libs=' -lpthread -lz -lm'


I link 3 libraries with libtool. The first one is linked with hdf lib that is in system (/usr/lib), the
second one is linked with vtk lib that is not in system ($VTKHOME) and the third one is linked
with the 2 previous libs.

The problem is that there is another vtlk lib in system (/usr/lib) and libtool adds an -L/usr/lib when adding
hdf dependency so my third lib is linked with the two vtk libs (in system and in VTKHOME).

I have not found a way to handle this situation. What would be  the right way ?

Here is a simplified script of my link:

cd src/p1
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o -rpath /local/cchris/pkg/libtool/test22/myinstall/lib hello.lo -lhdf5

cd ../p2
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o -rpath /local/cchris/pkg/libtool/test22/myinstall/lib prog.lo -L/local/cchris/pkg/vtk/install/lib/vtk-5.6 -lvtkCommon

cd ../p3
/bin/sh ../../libtool --tag=CXX --mode=link g++ -o -rpath /local/cchris/pkg/libtool/test22/myinstall/lib viewer.lo ../p1/ ../p2/

Christian Caremoli

reply via email to

[Prev in Thread] Current Thread [Next in Thread]