Re: glibc version dependencies

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

 



Hello Ian,

Thanks very much for the answer. I have just been looking at how autobuild do it with their apgcc wrapper (haven't looked at g++ yet, I went C only to avoid that one :). Basically, when I did

 apgcc [file] [args]

it translated that to

gcc -I/usr/local/include/apbuild -include /usr/local/include/apbuild/apsymbols.h \
     -DAPBUILD_VERSION="2.0.2" [file] \
-Wl,--enable-new-dtags,--rpath,${ORIGIN}/../lib,--rpath,${ORIGIN}/../lib/autopackage \
     -shared-libgcc -Wl,--as-needed [args]

The apbuild include directory contains a GNU ctype.h (seems to be modified to eliminate some version dependencies) and apsymbols.h, which contains a lot of lines similar to

__asm__(".symver __duplocale,__duplocale@xxxxxxxxx");

It also adds various libraries in /usr/libexec/autopackage - libcurl.so.2.0.2, libgcc_s.so.1, libstdc++.so.5.0.2, libstdc++.so.6.0.5 and libuau.so.3.0.0. I presume that these override the standard libraries either at link or at runtime and are more "compatible" versions.

Just thought I would post this in case it interests anyone.

Regards and thanks,

Michael

> So my question: can anyone tell me a good way to produce a binary
> which is glibc 2.2 compatible, other than building on a glibc 2.2
> system?  What determines which version of glibc is required by the
> binary?  (BTW, I do supply source code as well, but I would like to
> build a binary for people's convenience).

Unfortunately glibc is not forward compatible, and unfortunately there
is no way to restrict yourself to an older version of glibc.  I only
know of two ways to build a program which only relies on glibc 2.2.
The first and simplest is the one you mention: do the build on a glibc
2.2 system.  The second is to build a cross-compiler to a glibc 2.2
system; this is most easily done using crosstool.

Ian

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


[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