media-libs/sdl-mixer-1.2.6 does not compile on OSX sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < .libs/libSDL_mixer.exp > .libs/libSDL_mixer-symbols.expsym gcc -dynamiclib -o .libs/libSDL_mixer-1.2.0.2.4.dylib .libs/load_aiff.o .libs/load_voc.o .libs/load_ogg.o .libs/mixer.o .libs/music.o .libs/music_cmd.o .libs/music_ogg.o .libs/wavestream.o .libs/effect_position.o .libs/effect_stereoreverse.o .libs/effects_internal.o .libs/libSDL_mixer.lax/libtimidity.a/common.o .libs/libSDL_mixer.lax/libtimidity.a/controls.o .libs/libSDL_mixer.lax/libtimidity.a/filter.o .libs/libSDL_mixer.lax/libtimidity.a/instrum.o .libs/libSDL_mixer.lax/libtimidity.a/mix.o .libs/libSDL_mixer.lax/libtimidity.a/output.o .libs/libSDL_mixer.lax/libtimidity.a/playmidi.o .libs/libSDL_mixer.lax/libtimidity.a/readmidi.o .libs/libSDL_mixer.lax/libtimidity.a/resample.o .libs/libSDL_mixer.lax/libtimidity.a/sdl_a.o .libs/libSDL_mixer.lax/libtimidity.a/sdl_c.o .libs/libSDL_mixer.lax/libtimidity.a/tables.o .libs/libSDL_mixer.lax/libtimidity.a/timidity.o .libs/libSDL_mixer.lax/libnativemidi.a/native_midi_common.o .libs/libSDL_mixer.lax/libnativemidi.a/native_midi_mac.o .libs/libSDL_mixer.lax/libnativemidi.a/native_midi_win32.o .libs/libSDL_mixer.lax/libsmpeg.a/bitwindow.o .libs/libSDL_mixer.lax/libsmpeg.a/decoders.o .libs/libSDL_mixer.lax/libsmpeg.a/filter.o .libs/libSDL_mixer.lax/libsmpeg.a/filter_2.o .libs/libSDL_mixer.lax/libsmpeg.a/floatdct.o .libs/libSDL_mixer.lax/libsmpeg.a/gdith.o .libs/libSDL_mixer.lax/libsmpeg.a/huffmantable.o .libs/libSDL_mixer.lax/libsmpeg.a/jrevdct.o .libs/libSDL_mixer.lax/libsmpeg.a/mmxflags_asm.o .libs/libSDL_mixer.lax/libsmpeg.a/mmxidct_asm.o .libs/libSDL_mixer.lax/libsmpeg.a/motionvector.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEG.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGaudio.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGfilter.o .libs/libSDL_mixer.lax/libsmpeg.a/mpeglayer1.o .libs/libSDL_mixer.lax/libsmpeg.a/mpeglayer2.o .libs/libSDL_mixer.lax/libsmpeg.a/mpeglayer3.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGlist.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGring.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGstream.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGsystem.o .libs/libSDL_mixer.lax/libsmpeg.a/mpegtable.o .libs/libSDL_mixer.lax/libsmpeg.a/mpegtoraw.o .libs/libSDL_mixer.lax/libsmpeg.a/MPEGvideo.o .libs/libSDL_mixer.lax/libsmpeg.a/parseblock.o .libs/libSDL_mixer.lax/libsmpeg.a/readfile.o .libs/libSDL_mixer.lax/libsmpeg.a/smpeg.o .libs/libSDL_mixer.lax/libsmpeg.a/util.o .libs/libSDL_mixer.lax/libsmpeg.a/vhar128.o .libs/libSDL_mixer.lax/libsmpeg.a/video.o -framework QuickTime /usr/lib/libvorbisfile.dylib /usr/lib/libm.dylib /usr/lib/libvorbis.dylib /usr/lib/libogg.dylib -framework Cocoa -framework OpenGL -lSDLmain /usr/lib/libSDL.dylib -install_name /usr/lib/libSDL_mixer-1.2.0.dylib -Wl,-compatibility_version -Wl,3 -Wl,-current_version -Wl,3.4 ld: Undefined symbols: __ZdaPv __ZdlPv __Znam __Znwm ___cxa_pure_virtual /usr/bin/libtool: internal link edit command failed make[1]: *** [libSDL_mixer.la] Error 1 make: *** [all-recursive] Error 1 Reproducible: Always Steps to Reproduce: 1. 2. 3.
A solution would be to ./configure with --enable-shared CFLAGS="-L/usr/lib/gcc/powerpc-apple- darwin8/4.0.0/", like in the attached ebuild.patch
Created attachment 69658 [details, diff] add the needed configure swithes to make it compile
Comment on attachment 69658 [details, diff] add the needed configure swithes to make it compile patch isnt acceptable
> (From update of attachment 69658 [details, diff] [edit]) > patch isnt acceptable What's the problem?
you'd at least need a conditional, because all other platforms wouldn't like the include. But then again, if the compiler gets an upgrade this doesn't work anymore, so another solution needs to be found.
> you'd at least need a conditional, because all other platforms wouldn't like the > include. But then again, if the compiler gets an upgrade this doesn't work > anymore, so another solution needs to be found. Ok, the problematic part seems to be CFLAGS="-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/" Can this be extracted by some clever script from information given by gcc --version? This returns powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The basic problem seem to be that the linker needs to link against libgcc_s. On Tiger, somehow, exists a cross-compiling system, where multiple versions of this lib seem to exist. gcc seems to pickup the wrong (intel x86) version of the lib locate libgcc_s.dylib returns /usr/lib/gcc/i686-apple-darwin8/4.0.0/libgcc_s.dylib /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc_s.dylib on my system.
LDFLAGS="-undefined dynamic_lookup" might be appropriate in this case....give it a try and see if it can find the symbols.
your suggestion at least didn't work for me. Considering the configure script, I'd also get the impression this is already set for Tiger systems.
> your suggestion at least didn't work for me. > Considering the configure script, I'd also get the impression this is already > set for Tiger systems. The flag somehow vanishes while building. It kind of works if you explicitly add it somewhere in the shell script ./libtool. If you do this, there are still some problem about an environment variable MACOSX_DEPLOYMENT_TARGET, which is apparently set to 10.4. After manually set it to 10.4 I could at least compile it. But I still don't really like the idea to patch around in the ./libtool script.
portage sets the MACOSX_DEPLOYMENT_TARGET to 10.4 so that should be handled.
Created attachment 70400 [details, diff] avoid missing symbols
> portage sets the MACOSX_DEPLOYMENT_TARGET to 10.4 so that should be handled. I am not quite sure about howto correctly patch to make it useful for the ebuild. Could you please check the "avoid missing symbols" patch?
Comment on attachment 70400 [details, diff] avoid missing symbols libtool is generated by running `./configure`, it isnt in the tarball ...
> (From update of attachment 70400 [details, diff] [edit]) > libtool is generated by running `./configure`, it isnt in the tarball ... So you have to patch configure, as in the attached patch (avoid missing symbols 2)
Created attachment 70482 [details, diff] avoid missing symbols (2)
Comment on attachment 70482 [details, diff] avoid missing symbols (2) still doesnt make any sense read the libtool code above your patch and you'll see that there's no reason to hack in that flag ... there's logic already to conditionally add it, your system is just not satisfying that condition and you should figure out why
> read the libtool code above your patch and you'll see that there's no reason to > hack in that flag ... there's logic already to conditionally add it, your > system is just not satisfying that condition and you should figure out why looks like the problem is the -no-undefined flags in the Makefile. If this is replaced by -allow-undefined, the ebuild works. There is a deprecation warning, that this flag is the default (probably on Linux) and will be removed in the future. I attach the needed patch to the ebuild file. Possibly you only need to change one of the Makefile.*, and possibly this should be made conditionally.
Created attachment 70491 [details, diff] allow undefined symbols
1.2.8 works and is keyworded