emerging zsnes results in a segfault Reproducible: Always Steps to Reproduce: 1. emerge zsnes Actual Results: segfault Expected Results: shiny new build of zsnes ebuild output _______________________________ You may now run make to compile zsnes Make sure you use GNU make when compiling. /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sfxproc.o chips/sfxproc.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2.o chips/fxemu2.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/dsp1proc.o chips/dsp1proc.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2b.o chips/fxemu2b.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxemu2c.o chips/fxemu2c.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/fxtable.o chips/fxtable.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sa1proc.o chips/sa1proc.asm /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o chips/sa1regs.o chips/sa1regs.asm gcc -pipe -I. -Wall -D__LINUX__ -I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -D__OPENGL__ -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s -march=pentiumpro -o chips/dsp1emu.o -c chips/dsp1emu.c /usr/bin/nasm -w-orphan-labels -D__LINUX__ -f elf -DELF -D__OPENGL__ -o cpu/addrni.o cpu/addrni.asm make: *** [cpu/addrni.o] Segmentation fault make: *** Deleting file `cpu/addrni.o' make: *** Waiting for unfinished jobs.... !!! ERROR: app-emulation/zsnes-1.36 failed. !!! Function src_compile, Line 32, Exitcode 2 !!! emake failed _____________________________ emerge info _____________________________ Portage 2.0.49-r2 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22_pre2-gss) ================================================================= System uname: 2.4.22_pre2-gss i686 AMD Athlon(tm) XP 2000+ ccache version 2.2 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox ccache" GENTOO_MIRRORS="http://gentoo.noved.org/ ftp://gentoo.noved.org/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.pair.com/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ mad mikmod motif mpeg ncurses pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline tetex java guile sdl gpm tcpd pam libwww ssl python esd imlib oggvorbis opengl X gtk -gnome -alsa -kde nptl qt ipv6 tcltk mmx sse 3dnow bindist -nls perl mysql innodb gtk2 tiff md5sum fax slp -svga maildir cscope imap mbox mozilla pda -arts fbcon aalib joystick dga offensive xinerama xml directfb"
have you tried with CFLAGS="-pipe" and CXXFLAGS="-pipe"
I've identified the "-f elf" parameter as the cause of this crash. This happens on a straight source build (./configure; make) as well as emerge. Now, does this have to use ELF format for the object files?
If the bug reporter is using nasm-0.98.37 then this bug seems very similar to Bug #27704 Backing down to nasm-0.98.36 seems to work.
I've tracked the problem to the very line that the problem occurs, but I don't know how it's supposed to work so I'm not sure how to fix it. I've sent email to the nasm development list so hopefully we'll get a fix from them. It's certainly a bug in nasm since it should segfault. I don't think 0.98.37 is going to last very long.
nasm-0.98.37's -f elf support is totally broken. I've masked this version of nasm in package.mask. I'm going to close this bug because it's not really a game bug and will hopefully be resolved with the next release of nasm.
nasm's problem.
.38 fixes this
use .38 !