Gentoo Archives: gentoo-embedded

From: Mike Frysinger <vapier@g.o>
To: gentoo-embedded@l.g.o
Cc: Matthijs Kooijman <matthijs@×××××.nl>
Subject: Re: [gentoo-embedded] Versioned symbols break alsa-lib
Date: Thu, 10 Jan 2008 06:53:44
Message-Id: 200801100153.40906.vapier@gentoo.org
In Reply to: [gentoo-embedded] Versioned symbols break alsa-lib by Matthijs Kooijman
1 On Sunday 06 January 2008, Matthijs Kooijman wrote:
2 > I've been trying to get alsa to work with uclibc and found out that it
3 > breaks against uclibc when using versioned symbols.
4
5 i hit this elsewhere, but forgot to push my experience back in Gentoo. sorry
6 about that.
7
8 > As far as I understand, uclibc doesn't support versioned symbols. However,
9 > the default gentoo-embedded toolchain is happy to compile binaries with
10 > versioned symbols. So, there are no problems at compile or link time.
11
12 correct. we'll add optional version support to uClibc at some point, but
13 that'll be some time away and most likely turned off by default as ABI
14 compatibility is a back seat in embedded world.
15
16 > However, at runtime, the dynamic module loader (I think?) ignores the
17 > versions on symbols and just picks some symbol to link against. In my case,
18 > pulseaudio linked against the symbols from the old alsa api (so not even
19 > the default version). This resulted in some hard to debug breakage.
20
21 uClibc's ldso skips over any dynamic tags related to symbol versioning. i
22 looked at adding warnings/errors like is done with TEXTRELs, but it seems
23 that it is not possible to disable these things completely in the core libs
24 that come from gcc. btw, we should consider adding --disable-symvers in
25 toolchain.eclass for uClibc/gcc ...
26
27 when looking for symbols, uClibc simply walks until it finds the first match.
28
29 > The solution to this problem turned out to be compiling alsa-lib with
30 > --without-versioned. This way, only the default version of each symbol is
31 > compiled, and no version information is added.
32
33 yep
34
35 > 1. Add an alsa-compat use flag to alsa-libs. Only compile also with
36 > 2. Add a symver (global?) useflag. This usefalg does the same as the
37 > 3. Modify the configure script of alsa-lib (probably upstream). The current
38
39 (1) is no good. (2) will probably be realistic down the line, but not until
40 uClibc actually supports it. (3) is certainly not the route we want to go.
41
42 i'll commit like Ned said and tie it to elibc_uclibc to --without-versioned
43 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature