View Single Post
Old 07-11-2012, 11:37 PM   #121
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
I am trying to static link alsa from source now, partially using instructions from here:
http://omappedia.org/wiki/ALSA_Setup

I need a libasound.a to static link my apps.

Hmm... Getting this error during this command:
arm-linux-gcc --static -o tones tones.c -lasound -lm -lpthread -ldl
Code:
warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Apparently my libasound and libdl need different glibc versions than I am using now to static link them to the same app.

The reason I want static linking is so my app runs on firmware 2.5.8 through 5.1.0 kindles.

When I leave out the --static in the above command, it compiles. When running it on the K3 I get this error:
Code:
./tones: relocation error: ./tones: symbol snd_pcm_hw_params_set_rate_resample, version ALSA_1.0.9 not defined in file libasound.so.2 with link time reference
but when I run it on my K5 I get this error:
Code:
./tones: /usr/lib/libasound.so.2: version `ALSA_1.0.9' not found (required by ./tones)
What good is static linking if it still dynamically loads libraries? I read about an alsa patch to get real static linking. Now I will have to go track that down...

I get confused easily by these library version issues. That is one reason I like monolithic C programs with no library dependencies.

Last edited by geekmaster; 08-12-2012 at 09:07 PM.
geekmaster is offline   Reply With Quote