https://wiki.gentoo.org/wiki/Debugging#Per-package doesn't work on my machine. For example, after "emerge app-arch/gzip": $ cat /var/db/pkg/app-arch/gzip-1.13-r1/FEATURES ... binpkg-dostrip .... installsources ... splitdebug ... $ grep nostrip /var/db/pkg/app-arch/gzip-1.13-r1/FEATURES (no output) $ whereis debugedit /usr/bin/debugedit $ ls /usr/src/debug /bin/ls: cannot access '/usr/src/debug': No such file or directory $ qlist --showdebug app-arch/gzip | grep src (no output) Last line of build log: "/usr/bin/debugedit: /var/tmp/portage/app-arch/gzip-1.13-r1/image/bin/gzip-reference: DWARF version 0 unhandled" Reproducible: Always
Created attachment 907853 [details] Example build log
Please provide emerge --info. Also, what are the exact CFLAGS you used for this package?
Created attachment 907857 [details] emerge --info app-arch/gzip
What are the exact CFLAGS you used for this package?
(In reply to Mike Gilbert from comment #4) > What are the exact CFLAGS you used for this package? It is in the attachments.
Please upgrade to >=dev-util/debugedit-5.1 or remove the "-gz" option from CFLAGS.
(In reply to Mike Gilbert from comment #6) > Please upgrade to >=dev-util/debugedit-5.1 or remove the "-gz" option from > CFLAGS. dev-util/debugedit-5.0-r3, without -gz: fails to install sources dev-util/debugedit-5.1-r1, with -gz: successfully installs sources dev-util/debugedit-5.1-r1, without -gz: successfully installs sources
dev-util/debugedit-5.0-r3 works for me with CFLAGS="-O2 -g". Perhaps one of your other flags triggers the issue as well.
(In reply to Mike Gilbert from comment #8) > dev-util/debugedit-5.0-r3 works for me with CFLAGS="-O2 -g". > > Perhaps one of your other flags triggers the issue as well. OK. ---- A different issue, which seems specific just to app-arch/gzip, is that gdb cannot find the debug file: $ gdb /bin/gzip-reference Reading symbols from /bin/gzip-reference... (No debugging symbols found in /bin/gzip-reference) $ gdb /usr/bin/gzip-reference Reading symbols from /usr/bin/gzip-reference... (No debugging symbols found in /usr/bin/gzip-reference) $ readelf --string-dump=.gnu_debuglink /bin/gzip-reference String dump of section '.gnu_debuglink': [ 0] gzip-reference.debug [ 19] Y�' gdb is trying to open "/usr/lib/debug//usr/bin/gzip-reference.debug", but the package installed "/usr/lib/debug/bin/gzip-reference.debug".
That's bug 917287.
(I don't think there's a need to use -gz with compressdebug anyway, is there?)
(In reply to Sam James from comment #11) > (I don't think there's a need to use -gz with compressdebug anyway, is > there?) I think the interaction of the various debug/compress flags during build and install is too complicated, which results in too many unexpected outcomes. compressdebug doesn't compress files in /var/tmp/portage if FEATURES=noclean is being used, thus the need for -gz and -Wl,--compress-debug-sections. ---- If move the two CFLAGS/LDFLAGS options from make.conf to /etc/portage/env/noclean, and add compressdebug+splitdebug to FEATURES in make.conf, I will have to live with splitdebug bugs. ---- I have -g1 in CFLAGS by default and thus want to compress debug sections by default.