Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538874 - media-libs/sdl2-mixer breaks with multilib abi_x86_32 whenever smpeg use flag is enabled.
Summary: media-libs/sdl2-mixer breaks with multilib abi_x86_32 whenever smpeg use flag...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on: 538876
Blocks:
  Show dependency tree
 
Reported: 2015-02-05 03:48 UTC by James D. Taylor
Modified: 2015-04-17 02:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Bumping revision to require eautoreconf for new smpeg2 aclocal. (sdl2-mixer-2.0.0-r2.ebuild.patch,704 bytes, patch)
2015-02-06 03:09 UTC, James D. Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James D. Taylor 2015-02-05 03:48:09 UTC
Problem manifests itself as a failed linking of the 32bit part of libSDL2_mixer-2.0.so because /usr/bin/smpeg2-config has -L/usr/lib64 hardcoded. Workaround is to either set -smpeg or -abi_x86_32 for media-libs/sdl2-mixer.

Failure output looks as follows:

... SNIP ...
libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -march=k8 -O2 -pipe -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL2 -DHAVE_SIGNAL_H -DHAVE_SETBUF -fvisibility=hidden -DHAVE_FORK -DCMD_MUSIC -DWAV_MUSIC -DMID_MUSIC -DUSE_FLUIDSYNTH_MIDI -DOGG_MUSIC -DFLAC_MUSIC -DMP3_MUSIC -I/usr/include/smpeg2 -D_REENTRANT -I/usr/include/SDL2 -DMP3_MAD_MUSIC -MMD -MT build/playmus.lo -c /var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/work/SDL2_mixer-2.0.0/playmus.c -o build/playmus.o >/dev/null 2>&1
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared  build/.libs/effect_position.o build/.libs/effect_stereoreverse.o build/.libs/effects_internal.o build/.libs/load_aiff.o build/.libs/load_voc.o build/.libs/mixer.o build/.libs/music.o build/.libs/music_cmd.o build/.libs/wavestream.o build/.libs/dynamic_fluidsynth.o build/.libs/fluidsynth.o build/.libs/dynamic_ogg.o build/.libs/load_ogg.o build/.libs/music_ogg.o build/.libs/dynamic_flac.o build/.libs/load_flac.o build/.libs/music_flac.o build/.libs/dynamic_mp3.o build/.libs/music_mad.o   -lfluidsynth -lvorbisfile -lvorbis -lFLAC -L/usr/lib64 /usr/lib64/libsmpeg2.so -L/usr/lib32 /usr/lib64/libSDL2.so -lasound -ldl -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lrt -lpthread -lmad -lm  -m32 -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libSDL2_mixer-2.0.so.0 -o build/.libs/libSDL2_mixer-2.0.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libfluidsynth.so when searching for -lfluidsynth
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libvorbisfile.so when searching for -lvorbisfile
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libvorbisfile.a when searching for -lvorbisfile
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libvorbis.so when searching for -lvorbis
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libvorbis.a when searching for -lvorbis
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libFLAC.so when searching for -lFLAC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libFLAC.a when searching for -lFLAC
/usr/lib64/libsmpeg2.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'build/libSDL2_mixer.la' failed
make: *** [build/libSDL2_mixer.la] Error 1
 * ERROR: media-libs/sdl2-mixer-2.0.0-r1::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/sdl2-mixer-2.0.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/sdl2-mixer-2.0.0-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/work/SDL2_mixer-2.0.0-abi_x86_32.x86'
 * S: '/var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/work/SDL2_mixer-2.0.0'

>>> Failed to emerge media-libs/sdl2-mixer-2.0.0-r1, Log file:

>>>  '/var/tmp/portage/media-libs/sdl2-mixer-2.0.0-r1/temp/build.log'


Reproducible: Always

Steps to Reproduce:
1. Get a multilib system going with abi_x86_[32,64] and ACCEPT_KEYWORDS=~amd64
2. Set smpeg use flag globally or just for media-libs/sdl2-mixer.
3. Emerge media-libs/sdl2-mixer.
Actual Results:  
Fails to link properly with various libs in /usr/lib64 during the link stage of the 32bit library.  -L/usr/lib64 shouldn't be used for this, but it is brought in by /usr/bin/smpeg2-config.

Expected Results:  
emerged both 32bit and 64bit versions os libSDL2_mixer.

This bug might depend on upstream smpeg to add proper /usr/lib[32,64]/pkgconfig .pc files.

This is in /usr/bin/smpeg2-config:
   --libs)
      if [ "`uname`" = "SunOS" ]; then
        libdirs="-L/usr/lib64 -R/usr/lib64"
      else
        libdirs="-L/usr/lib64 "
      fi
Comment 1 James D. Taylor 2015-02-06 03:09:32 UTC
Created attachment 395666 [details, diff]
Bumping revision to require eautoreconf for new smpeg2 aclocal.

This complements the smpeg2 patch as a dependency and should allow this package to merge with multilib and smpeg.
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2015-02-06 05:30:27 UTC
It would be great if someone on the multilib team could try this out and apply if it seems right.
Comment 3 James D. Taylor 2015-02-06 07:50:47 UTC
I've sent the patch for smpeg2 upstream to icculus@icculus.org so this might be a no-action-required if its included in the next release.  I think sdl2-mixer would still need a new configure script built without always enabling eautoconf like in this patch.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2015-04-17 02:26:35 UTC
I think this has been worked around in smpeg2