Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 672752 - sys-libs/pam points ${WORKDIR} as debug-prefix-map
Summary: sys-libs/pam points ${WORKDIR} as debug-prefix-map
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-08 14:51 UTC by Necktwi Ozfguah
Modified: 2022-12-11 16:16 UTC (History)
4 users (show)

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


Attachments
pam-1.3.1-r1-db.tar.gz (pam-1.3.1-r1-db.tar.gz,34.06 KB, application/tar)
2018-12-10 02:35 UTC, Necktwi Ozfguah
Details
pam-info (pam-info,6.22 KB, text/plain)
2018-12-10 07:16 UTC, Necktwi Ozfguah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Necktwi Ozfguah 2018-12-08 14:51:47 UTC
I expect

FEATURES="installsources" CFLAGS="-ggdb" emerge sys-libs/pam

debug symbols point the sources at /usr/src/debug/ but instead they point to /tmp/portage/.../work/...:
(gdb) s
pam_authenticate (pamh=0x5555634520, flags=0) at
/tmp/portage/sys-libs/pam-1.3.1-r2/work/linux-pam-1.3.1/libpam/pam_auth.c:20
20 /tmp/portage/sys-libs/pam-1.3.1-r2/work/linux-pam-1.3.1/libpam/pam_auth.c:
No such file or directory.
Comment 1 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-09 22:04:53 UTC
- What pam version?
- What do you try to debug and how?
- what use flags were set compiling pam?

These are all unclear
Comment 2 Necktwi Ozfguah 2018-12-10 02:35:19 UTC
Created attachment 557490 [details]
pam-1.3.1-r1-db.tar.gz

emerge flags
Comment 3 Necktwi Ozfguah 2018-12-10 02:48:25 UTC
Version: pam-1.3.1-r1

I tried to debug with gdb from emacs with "gud" extension.
From my C++ program, I'm calling pam_authenticate().
Everything is fine if I ebuild /usr/portage/sys-libs/pam/pam-1.3.1-r2.ebuild prepare and debug.

Please find the /var/db/pkg/sys-libs/pam-1.3.1-r2/ attached, for the use flags.
Don't mind "r2" its just "r1" with a custom indentation for my convenience.
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-10 07:06:08 UTC
(In reply to Necktwi Ozfguah from comment #3)
> Version: pam-1.3.1-r1
> 
> I tried to debug with gdb from emacs with "gud" extension.
> From my C++ program, I'm calling pam_authenticate().
> Everything is fine if I ebuild /usr/portage/sys-libs/pam/pam-1.3.1-r2.ebuild
> prepare and debug.
> 
> Please find the /var/db/pkg/sys-libs/pam-1.3.1-r2/ attached, for the use
> flags.
> Don't mind "r2" its just "r1" with a custom indentation for my convenience.


Well your attachment is merely useless, `emerge --info =sys-libs/pam-$(version)` output is your friend.
Comment 5 Necktwi Ozfguah 2018-12-10 07:16:01 UTC
Created attachment 557498 [details]
pam-info

emerge --info =sys-libs/pam-1.3.1-r2
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-10 16:04:39 UTC
I re-read the initial description, you should use both installsources and splitdebug FEATURES, so gdb can use splitted debug info in /usr/lib/debug.
Comment 7 Necktwi Ozfguah 2018-12-10 16:12:57 UTC
but glibc with same env(/etc/portage/package.env) got its debug symbols pointing at right location:
sys-libs/pam suppress_distcc debugsyms installsources
sys-libs/glibc suppress_distcc debugsyms installsources
Comment 8 Necktwi Ozfguah 2018-12-10 16:15:12 UTC
RPi3B:~ Necktwi$ cat /etc/portage/env/debugsyms
CFLAGS="${CFLAGS} -ggdb"
CXXFLAGS="${CXXFLAGS} -ggdb"
FEATURES="${FEATURES} splitdebug compressdebug -nostrip"
#USE="debug"
Comment 9 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-10 16:25:17 UTC

(In reply to Mikle Kolyada from comment #6)
> I re-read the initial description, you should use both installsources and
> splitdebug FEATURES, so gdb can use splitted debug info in /usr/lib/debug.

how is this relevant? The env remembers the initial debug symbols dir, thats why it was ok for you if you run src_prepare stuff, because otherwise workdir is removed if merge went succesfully. But I do not see the point to change pam behaviour about it, people can still use splitdebug, as it is generec proper way of doing this.
Comment 10 Necktwi Ozfguah 2018-12-10 16:30:43 UTC
what is the pam behavior? I already used splitdebug for pam. after proper merge, pam is looking for symbols in workdir.
Comment 11 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-10 18:43:17 UTC
(In reply to Necktwi Ozfguah from comment #10)
> what is the pam behavior? I already used splitdebug for pam. after proper
> merge, pam is looking for symbols in workdir.

I have no idea what is wrong with your installation then, I have just checked everything myself and it reads debug symbols from /usr/lib/debug, so this is exectly pam irrelevant
Comment 12 Necktwi Ozfguah 2018-12-10 18:47:25 UTC
I'm not saying that /usr/lib/debug/ don't have debug symbols, but the debug symbols present there are pointing to the sources in workdir instead of pointing them in /usr/src/debug/
Comment 13 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-10 20:30:18 UTC
You had better provide all the info initially
Comment 14 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-11 08:27:50 UTC
I think I do not want to change CFLAGS directly, this is not common, maybe the portage team want to implement something generic about debug paths