Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645330 - games-emulation/snes9x-1.55 CFLAGS=-ggdb strips "-g" - x86_64-pc-linux-gnu-g++: error: gdb: No such file or directory
Summary: games-emulation/snes9x-1.55 CFLAGS=-ggdb strips "-g" - x86_64-pc-linux-gnu-g+...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 03:44 UTC by Khumba
Modified: 2018-01-23 09:35 UTC (History)
0 users

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


Attachments
emerge --info (emerge-info.txt,6.68 KB, text/plain)
2018-01-22 03:44 UTC, Khumba
Details
build.log (build.log,15.05 KB, text/plain)
2018-01-22 03:44 UTC, Khumba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khumba 2018-01-22 03:44:08 UTC
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
Comment 1 Khumba 2018-01-22 03:44:37 UTC
Created attachment 515806 [details]
build.log
Comment 2 Khumba 2018-01-22 04:07:49 UTC
I went ahead and filed an upstream bug here: https://github.com/snes9xgit/snes9x/issues/272
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-01-22 07:49:47 UTC
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
Comment 4 Larry the Git Cow gentoo-dev 2018-01-23 09:35:53 UTC
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(-)