Active Topics

 


Reply
Thread Tools
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#1
Hi I need compile program as static, but when I do this I get this error:
Code:
/usr/lib/libSDL.a(SDL_x11gl.o): In function `X11_GL_LoadLibrary':
(.text+0x148): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `PULSE_CloseAudio':
(.text+0x178): undefined reference to `pa_simple_drain'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `PULSE_CloseAudio':
(.text+0x184): undefined reference to `pa_simple_free'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `PULSE_PlayAudio':
(.text+0x1b8): undefined reference to `pa_simple_write'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `Audio_Available':
(.text+0x2b0): undefined reference to `pa_simple_new'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `Audio_Available':
(.text+0x2c0): undefined reference to `pa_simple_free'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `PULSE_OpenAudio':
(.text+0x3e4): undefined reference to `pa_channel_map_init_auto'
/usr/lib/libSDL.a(SDL_pulseaudio.o): In function `PULSE_OpenAudio':
(.text+0x4a0): undefined reference to `pa_simple_new'
What I have to do include? Thx for reply.
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#2
Any ideas please?
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#3
Just a guess, but if it's a debian package in scratchbox, maybe try:

Code:
fakeroot apt-get install libpulse-dev
If that does doesn't fix things, you would then have to add this

Code:
PULSE_SIMPLE_CFLAGS=`pkg-config --cflags libpulse-simple`
PULSE_SIMPLE_LIBS=`pkg-config --libs libpulse-simple`
AC_SUBST(PULSE_SIMPLE_CFLAGS)
AC_SUBST(PULSE_SIMPLE_LIBS)
to your configure.ac and then properly add those two variables to one of your Makefile.am files.

When done with that, do this from the project directory:

Code:
autoreconf --force
dpkg-buildpackage -b -d -nc -rfakeroot
__________________
N9: Go white or go home
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#4
I did it, but it doesn't help. thanks
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#5
Try repackaging libsdl like this:

Code:
apt-get source libsdl1.2
cd libsdl1.2-1.2.13

sed -i 's/SDL_AUDIO_DRIVER_PULSE_DYNAMIC/notSDL_AUDIO_DRIVER_PULSE_DYNAMIC/' configure
sed -i 's/SDL_AUDIO_DRIVER_PULSE_DYNAMIC/notSDL_AUDIO_DRIVER_PULSE_DYNAMIC/' configure.in
sed -i 's/SDL_AUDIO_DRIVER_PULSE_DYNAMIC/notSDL_AUDIO_DRIVER_PULSE_DYNAMIC/' debian/patches/100_relibtoolize.diff
sed -i 's/SDL_AUDIO_DRIVER_PULSE_DYNAMIC/notSDL_AUDIO_DRIVER_PULSE_DYNAMIC/' debian/patches/030_pulseaudio_enable.diff

dpkg-buildpackage -b -n -nc -rfakeroot
This worked for me and should force libsdl to statically link the pulseaudio stuff.
__________________
N9: Go white or go home
 
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#6
In my case it had only one result next erorrs. Can you send me please your patched debs please?
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#7
You should only need the first two. Here's how you combine them:

Code:
dpkg-split -j libsdl1.2-dev_1.2.13-2maemo8+0m5_armel.1of2.deb libsdl1.2-dev_1.2.13-2maemo8+0m5_armel.2of2.deb
__________________
N9: Go white or go home
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#8
Ran into same error messages while trying to build oldplayer. Above debs don't help. Any other ideas? (on device building, libpulse-dev installed
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#9
Got around those problems by compiling pulseaudio (0.9.13, as 0.9.15 needs autoconf2.63+, this version just needs -fgnu89-inline added to cflags) and statically linking to libpulse-simple.a from it
 

The Following User Says Thank You to szopin For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:11.