Can I stop linking the same library twice?
Dr. David Kirkby
david.kirkby@onetel.net
Mon Dec 14 02:37:00 GMT 2009
Philipp Thomas wrote:
> On Sat, 12 Dec 2009 11:08:11 +0000, you wrote:
>
>> where problems arise if a library included in Sage is installed on the system
>> too.
>
> Of cause they do! It's simply wrong to use and install libraries that
> the system already supplies. A sane software package detects the
> libraries installed in the system and only compiles/installs those
> that are missing. If distributed in compiled form, the only sane way
> is to statically link in the libraries to avoid clashes with system
> supplied ones.
What could you do if the system supplies a library, but it's not the latest
release, and you need the latest?
>> Is there a way to specify that only the first copy of the library is linked, and
>> not any other copies gcc might find? Readline is not the only library where
>> issues have arisen (OpenSSL libraries on OpenSolaris is another example).
>
> AFAIK there is no way.
>
> Philipp
>
More information about the Gcc-help
mailing list