maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Missing references (https://talk.maemo.org/showthread.php?t=62153)

Figa 2010-09-12 12:21

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

Figa 2010-09-12 16:40

Re: Missing references
 
Any ideas please?

daperl 2010-09-12 17:20

Re: Missing references
 
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


Figa 2010-09-12 18:44

Re: Missing references
 
I did it, but it doesn't help. :( thanks

daperl 2010-09-12 20:24

Re: Missing references
 
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.

Figa 2010-09-12 22:10

Re: Missing references
 
In my case it had only one result next erorrs. Can you send me please your patched debs please?

daperl 2010-09-13 01:27

Re: Missing references
 
4 Attachment(s)
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

szopin 2012-05-05 22:32

Re: Missing references
 
Ran into same error messages while trying to build oldplayer. Above debs don't help. Any other ideas? (on device building, libpulse-dev installed

szopin 2012-05-06 18:57

Re: Missing references
 
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


All times are GMT. The time now is 13:05.

vBulletin® Version 3.8.8