public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: lrtaylor@micron.com
To: <skelter@spamcop.net>, <gcc-help@gcc.gnu.org>
Subject: RE: Why does ld insist on /lib/libgcc_so.so1
Date: Thu, 04 Dec 2003 19:40:00 -0000	[thread overview]
Message-ID: <363801FFD7B74240A329CEC3F7FE4CC40D341B@ntxboimbx07.micron.com> (raw)

The problem is that, while GCC automatically links to the libraries that
come with it, it doesn't embed the path to those libraries in the
executable.  So, your program will know that it depends on
libgcc_s.so.1, but it won't know where to find it.  When you run your
program, the system will look in the default library search directories
(of which /usr/lib is always one) and then find it there, instead of
where you have it installed under /usr/local.  Now, while the library
may have the same name as the one that your program was linked to, it is
an older version, and the linker knows this.  When you built your
program with GCC 3.3.2, it embedded the version of the library it needs
in the program, and when the linker saw that the version it wanted was
not what was in /usr/lib, it gave you the error that you saw.

What if you set LD_LIBRARY_PATH to the location of the correct
libgcc_s.so.1?

Cheers,
Lyle

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of skelter@spamcop.net

I have installed GCC 3.3.2 in /usr/local/gcc-3.3.2 in order to not
clobber
things in /lib and /usr/lib.  I even installed binutils, too.
Problem I'm running into now is that I can't shake dependence of
/lib/libgcc_s.so.1 .

             reply	other threads:[~2003-12-04 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04 19:40 lrtaylor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-04 22:38 lrtaylor
2003-12-04 20:44 skelter
2003-12-04 19:32 skelter

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=363801FFD7B74240A329CEC3F7FE4CC40D341B@ntxboimbx07.micron.com \
    --to=lrtaylor@micron.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=skelter@spamcop.net \
    /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).