Problem:

I love playing old SNES games so I use zsnes as emulator. Trying to emerge it I got the problem that libsdl wasn’t compiling (it’s an dependency of zsnes) and aborted with:

./src/hermes/mmx_main.asm:75: invalid argument to [SECTION]
./src/hermes/mmx_main.asm:75: undefined symbol `.note.GNU’ (first use)
./src/hermes/mmx_main.asm:75: undefined symbol `stack’ (first use)
./src/hermes/mmx_main.asm:75: (Each undefined symbol is reported only once.)
make: *** [build/mmx_main.lo] Error 1
make: *** Waiting for unfinished jobs….
./build-scripts/strip_fPIC.sh /usr/bin/yasm -f elf -I ./src/hermes/ -DHIDDEN_VISIBILITY ./src/hermes/mmxp2_32.asm -fPIC -DPIC -o build/.libs/mmxp2_32.o
/usr/bin/yasm -f elf -I ./src/hermes/ -DHIDDEN_VISIBILITY ./src/hermes/mmxp2_32.asm -o build/.libs/mmxp2_32.o
./src/hermes/mmxp2_32.asm:406: invalid argument to [SECTION]
./src/hermes/mmxp2_32.asm:406: undefined symbol `.note.GNU’ (first use)
./src/hermes/mmxp2_32.asm:406: undefined symbol `stack’ (first use)
./src/hermes/mmxp2_32.asm:406: (Each undefined symbol is reported only once.)
make: *** [build/mmxp2_32.lo] Error 1

!!! ERROR: media-libs/libsdl-1.2.11-r1 failed.
Call stack:
ebuild.sh, line 1614: Called dyn_compile
ebuild.sh, line 971: Called qa_call ’src_compile’
environment, line 3571: Called src_compile
libsdl-1.2.11-r1.ebuild, line 160: Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at ‘/var/tmp/portage/media-libs/libsdl-1.2.11-r1/temp/build.log’.

Searching through the gentoo forum and bugtracker I found out that the problem isn’t gentoo specific as some Slackware users also have that problem and it’s caused by the current version of yasm which is yasm-0.5.0. With yasm-0.4.0 everything is just fine.

Solution:

Gentoo users just mask the package with

# echo “=dev-lang/yasm-0.5.0″ >> /etc/portage/package.mask

Users of other distributions have to look in the manpage of their package manager ;)

hf, I’m going to play some “zelda, a link to the past” now :P