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 (error: error: .libs/idct_block_mmx.o: relocation R_386_GOTOFF against preemptible symbol preSC cannot be used when making a shared object)
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:
: 721450 (view as bug list)
Depends on:
Blocks: systemwide-gold
  Show dependency tree
 
Reported: 2017-06-25 05:35 UTC by Martin Väth
Modified: 2021-11-07 04:55 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,34.20 KB, text/plain)
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?
Comment 7 Sam James archtester gentoo-dev Security 2021-11-07 04:52:33 UTC
(In reply to peteru from comment #6)
> Could the fix please be rolled out as an updated ebuild?

Sure. libtool should be handled fine now though.
Comment 8 Sam James archtester gentoo-dev Security 2021-11-07 04:53:13 UTC
*** Bug 721450 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2021-11-07 04:55:04 UTC
The bug has been referenced in the following commit(s):

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

commit 6f6a5c0fc9a0c0f91928dcd26a112eb2ceb8ae03
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-11-07 04:54:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-07 04:54:43 +0000

    media-libs/libdv: disable gold
    
    Upstream is dead so let's just workaround the failure.
    
    Bug: https://bugs.gentoo.org/622662
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libdv/libdv-1.0.0-r4.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)