Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 942873 - sys-apps/portage-3.0.66.1-r1: FEATURES="installsources" doesn't install sources
Summary: sys-apps/portage-3.0.66.1-r1: FEATURES="installsources" doesn't install sources
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 933986
  Show dependency tree
 
Reported: 2024-11-04 12:53 UTC by Jan Ziak (atomsymbol)
Modified: 2024-11-07 21:06 UTC (History)
2 users (show)

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


Attachments
Example build log (app-arch:gzip-1.13-r1:20241104-122451.log,114.02 KB, text/plain)
2024-11-04 12:54 UTC, Jan Ziak (atomsymbol)
Details
emerge --info app-arch/gzip (emerge-info.txt,9.18 KB, text/plain)
2024-11-04 17:17 UTC, Jan Ziak (atomsymbol)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2024-11-04 12:53:30 UTC
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
Comment 1 Jan Ziak (atomsymbol) 2024-11-04 12:54:53 UTC
Created attachment 907853 [details]
Example build log
Comment 2 Mike Gilbert gentoo-dev 2024-11-04 17:02:55 UTC
Please provide emerge --info.

Also, what are the exact CFLAGS you used for this package?
Comment 3 Jan Ziak (atomsymbol) 2024-11-04 17:17:07 UTC
Created attachment 907857 [details]
emerge --info app-arch/gzip
Comment 4 Mike Gilbert gentoo-dev 2024-11-04 18:16:11 UTC
What are the exact CFLAGS you used for this package?
Comment 5 Jan Ziak (atomsymbol) 2024-11-04 19:45:40 UTC
(In reply to Mike Gilbert from comment #4)
> What are the exact CFLAGS you used for this package?

It is in the attachments.
Comment 6 Mike Gilbert gentoo-dev 2024-11-04 20:02:46 UTC
Please upgrade to >=dev-util/debugedit-5.1 or remove the "-gz" option from CFLAGS.
Comment 7 Jan Ziak (atomsymbol) 2024-11-04 20:24:21 UTC
(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
Comment 8 Mike Gilbert gentoo-dev 2024-11-04 20:31:02 UTC
dev-util/debugedit-5.0-r3 works for me with CFLAGS="-O2 -g".

Perhaps one of your other flags triggers the issue as well.
Comment 9 Jan Ziak (atomsymbol) 2024-11-04 20:53:47 UTC
(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".
Comment 10 Mike Gilbert gentoo-dev 2024-11-04 21:30:19 UTC
That's bug 917287.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-05 02:10:34 UTC
(I don't think there's a need to use -gz with compressdebug anyway, is there?)
Comment 12 Jan Ziak (atomsymbol) 2024-11-05 14:24:31 UTC
(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.