Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910291 - media-libs/libdv-1.0.0-r4 - fails to build with mold as system linker
Summary: media-libs/libdv-1.0.0-r4 - fails to build with mold as system linker
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-mold
  Show dependency tree
 
Reported: 2023-07-13 10:06 UTC by Bob Deblier
Modified: 2025-01-04 16:17 UTC (History)
1 user (show)

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


Attachments
build log (build.log,41.48 KB, text/x-log)
2023-07-13 10:07 UTC, Bob Deblier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Deblier 2023-07-13 10:06:43 UTC
ebuild info:

[ebuild   R    ] media-libs/libdv-1.0.0-r4::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB

Problem seems to occur during the 32-bit linking stage.


Reproducible: Always

Steps to Reproduce:
1. set up mold as system linker
2. emerge media-libs/libdv
3. link error
Actual Results:  

/bin/sh ../libtool --silent  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse  -O2 -pipe -march=native -Wall -version-info 4:3:0 -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -o libdv.la -rpath /usr/lib dv.lo dct.lo idct_248.lo weighting.lo quant.lo vlc.lo place.lo parse.lo bitstream.lo YUY2.lo YV12.lo rgb.lo audio.lo util.lo encode.lo headers.lo enc_input.lo enc_audio_input.lo enc_output.lo vlc_x86.lo quant_x86.lo idct_block_mmx.lo dct_block_mmx.lo rgbtoyuv.lo encode_x86.lo transpose_x86.lo  -lrt -lm 
mold: error: duplicate symbol: .libs/dct_block_mmx.o: .libs/vlc_x86.o: __i686.get_pc_thunk.bp
mold: error: duplicate symbol: .libs/rgbtoyuv.o: .libs/vlc_x86.o: __i686.get_pc_thunk.bp
mold: error: duplicate symbol: .libs/idct_block_mmx.o: .libs/vlc_x86.o: __i686.get_pc_thunk.bp
collect2: error: ld returned 1 exit status


Expected Results:  
Successful linking & emerge.

Can work around this by using GNU ld.
Comment 1 Bob Deblier 2023-07-13 10:07:40 UTC
Created attachment 865452 [details]
build log
Comment 2 Bob Deblier 2023-07-13 10:33:06 UTC
Probably to-be-linked with bug 830404.
Comment 3 Marcin Deranek 2024-11-20 17:32:41 UTC
Seems to be related to https://github.com/rui314/mold/issues/271
Comment 4 Larry the Git Cow gentoo-dev 2025-01-04 16:17:19 UTC
The bug has been closed via the following commit(s):

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

commit b7deee8cade4462ff88a83acfe0a996c158af32a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-04 15:53:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-04 15:54:59 +0000

    media-libs/libdv: misc fixes
    
    * Build with -std=gnu89 (bug #927212)
    
      I'm going to take a look at the patches attached there and may apply
      them in a new revision, but I wanted to get this out with the various
      fixes so far in stable first.
    
    * Force bfd (bug #910291)
    
    * Build with -fno-strict-aliasing -fno-aggressive-loop-optimizations (bug #877709)
    
    Bug: https://bugs.gentoo.org/877709
    Bug: https://bugs.gentoo.org/927212
    Closes: https://bugs.gentoo.org/910291
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libdv/{libdv-1.0.0-r4.ebuild => libdv-1.0.0-r5.ebuild}     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)