Updating uClibc's ELFs when binary compatibility breaks?

Kyle Sallee kyle.sallee at gmail.com
Sat May 9 20:15:33 UTC 2009


Hi.

Compilation of gcc with uClibc failed when I attempted to compile gcc 4.4.0
while using an installed uClibc with the newer thread support enabled.
gcc failed with an error similar to
pthread support required in order to compile libglomp.
Sorry, I already lost the compile log for that.
However, gcc 4.4.0 compiled fine after I adjusted installed uClibc's
configuration
to using the old thread.

The reason I am writing is because I was thinking about how
to handle a new release of uClibc that is not binary compatible
with an older installed release of uClibc.
Naturally, if the soname of library changed
then that would solve the problem.

Looking at the uClibc ELF libraries created by buildroot-2009.02
I see

libc.so.0 -> libuClibc-0.9.30.so

However, what if the soname were instead

libc.so.0.9.30

That way libc.so.0 can be abandoned and no longer used,
while software compiled and linked with the older uClibc
would dynamically link with libc.so.0.9.30
while software compiled with the newer uClibc
would dynamically link with libc.so.0.9.30.1
Are so names more limited than that?

Also changing the soname for the dynamic linker from
ld-uClibc.so.0
to something else
would require a tiny modification to gcc or gcc's spec file.
But would it be necessary?
Will ld-uClibc break binary compatibility?

Overall my request is a bit complicated.
However, it would be nice if the soname for uClibc's ELF libraries
changed whenever binary compatibility breaks.
That would make updating boxes easier,
especially boxes that recompile native
instead of cross compiling.

If something more simple was desired
then what about starting with libc.so.7 ?
Does not appear as if glibc will be using libc.so.7
since they try to maintain backward binary compatibility.

Also I have a question.
Assuming uClibc does not change sonames,
is there an easy method for adding
a RPATH to uClibc that is inherited
by any ELF that links with a uClibc ELF?
That way I could install uClibc's ELFs in a place such as
/lib/uClibc/$VERSION/
That way programs and libraries dynamically linked with it
will be able to find and use that version of uClibc's ELFs
while disregarding what is suggested in /etc/ld.so.cache

Please, if there are some nice suggestions for smooth updating
of installed uClibc's ELF libraries please send them my way.
If uClibc's sonames changed when binary compatibility breaks
that would make updating to newer uClibc easy since uClibc's ELF libraries
would become almost like any other ELF library on my box.

Thanks for creating and maintaining uClibc.


More information about the uClibc mailing list