libtool
[Top][All Lists]
Advanced

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

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


From: Gary V. Vaughan
Subject: Re: libtool adds an annoying -L/usr/lib in link command
Date: Wed, 9 Jun 2010 15:08:42 +0700

Salut Christian,

On 9 Jun 2010, at 14:41, Christian CAREMOLI wrote:
> Hello, 
> 
> 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 libhello.la -rpath 
> /local/cchris/pkg/libtool/test22/myinstall/lib hello.lo -lhdf5 
> 
> cd ../p2 
> /bin/sh ../../libtool --tag=CXX --mode=link g++ -o libprog.la -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 libviewer.la -rpath 
> /local/cchris/pkg/libtool/test22/myinstall/lib viewer.lo ../p1/libhello.la 
> ../p2/libprog.la

Most likely your libhdf.la has -L/usr/libs in its dependency_libs entry.  You 
can fix that by editing the libhdf.la 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.

> This message and any attachments (the 'Message') are intended solely for the 
> addressees. The information contained in this Message is confidential. Any 
> use of information contained in this Message not in accord with its purpose, 
> any dissemination or disclosure, either whole or partial, is prohibited 
> except formal approval.
> 
> If you are not the addressee, you may not copy, forward, disclose or use any 
> part of it. If you have received this message in error, please delete it and 
> all copies from your system and notify the sender immediately by return 
> message.
> 
> E-mail communication cannot be guaranteed to be timely secure, error or 
> virus-free.

I hope you don't mind that I read this email that you didn't address to me, and 
then replied to it on a public mailing list ;)  But then you already violated 
the supposed confidentiality of the message by displaying it in public, and 
allowing it to be archived forever by the GNU list archive and various mirrors.

But seriously, it is pointless and counterproductive to put such disclaimers on 
email that you distribute via a public list.  Please don't do that.  If your 
company's mail gateway appends that text, you should simply send your public 
postings through a gmail SMTP server or similar.

Cheers,
-- 
Gary V. Vaughan (address@hidden)        


reply via email to

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