Created attachment 515804 [details] emerge --info games-emulation/snes9x-1.55 fails to build with CFLAGS="-ggdb". This appears to be because unix/configure.ac doesn't understand this potential flag when it decides to strip -g out of CFLAGS/CXXFLAGS (instead it appears to offer --enable-debug immediately following this snippet): > 59 # Remove -g and -O2 flags manually. > 60 > 61 if test "x$CFLAGS" != "x"; then > 62 CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`" > 63 CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`" > 64 fi > 65 > 66 if test "x$CXXFLAGS" != "x"; then > 67 CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`" > 68 CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`" > 69 fi Leading to a build failure when it tries to pass a literal "gdb" as an argument to gcc: > >>> Compiling source in /var/tmp/portage/games-emulation/snes9x-1.55/work/snes9x-1.55/unix ... > make --jobs=8 --load-average=16 > x86_64-pc-linux-gnu-g++ -I. -I.. -I../apu/ -I../apu/bapu -I../jma/ -I../filter/ -c -pipe -march=native gdb -DJOYSTICK_SUPPORT -DUNZIP_SUPPORT -DSYSTEM_ZIP -DJMA_SUPPORT -DPTR_NOT_INT -DMITSHM ../apu/apu.cpp -o ../apu/apu.o > x86_64-pc-linux-gnu-g++ -I. -I.. -I../apu/ -I../apu/bapu -I../jma/ -I../filter/ -c -pipe -march=native gdb -DJOYSTICK_SUPPORT -DUNZIP_SUPPORT -DSYSTEM_ZIP -DJMA_SUPPORT -DPTR_NOT_INT -DMITSHM ../apu/bapu/dsp/sdsp.cpp -o ../apu/bapu/dsp/sdsp.o > x86_64-pc-linux-gnu-g++: error: gdb: No such file or directory > make: *** [Makefile:77: ../apu/apu.o] Error 1 > make: *** Waiting for unfinished jobs.... > x86_64-pc-linux-gnu-g++: error: gdb: No such file or directory > make: *** [Makefile:77: ../apu/bapu/dsp/sdsp.o] Error 1
Created attachment 515806 [details] build.log
I went ahead and filed an upstream bug here: https://github.com/snes9xgit/snes9x/issues/272
unix/configure.ac:59-69: # Remove -g and -O2 flags manually. if test "x$CFLAGS" != "x"; then CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`" CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`" fi if test "x$CXXFLAGS" != "x"; then CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`" CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`" fi
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=622178a43687a38321af43de225f6faa236e6445 commit 622178a43687a38321af43de225f6faa236e6445 Author: David Seifert <soap@gentoo.org> AuthorDate: 2018-01-23 09:35:31 +0000 Commit: David Seifert <soap@gentoo.org> CommitDate: 2018-01-23 09:35:31 +0000 games-emulation/snes9x: Fix broken build system Closes: https://bugs.gentoo.org/645330 Package-Manager: Portage-2.3.19, Repoman-2.3.6 .../snes9x/files/snes9x-1.55-build-system.patch | 63 ++++++++++++++++++++++ games-emulation/snes9x/snes9x-1.55.ebuild | 5 +- 2 files changed, 67 insertions(+), 1 deletion(-)