Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622662 - media-libs/libdv-1.0.0-r3 does not emerge w/ sys-devel/gcc-7.1.0-r1[pie,ssp] with gold on x86
Summary: media-libs/libdv-1.0.0-r3 does not emerge w/ sys-devel/gcc-7.1.0-r1[pie,ssp] ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gold-tracker
  Show dependency tree
 
Reported: 2017-06-25 05:35 UTC by Martin Väth
Modified: 2019-07-11 12:45 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,34.20 KB, text/x-log)
2017-06-25 05:35 UTC, Martin Väth
Details
emerge.info (emerge.info,4.50 KB, application/x-info)
2017-06-25 05:36 UTC, Martin Väth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2017-06-25 05:35:38 UTC
Created attachment 477914 [details]
build.log

media-libs/libdv-1.0.0-r3 fails during linking when emerging with sys-devel/gcc-7.1.0-r1[pie,ssp] when using the gold linker on an x86 system.

The failure does not occur on an amd64 system.

According to the error messages, USE=pie of gcc is perhaps related.

Adding
-fno-PIE -fno-pie -no-pie
-fno-stack-protector
-fuse-ld=bfd
to CFLAGS CXXFLAGS AFLAGS ASFLAGS AMFLAGS LDLAGS
or exporting LDFLAGS=/usr/bin/ld.bfd
did not help.

However,
binutils-config --linker ld.bfd
did.
Comment 1 Martin Väth 2017-06-25 05:36:11 UTC
Created attachment 477916 [details]
emerge.info
Comment 2 Michelangelo Scopelliti 2017-08-29 09:15:43 UTC
Same problem with gcc-6.4.0
Comment 3 Martin Väth 2018-01-26 05:16:41 UTC
The problem with -fuse-ld=bfd not working is that the generated
${WORKDIR}/${P}-abi_x86_32.x86/libtool
does not honour CFLAGS wherever it should: After
sed -i -e s/compiler_flags=$/compiler_flags=-fuse-ld=bfd/
for that file (once it has been generated in src_configure),
compilation runs through.
Comment 4 jorgicio 2019-06-06 14:56:18 UTC
(In reply to Martin Väth from comment #3)
> The problem with -fuse-ld=bfd not working is that the generated
> ${WORKDIR}/${P}-abi_x86_32.x86/libtool
> does not honour CFLAGS wherever it should: After
> sed -i -e s/compiler_flags=$/compiler_flags=-fuse-ld=bfd/
> for that file (once it has been generated in src_configure),
> compilation runs through.

Tried this and works flawlessly.

I had to do this because this package failed at build when I had to change the profile to the 17.1 and then had to rebuilt all /lib32 and /usr/lib32 packages.
libdv was the only package failed for me until I did your workaround.

Thanks!
Comment 5 Adrian Bassett 2019-06-19 13:04:44 UTC
(In reply to jorgicio from comment #4)
> (In reply to Martin Väth from comment #3)
> > The problem with -fuse-ld=bfd not working is that the generated
> > ${WORKDIR}/${P}-abi_x86_32.x86/libtool
> > does not honour CFLAGS wherever it should: After
> > sed -i -e s/compiler_flags=$/compiler_flags=-fuse-ld=bfd/
> > for that file (once it has been generated in src_configure),
> > compilation runs through.
> 
> Tried this and works flawlessly.
> 
> I had to do this because this package failed at build when I had to change
> the profile to the 17.1 and then had to rebuilt all /lib32 and /usr/lib32
> packages.
> libdv was the only package failed for me until I did your workaround.
> 
> Thanks!

Similar problem here - but on ~amd64, 17.1, gcc-9.1, gold linker.  Again, solution in https://bugs.gentoo.org/622662#c3 fixed things.
Comment 6 peteru 2019-07-11 12:45:45 UTC
Could the fix please be rolled out as an updated ebuild?