Re: [EXTERNAL] Re: LD_LIBRARY_PATH in wrapper scripts

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
On Sat, 21 Aug 2021, Oleg Smolsky wrote:
>>
>> So, if libtool does not believe that /usr/lib/x86_64-linux-gnu is in
>> the default search path, it adds it.
>>
> Right, and my compiler is in /opt/gcc-11/ and so that addition to
> LD_LIBRARY_PATH is wrong. The system's compiler is older than what we use
> and the forced (older )version of libstdc++ breaks the executable.

You should talk to the person who built and installed this compiler. 
I recollect that it was you. :-)

Does

   gcc -print-search-dirs

produce correct/useful output for your compiler?

If the system's 'ldconfig' is not aware of your compiler's library 
installation, then the system will search the normal places for the 
libraries unless you add an -rpath option to the build.

Of course if ldconfig is aware of your compiler's library installation 
then that causes problems if you are using multiple compilers.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.