Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683458 - app-emulation/qemu FEATURES="compressdebug splitdebug" fails to split / debugedit
Summary: app-emulation/qemu FEATURES="compressdebug splitdebug" fails to split / debug...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-16 14:27 UTC by Daniel Santos
Modified: 2019-04-29 07:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2019-04-16 14:27:49 UTC
I'm debugging a flaw in qemu-mipsel when I noticed that while gdb is finding the sources, it isn't claiming they are under /usr/src/debug.  I looked for the debug file under /usr/lib/debug and all I see are these:

-rw-r--r-- 1 root root  687536 Jan 12 12:43 /usr/lib/debug/usr/bin/qemu-ga.debug
-rw-r--r-- 1 root root  261872 Nov 24 15:20 /usr/lib/debug/usr/bin/qemu-img-xen.debug
-rw-r--r-- 1 root root  248984 Nov 24 15:20 /usr/lib/debug/usr/bin/qemu-nbd-xen.debug
-rw-r--r-- 1 root root 1777104 Nov 24 15:20 /usr/lib/debug/usr/libexec/xen/bin/qemu-dm.debug

Of course this made me wonder where I was getting my debug info from and it would seem that /usr/bin/qemu-mipsel (a.k.a. "/usr/bin/qemu-mipsel-static" on other distros) is not stripped and strings reveals it hasn't been debugedit-ed.

(gdb) where
#0  target_cpu_copy_regs (env=env@entry=0x62667b48, regs=regs@entry=0x7fffffffd830) at /tmp/portage/app-emulation/qemu-3.1.0-r1/work/qemu-3.1.0/linux-user/mips/cpu_loop.c:779
#1  0x000000006001625f in main (argc=<optimized out>, argv=0x7fffffffde98, envp=<optimized out>) at /tmp/portage/app-emulation/qemu-3.1.0-r1/work/qemu-3.1.0/linux-user/main.c:809

Is part of this intentional behaviour?  i.e., is this debug info not copied and stripped because we know it will generally be copied into chroots?  If this is the case, can we not run debugedit on it so that it will point to the proper sources?


# emerge --info app-emulation/qemu
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-8.2.0, glibc-2.27-r6, 4.14.96-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.14.96-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32890732 total,   2800912 free
KiB Swap:   16777212 total,  10575336 free
Timestamp of repository gentoo: Thu, 11 Apr 2019 06:00:01 +0000
Head commit of repository gentoo: 66eaaa28926103e690db0699466a274a17ab1979
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.64-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r6::gentoo, 6.4.0-r5::gentoo, 7.3.0-r6::gentoo, 8.1.0-r3::gentoo, 8.2.0-r6::gentoo, 8.3.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

love-local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

chaoslab
    location: /var/lib/layman/chaoslab
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

