RE: Why does ld insist on /lib/libgcc_so.so1

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

 



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@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of skelter@xxxxxxxxxxx

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 .



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux