Hey, I've been trying to get alsa to work with uclibc and found out that it breaks against uclibc when using versioned symbols.
As far as I understand, uclibc doesn't support versioned symbols. However, the
default gentoo-embedded toolchain is happy to compile binaries with versioned
symbols. So, there are no problems at compile or link time.
However, at runtime, the dynamic module loader (I think?) ignores the versions
on symbols and just picks some symbol to link against. In my case, pulseaudio
linked against the symbols from the old alsa api (so not even the default
version). This resulted in some hard to debug breakage.
The solution to this problem turned out to be compiling alsa-lib with
--without-versioned. This way, only the default version of each symbol is
compiled, and no version information is added.
Now, how to fix this for real? I have thought of a number of options.
1. Add an alsa-compat use flag to alsa-libs. Only compile also with
--with-versioned if this flag is defined. It makes sense to add this
useflag, since the versioning of symbols is only (?) needed to support
clients that use the old alsa API. Adding alsa-compat to use.mask in
the
uclibc profile solves the problem.
I don't really like this option because it doesn't really define the
actual problem (Instead of not compiling with versioned symbols, you're
disabling the old API, which just happens to be the same). Also, this
addresses the problem only for alsa-lib, while I expect there to be
more
packages with problems.
2. Add a symver (global?) useflag. This usefalg does the same as the
alsa-compat flag above, but has a more appropriate meaning. By making it
global, any other packages that show this problem can be fixed in a
consistent way.
I like this option, because it solves the actual problem. I'm not
really
sure how Gentoo works with adding use flags like these, though.
3. Modify the configure script of alsa-lib (probably upstream). The current
configure script checks if the version of libtool is 1.3 or higher. If so,
versioned symbols are enabled. Perhaps adding an explicit uclibc check
here
could help, or some other way to check for symbol versions exists or
can be
created. This solution might be a problem if uclibc introduces
versioned
symbols later on (I think there were some long term plans, though I'm
not
sure).
Any thoughts?
Gr.
Matthijs
signature.asc
Description: Digital signature
