[alsa-devel] Results: finally got this to work! RE: is statically linking libasound supported? because if i do it, i cant open the device!

John Utz John.Utz at dmx.com
Sat Mar 31 00:20:50 CEST 2007


forgive the top post;

(supposedly IT is gonna turn on IMAP on the exchange server for YT RSN and then i can write rfc compliant email)

i followed tiwai's recommendation and corrected my configure arguments to disable shared and enable static.

once i correctly placed the conf files on the target boxes (rh62, gentoo) i was able to have success with a statically linked app on the gentoo box; however i had a lot of grief on rh62!

on rh62, i would get a segfault parsing the pcm.conf file.

however, once i limited my static linking to libasound only instead of libasound, libc, libpthread and libdl i was able to have success on rh62 as well.


tnx for your help IWAI-san!

johnu

-----Original Message-----
From: alsa-devel-bounces at alsa-project.org on behalf of John Utz
Sent: Wed 3/28/2007 10:15 AM
To: Takashi Iwai
Cc: alsa-devel at alsa-project.org
Subject: Re: [alsa-devel] is statically linking libasound supported? because if i do it, i cant open the device!
 



-----Original Message-----
From: Takashi Iwai [mailto:tiwai at suse.de]
> You cannot build both *.a and *.so _at the same time_ for alsa-lib.
> partly because of bad behavior of libtool, partly because of the
> design of alsa-lib (embedded plugins in static lib).
> 
> Simply build twice, once for a shared lib and once for a static lib.
> 
> 
> > I got the libasound.a just find and it linked the app and the app *runs*, it just
> > doesnt find the device!
> 
> The libasound.a is broken.

* Well, I meant the libasound.a you made is broken.
* When you build libasound.a without --disable-shared, it passes -DPIC
* and it's built with assumption of shared library use.

AHH! thankyou for explaining that! i am greatful for the increase in my understanding of library compilation 'dynamics' (for want of a better term :-) )

tnx for the 'schoolin''

i'll report back on my outcome.

Takashi


_______________________________________________
Alsa-devel mailing list
Alsa-devel at alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




More information about the Alsa-devel mailing list