View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice

Joined: 19 Nov 2020 Posts: 265
|
Posted: Tue Mar 02, 2021 5:40 am Post subject: how does installsources feature works? |
|
|
I am trying the installsources feature according to https://wiki.gentoo.org/wiki/Debugging, but i cannot find the source code.
what follows is my settings:
Code: | gym@gymDeskGentoo / $ cat /etc/portage/env/installsources
FEATURES="${FEATURES} installsources"
gym@gymDeskGentoo / $ cat /etc/portage/package.env
sys-apps/util-linux installsources
gym@gymDeskGentoo / $ emerge --search dev-util/debugedit
[ Results for search key : dev-util/debugedit ]
Searching...
* dev-util/debugedit
Latest version available: 4.16.1.2
Latest version installed: 4.16.1.2
Size of files: 4,245 KiB
Homepage: https://rpm.org https://github.com/rpm-software-management/rpm
Description: Stand-alone debugedit from RPM
License: GPL-2+ LGPL-2+
[ Applications found : 1 ] |
and after emerge sys-apps/util-linux, i cannot find the unpacked source code, i had checked the following folders:
Code: | gym@gymDeskGentoo / $ sudo du | grep util-linux
28 ./usr/portage/sys-apps/util-linux/files
116 ./usr/portage/sys-apps/util-linux
12 ./usr/share/doc/util-linux-2.35.2/getopt
432 ./usr/share/doc/util-linux-2.35.2
28 ./var/db/repos/gentoo/sys-apps/util-linux/files
116 ./var/db/repos/gentoo/sys-apps/util-linux
220 ./var/db/pkg/sys-apps/util-linux-2.35.2 |
|
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31745 Location: here
|
Posted: Tue Mar 02, 2021 6:37 am Post subject: |
|
|
man make.conf: | installsources
Install source code into /usr/src/debug/${CATEGORY}/${PF} (also see splitdebug). This feature works only if debugedit is in‐
stalled, CFLAGS is set to include debug information (such as with the -ggdb flag) and binpkg-dostrip is enabled. |
You should satisfy two constraints for so that portage installs the sources, first you should install debugedit package (and this is done) and second you should add -ggdb to CFLAGS/CXXFLAGS (see /etc/portage/env/debugsyms in wiki page).
After that sources are located in /usr/src/debug/${CATEGORY}/${PF}. _________________ Questions are guaranteed in life; Answers aren't.
"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968 |
|
Back to top |
|
 |
guyuming Apprentice

Joined: 19 Nov 2020 Posts: 265
|
Posted: Tue Mar 02, 2021 11:31 am Post subject: |
|
|
fedeliallalinea wrote: |
you should add -ggdb to CFLAGS/CXXFLAGS.
After that sources are located in /usr/src/debug/${CATEGORY}/${PF}. |
Thanks, it works! what follows is my configuration now, i think the -pg is not necessary, i just want to try gprof.
Code: | gym@gymDeskGentoo ~ $ cat /etc/portage/package.env
sys-apps/util-linux util-linux.conf
gym@gymDeskGentoo ~ $ cat /etc/portage/env/util-linux.conf
CFLAGS="${CFLAGS} -ggdb -pg"
CXXFLAGS="${CXXFLAGS} -ggdb -pg"
FEATURES="${FEATURES} installsources"
|
and i can see source installed:
Code: | gym@gymDeskGentoo ~ $ ls /usr/src/debug/
sys-apps |
|
|
Back to top |
|
 |
guyuming Apprentice

Joined: 19 Nov 2020 Posts: 265
|
|
Back to top |
|
 |
|