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

Bug 641806

Summary: dev-util/valgrind-3.13.0-r1 fails with -flto
Product: Gentoo Linux Reporter: cryptopsy
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: jstein, quentin, sam, wizardedit
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=338252
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: emerge --info
build.log
lto enabled ebuild

Description cryptopsy 2017-12-20 12:56:54 UTC
Created attachment 511172 [details]
emerge --info

/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV32le':
<artificial>:(.text+0x5f): undefined reference to `primary_map'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV16le':
<artificial>:(.text+0x9f): undefined reference to `primary_map'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV8':
<artificial>:(.text+0xf8): undefined reference to `primary_map'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV64le':
<artificial>:(.text+0x41): undefined reference to `mc_LOADVn_slow'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV32le':
<artificial>:(.text+0x89): undefined reference to `mc_LOADVn_slow'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV16le':
<artificial>:(.text+0xe2): undefined reference to `mc_LOADVn_slow'
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccZK1uh7.ltrans0.ltrans.o: In function `vgMemCheck_helperc_LOADV8':
<artificial>:(.text+0x13b): undefined reference to `mc_LOADVn_slow'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1012: memcheck-x86-linux] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000580000f0
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/temp/ccyxxLiI.ltrans3.ltrans.o: In function `barf.lto_priv.282':
/tmp/.portage/portage/dev-util/valgrind-3.13.0-r1/work/valgrind-3.13.0/memcheck/m_debuginfo/readdwarf3.c:5169: undefined reference to `VG_MINIMAL_LONGJMP'
Comment 1 cryptopsy 2017-12-20 12:57:42 UTC
Created attachment 511174 [details]
build.log
Comment 2 Austin English (RETIRED) gentoo-dev 2018-02-05 23:22:19 UTC
Known issue upstream. They recommend not using it for now, but from the bug (https://bugs.kde.org/show_bug.cgi?id=338252), it sounds like they may support it at some point in the future.

@blueness, how would you feel about filtering the cflag for now, until it is supported?
Comment 3 Austin English (RETIRED) gentoo-dev 2018-11-04 09:23:48 UTC
Created attachment 554048 [details]
lto enabled ebuild

@OP, could you try this ebuild please? You'll need USE=lto, of course.

Compiles here and works for a couple basic tests, but I'd like someone else to test before I push it.