LibSDL_Mixer - static lib is linked to dynamic libs
Dominik Reichardt
domiman at gmail.com
Mon Mar 1 07:53:57 PST 2010
As the SDL forum is taking a special stand against spam, I have to wait a bit before posting there. So I post an additional finding here.
./configure of libsdl_mixer gives the options:
--disable-music-mp3-shared \
--disable-music-ogg-shared \
--disable-music-flac-shared
which sound like the correct way to do this, unfortunately, doing that does not link either mp3/ogg/flac to the static file, neither dylib or static...
Probably Apple throwing stones in the way...
>>>>
>>>> I'm struggling with building our game engine (Exult) statically, since we want to have it ready for a possible release soon. After messing around with the hurdles of building programs static, I had been almost successful, only to be plagued by libsdl_mixer. It's static file is dynamic linked to other libs (libvorbis, libogg, libflac) which IMHO defeats the purpose of having a static lib.
>>>
>>> That sounds like a valid complaint. For the benefit of those of us not familiar, how do you determine that the static lib is dynamically linked to other libs?
>>>
>>
>> I have no real idea how to tell that. otool does not print out any dylib, though when I look at libsdl_mixer.a directly, I see the references to the dylib files. Also it was clear when Exult was running in the "Activity Monitor.app" that the dylibs were used, even though Exult doesn't link them and libsdl_mixer.a was linked in the exult binary.
>>
>>>
>>>> I'm not sure if that is a ticketable issue or if there is any way to hack around that static/dynamic issue that Apple produced.
>>>
>>> Sounds like a valid thing to open a ticket for. Though the libsdl_mixer portfile doesn't appear to do anything special, so a plain from-source build outside of MacPorts would probably also exhibit this problem, so it's probably an upstream problem and should probably be reported there.
>>>
>>>
>>
>> Yes, building directly from source was not successful as well, and I couldn't "hack" the makefile similar to how I "hacked" the exult makefile to link to the static libs :(
>> So, this is most likely an upstream problem.
>>
>>>> So, again, any way to hack the build of libsdl_mixer to link the libs statically?
>>>
>>> I have no idea how to fix this problem. Contacting the developers of this software may be your best bet.
>>
>>
>> I'll try my best, though I fear I know the response already (use the precompiled framework!) :)
>>
>> So, I'll open a ticket here and will contact the SDL devs on their forum/ML.
--
Take care
Dominik Reichardt
http://beam.to/Dominik
""Was hast Du auf der Müllkippe gemacht?"
"Geatmet."
"Geatmet?"
"Hm-Hmh. Geatmet. Und Du?"
"Nachgedacht."
"Über was bestimmtes?"
"Nur daß ich nicht in der gleichen Welt leben möchte, wie die World Wrestling Federation und der Tele-Shop Kanal."
"Nett.""
Death - The time of your Live
Ich hörte gerade -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100301/cb292931/attachment.html>
More information about the macports-users
mailing list