Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 727094

Summary: app-emulation/qemu-5.0.0 does not respect LDFLAGS
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Matthias Maier <tamiko>
Status: RESOLVED FIXED    
Severity: normal CC: ajak, esigra, gentoo, virtualization, zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 331933    
Attachments: build.log.bz2

Description Agostino Sarubbo gentoo-dev 2020-06-04 10:28:11 UTC
This is an auto-filed bug because app-emulation/qemu does not respect LDFLAGS.
The issue was originally discovered on amd64, but it may be reproducible on other arches as well.
If you think that a different summary clarifies the issue better, feel free to change it.
Attached build log and emerge --info.

NOTE:
To reproduce this issue you may want to set LDFLAGS="${LDFLAGS} -Wl,--defsym=__gentoo_check_ldflags__=0". If this is not something about c/c++ context you may want to see this bug as an hint to hide the QA warning (with QA_FLAGS_IGNORED) where is not possible to respect LDFLAGS.
Comment 1 Agostino Sarubbo gentoo-dev 2020-06-04 10:28:18 UTC
Created attachment 643382 [details]
build.log.bz2

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-04 18:20:18 UTC
The relevant build log snippet is:

"""
 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/bin/elf2dmp
 * /usr/bin/ivshmem-client
 * /usr/bin/ivshmem-server
 * /usr/bin/qemu-edid
 * /usr/bin/qemu-img
 * /usr/bin/qemu-io
 * /usr/bin/qemu-keymap
 * /usr/bin/qemu-nbd
 * /usr/bin/qemu-pr-helper
 * /usr/bin/qemu-storage-daemon
 * /usr/bin/qemu-system-x86_64
 * /usr/libexec/qemu-bridge-helper
 * /usr/libexec/virtiofsd
"""


Looking at a elf2dmp:

"""
x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -frecord-gcc-switches -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64  -fstack-protector-strong -o elf2dmp contrib/elf2dmp/main.o contrib/elf2dmp/addrspace.o contrib/elf2dmp/download.o contrib/elf2dmp/pdb.o contrib/elf2dmp/qemu_elf.o    -lcurl -lm -lz  -lgthread-2.0 -pthread -lglib-2.0   -lrt -lz -lutil -lcap-ng
"""

Original  flags areLDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0".

Looks like they were not passed at all.
Comment 3 Ralph Seichter 2020-09-19 15:22:19 UTC
Also affects app-emulation/qemu-5.1.0:

QA Notice: Files built without respecting LDFLAGS have been detected
 Please include the following list of files in your report:
/usr/bin/elf2dmp
/usr/bin/ivshmem-client
/usr/bin/ivshmem-server
/usr/bin/qemu-edid
/usr/bin/qemu-img
/usr/bin/qemu-io
/usr/bin/qemu-keymap
/usr/bin/qemu-nbd
/usr/bin/qemu-storage-daemon
/usr/bin/qemu-system-x86_64
/usr/bin/qemu-x86_64
/usr/libexec/qemu-bridge-helper
/usr/libexec/qemu-pr-helper
/usr/libexec/virtiofsd
Comment 4 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-01 06:51:17 UTC
Seems fixed in more recent versions