public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dr. David Kirkby" <david.kirkby@onetel.net>
To: gcc-help@gcc.gnu.org
Subject: Can I stop linking the same library twice?
Date: Sun, 13 Dec 2009 19:38:00 -0000	[thread overview]
Message-ID: <4B23799B.3040101@onetel.net> (raw)

I have seen issues in the Sage mathematics software

http://www.sagemath.org/

where problems arise if a library included in Sage is installed on the system 
too. Sage included the source for all the libraries it needs (e.g. readline), in 
case the system does not have that library. That sometimes causes problems, if 
the option "-L $SAGE_HOME/local/lib" is added and the library is also on the 
system.

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).

I'd rather some way of doing this which is not GCC specific, and certainly not 
specific to the GNU linker, as on Solaris the Sun linker works better, and in 
any case we hope to support non-GNU compilers too. But in the short term, 
anything that works with gcc, even if not with other compilers, would be useful.

Dave

             reply	other threads:[~2009-12-12 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-13 19:38 Dr. David Kirkby [this message]
2009-12-13 21:47 ` Philipp Thomas
2009-12-14  2:37   ` Dr. David Kirkby
2009-12-15 12:39     ` Philipp Thomas
2009-12-17 11:32       ` Dr. David Kirkby
2009-12-30 21:47 ` Ralf Wildenhues
2009-12-31  2:37   ` Dr. David Kirkby
2009-12-31 14:25     ` Ralf Wildenhues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B23799B.3040101@onetel.net \
    --to=david.kirkby@onetel.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).