zugaina
    location: /var/lib/layman/zugaina
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -ggdb3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -ggdb3 -pipe"
DISTDIR="/mnt/large/distfiles"
EMERGE_DEFAULT_OPTS="-j3 --load-average=17.5 --with-bdeps=y --autounmask=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg candy cgroup compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.osuosl.org/ http://mirrors.rit.edu/gentoo/ http://gentoo.cs.uni.edu/ http://gentoo.osuosl.org/ "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en-US en_US"
MAKEOPTS="-j15 --load-average=17"
PKGDIR="/mnt/large/packages"
PORTAGE_COMPRESS="pxz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac aacs acl acpi activities aes aio alsa amd64 amr avx avx2 bcache berkdb bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr celt cli consolekit crypt cups cxx d3d9 dbus declarative designer device-mapper dirac directfb dot dri dts dvd dvdr emboss encode exif f16c fam ffmpeg fftw flac fluidsynth fma3 fontconfig fortran fuse gdbm geolocation gif git glamor go gphoto2 gpm gps graphite graphviz gsm gstreamer gtk hardened hddtemp highlight iconv icu ipv6 jpeg jpeg2k kde kerberos kipi kwallet lame latex lcms ldap libass libcaca libnotify libsamplerate libtirpc lm_sensors lto lvm lz4 lzma lzo mad matroska midi mjpeg mmx mmxext mng mono mp3 mp4 mpeg mtp multicall multilib multitarget musepack natspec ncurses netlink networkmanager nfs nls nptl nsplugin ogg openal openexr opengl openh264 openmp openssl opus osmesa pam pango pcap pch pclmul pcre pdf perl pgo phonon plasma playlist png policykit popcnt postgres postproc ppds pulseaudio python qml qt5 rar raw readline samba sasl savedconfig scanner schroedinger sdl seccomp sensors sid smp snappy speex spell spice sqlite sqlite3 squashfs sse sse2 sse3 sse4_1 sse4_2 sse4a ssh ssl ssse3 startup-notification static-libs subversion svg syslog systemtap taglib tcpd theora threads tiff timidity tools tremor truetype tty-helpers twolame udev udisks unicode upnp-av upower usb usbredir utils v4l vaapi valgrind vcdx vdpau vim-syntax virt-network virtio vlc vorbis vpx webdav webp widgets wxwidgets x264 x265 xattr xcb xcomposite xen xine xml xspice xv xvid xvmc zeroconf zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc coreboot emu multiboot qemu xen" INPUT_DEVICES="keyboard mouse joystick evdev wacom vmmouse" KERNEL="linux" L10N="en en-US en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU ARM BPF NVPTX Mips X86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="aarch64 arm armeb i386 hppa m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el ppc ppc64 ppc64abi32 ppc64le s390x sparc sparc32plus sparc64 x86_64" QEMU_USER_TARGETS="aarch64 arm armeb i386 hppa m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el ppc ppc64 ppc64abi32 ppc64le s390x sparc sparc32plus sparc64 x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi vesa qxl vmware amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-3.1.0-r1::gentoo was built with the following:
USE="aio alsa bzip2 caps curl fdt filecaps gtk jpeg lzo ncurses nfs nls opengl pin-upstream-blobs png pulseaudio python sasl sdl seccomp snappy spice ssh static-user systemtap usb usbredir vde vhost-net virtfs vnc vte xattr xen -accessibility (-capstone) -debug (-glusterfs) -gnutls -infiniband -iscsi -numa -rbd (-selinux) -smartcard (-static) -tci -test -virgl -xfs" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5 (-python3_7)" QEMU_SOFTMMU_TARGETS="aarch64 arm hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel ppc ppc64 s390x sparc sparc64 x86_64 -alpha -cris -lm32 -moxie -nios2 -or1k -riscv32 -riscv64 -sh4 -sh4eb -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="aarch64 arm armeb hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el ppc ppc64 ppc64abi32 ppc64le s390x sparc sparc32plus sparc64 x86_64 -aarch64_be -alpha -cris -nios2 -or1k -riscv32 -riscv64 -sh4 -sh4eb -tilegx -xtensa -xtensaeb"
CFLAGS="-march=native -O2 -ggdb -pipe"
CXXFLAGS="-march=native -O2 -ggdb -pipe"

>>> Attempting to run pkg_info() for 'app-emulation/qemu-3.1.0-r1'
Using:
  app-emulation/spice-protocol-0.12.14
  sys-firmware/edk2-ovmf-2017_p20180211
    USE=binary
  sys-firmware/ipxe-1.0.0_p20180211
  sys-firmware/seabios-1.11.0
    USE=binary
  sys-firmware/sgabios-0.1_pre8-r1
Comment 1 Matthias Maier gentoo-dev 2019-04-29 06:13:38 UTC
(In reply to Daniel Santos from comment #0)

> Is part of this intentional behaviour?  i.e., is this debug info not copied
> and stripped because we know it will generally be copied into chroots?  If
> this is the case, can we not run debugedit on it so that it will point to
> the proper sources?
> 

I had a quick look into this. The current behavior you are experiencing is a combination of RESTRICT=strip and the fact that we apparently currently ignore CFLAGS/LDFLAGS during build.

I will push qemu-4.0.0 soon that should hopefully fix all of these issues.
Comment 2 Larry the Git Cow gentoo-dev 2019-04-29 06:48:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c83a1b469d6e8c77187bf69ad6b74509b3586de3

commit c83a1b469d6e8c77187bf69ad6b74509b3586de3
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2019-04-29 03:31:19 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2019-04-29 06:48:45 +0000

    app-emulation/qemu: version bump to 4.0.0
    
     - Version bump to 4.0.0 (bug #684274)
    
     - Apply mips fpu mode fix (bug #683640)
    
     - Bug #683458: Reenable stripping. Remove old CFLAGS workaround. Let's
       see how far this takes us.
    
    Bug: https://bugs.gentoo.org/683458
    Closes: https://bugs.gentoo.org/683640
    Closes: https://bugs.gentoo.org/684274
    Closes: https://github.com/gentoo/gentoo/pull/11719
    Package-Manager: Portage-2.3.64, Repoman-2.3.12
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 app-emulation/qemu/Manifest                        |   1 +
 .../files/qemu-4.0.0-sanitize-interp_info.patch    |  32 +
 app-emulation/qemu/qemu-4.0.0.ebuild               | 799 +++++++++++++++++++++
 3 files changed, 832 insertions(+)
Comment 3 Matthias Maier gentoo-dev 2019-04-29 07:06:19 UTC
Looking good. Please have a look at app-emulation/qemu-4.0.0