This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Shared library annoyance with gcc-3_0-branch


>>>>> "Gerald" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

    Gerald> Well, there is a very noticable difference between 2.95
    Gerald> and 3.0:

    Gerald>   nunki[42]:~% cat x.cc main(int argc, char *argv[]) { }

    Gerald>   nunki[43]:~% gcc2.95 x.cc ; a.out

    Gerald>   nunki[44]:~% gccvs x.cc ; a.out ld.so.1: a.out: fatal:
    Gerald> libstdc++.so.3: open failed: No such file or directory

This difference is visible only because:

  - You didn't install with --prefix=/usr; for systems that come 
    with GCC we can expect that they will do this.

  - You didn't build 2.95.2 with --enable-shared.

The corresponding libgcc_s.so difference is, of course, new.

However, in C++, I hink you get shared libgcc only when
--enable-shared, so your world has not changed at all.  (C++ programs
are now linked against two shared libraries instead of one.)

In C, things are more noticably different, since `gcc -shared'
produces a shared library linked against libgcc_s.so.  So, that is a
case where you will now need a shared libgcc, and you didn't before.
The flip side is that things will work, whereas they did not before.

I think this debate is a little unfair.

If a GNU/Linux distribution wants to change things around, they can.
They can, for example, put all of libgcc into libc, and then remove
libgcc entirely!  That is what most system vendors do, and there's no
reason GNU/Linux vendors shouldn't do it too.  That kind of
integration and packaging is part of the value added by the
distributors.

However, out of the box, GCC is not supposed to just drop in on a
fully set up GNU/Linux system.  Rather, it is supposed to drop in on
*any* operating system, working relatively nicely with the installed
libraries, etc.  The scheme we have does that.  Sure, you have to set
LD_LIBRARY_PATH -- but you have to do that when you install KDE,
Netscape, and lots of other applications.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]