FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 01-06-2008, 04:52 PM
Matthijs Kooijman
 
Default Versioned symbols break alsa-lib

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
 
Old 01-08-2008, 01:25 AM
Ned Ludd
 
Default Versioned symbols break alsa-lib

On Sun, 2008-01-06 at 18:52 +0100, Matthijs Kooijman wrote:
[snip]

...

> 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.

The solution seems rather simple.

use elibc_glibc || myconf="${myconf} --without-versioned"



--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-08-2008, 07:56 AM
Matthijs Kooijman
 
Default Versioned symbols break alsa-lib

> The solution seems rather simple.
>
> use elibc_glibc || myconf="${myconf} --without-versioned"
So this is something that should be fixed in the alsa-lib ebuild, or is this
supposed to go somewhere else? In the former case, wouldn't
$(use_with elibc_glibc versioned) be nicer?

Gr.

Matthijs
 
Old 01-09-2008, 06:40 AM
Ned Ludd
 
Default Versioned symbols break alsa-lib

On Tue, 2008-01-08 at 09:56 +0100, Matthijs Kooijman wrote:
> > The solution seems rather simple.
> >
> > use elibc_glibc || myconf="${myconf} --without-versioned"


> So this is something that should be fixed in the alsa-lib ebuild, or is this
> supposed to go somewhere else? In the former case, wouldn't
> $(use_with elibc_glibc versioned) be nicer?

Using the portage provided API's will make others happier, I personally
don't happen to care so much as I don't work directly with ebuilds every
day. I was rather only trying to express to you that version symbols
really should only be enabled for glibc users.

How you act upon on media-sound/pulseaudio within Gentoo is up to you
alone. I've noticed maintainers seem to like when patches are provided
to them via https://bugs.gentoo.org Which seems reasonable as it's often
easier to understand the end result with a 5 line patch vs ~7-25 emails.

It may or may not be short sightedness of the upstream author in this
case to assume gnu libc by default. I'd guess probably any and all of
the bug reports he/she has received have been related to the gnu libc
userland so assuming versioned symbols might be a reasonable default
that {s,}he is used to.

Anyway I'm not going to be acting on the pkg in question as I've
personally never needed *audio* and embedded together. But initially we
can gather the following information within Gentoo about the the pkg.

tinderbox ~ # epkginfo media-sound/pulseaudio
Package: media-sound/pulseaudio
Herd: sound
Maintainer: sound
Location: /usr/portage/media-sound/pulseaudio
Keywords: pulseaudio-0.9.5-r6: arm sh
Keywords: pulseaudio-0.9.7: ppc ~arm amd64 ppc64 ~sh sparc ia64 alpha
hppa x86
Keywords: pulseaudio-0.9.8-r4:
Keywords: pulseaudio-0.9.8-r5: ~x86-fbsd
Keywords: pulseaudio-0.9.8-r6:
Keywords: pulseaudio-0.9.8-r7: ~hppa ~amd64 ~x86 ~alpha ~ia64 ~sparc
~ppc64
ChangeLog: 48 flameeyes, 8 jer, 4 armin76, 4 corsair, 4 gustavoz, 2
ticho, 2 kloeri, 2 drac, 2 killerfox, 2 josejx, 1 zaheem, 1 agriffis, 1
zzam, 1 ranger, 1 welp, 1 mcummings, 1 lu_zero, 1 dertobi123, 1 maekke,
1 tsunam, 1 nixnut, 1 jurek,



<solar> !herd -r sound
07:09AM <jeeves> solar: (sound) aballier, beandog, chainsaw, chutzpah,
drac, genstef, matsuu, ticho


--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-10-2008, 05:53 AM
Mike Frysinger
 
Default Versioned symbols break alsa-lib

On Sunday 06 January 2008, Matthijs Kooijman wrote:
> I've been trying to get alsa to work with uclibc and found out that it
> breaks against uclibc when using versioned symbols.

i hit this elsewhere, but forgot to push my experience back in Gentoo. sorry
about that.

> 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.

correct. we'll add optional version support to uClibc at some point, but
that'll be some time away and most likely turned off by default as ABI
compatibility is a back seat in embedded world.

> 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.

uClibc's ldso skips over any dynamic tags related to symbol versioning. i
looked at adding warnings/errors like is done with TEXTRELs, but it seems
that it is not possible to disable these things completely in the core libs
that come from gcc. btw, we should consider adding --disable-symvers in
toolchain.eclass for uClibc/gcc ...

when looking for symbols, uClibc simply walks until it finds the first match.

> 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.

yep

> 1. Add an alsa-compat use flag to alsa-libs. Only compile also with
> 2. Add a symver (global?) useflag. This usefalg does the same as the
> 3. Modify the configure script of alsa-lib (probably upstream). The current

(1) is no good. (2) will probably be realistic down the line, but not until
uClibc actually supports it. (3) is certainly not the route we want to go.

i'll commit like Ned said and tie it to elibc_uclibc to --without-versioned
-mike
 
Old 01-10-2008, 08:12 AM
Matthijs Kooijman
 
Default Versioned symbols break alsa-lib

On Tue, Jan 08, 2008 at 11:40:07PM -0800, Ned Ludd wrote:
> How you act upon on media-sound/pulseaudio within Gentoo is up to you
> alone. I've noticed maintainers seem to like when patches are provided
> to them via https://bugs.gentoo.org Which seems reasonable as it's often
> easier to understand the end result with a 5 line patch vs ~7-25 emails.
Actually, I'm no Gentoo developer, so I won't act upon anything. I was more
trying to get feedback as to the proper solution, so I could file a bug
at the right place.

But, it seems there's no need for a bug report, since Mike will fix it.

On Thu, Jan 10, 2008 at 01:53:40AM -0500, Mike Frysinger wrote:
> i'll commit like Ned said and tie it to elibc_uclibc to --without-versioned
Thanks!

Gr.

Matthijs
 

Thread Tools




All times are GMT. The time now is 06:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org