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

Bug 685522

Summary: media-video/transcode-1.1.7-r3 SYMLINK_LIB=no - ld: i386 architecture of input file `.../temp/encode_faac.so.2dXOgY.ltrans0.ltrans.o' is incompatible with i386:x86-64 output
Product: Gentoo Linux Reporter: Michael Egger <egger.m>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED OBSOLETE    
Severity: normal CC: arthurzam, martin.zwicknagl, todd, v10lator
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 861311    
Bug Blocks: 506276    
Attachments: build.log
build.log -fno-lto
emerge --info

Description Michael Egger 2019-05-10 14:04:19 UTC
Created attachment 575648 [details]
build.log

media-video/transcode-1.1.7-r3 fails to build after upgrading to the 17.1 profile.


ERROR: option '--enable-lame' failed: cannot link against libmp3lame
libmp3lame can be found in the following packages:
  lame  http://www.mp3dev.org/

ERROR: option '--enable-xvid' failed: cannot link against libxvidcore
libxvidcore can be found in the following packages:
  xvid  http://www.xvid.org/

ERROR: option '--enable-libdvdread' failed: cannot link against libdvdread
libdvdread can be found in the following packages:
  libdvdread  http://www.dtek.chalmers.se/groups/dvd/downloads.shtml

ERROR: option '--enable-a52' failed: cannot link against liba52
liba52 can be found in the following packages:
  liba52  http://liba52.sourceforge.net/

ERROR: option '--enable-faac' failed: cannot link against libfaac
libfaac can be found in the following packages:
  no  http://www.audiocoding.com/

ERROR: option '--enable-libjpeg' failed: cannot link against libjpeg
libjpeg can be found in the following packages:
  jpeg  ftp://ftp.uu.net/graphics/jpeg/

ERROR: option '--enable-iconv' failed: cannot find either iconv_open() or libiconv_open()
iconv_open() can be found in the following packages:
  libiconv  http://www.gnu.org/software/libiconv/
Comment 1 Michael Egger 2019-05-10 14:12:39 UTC
Created attachment 575650 [details]
build.log -fno-lto

Attached new logfile without LTO optimizations, which result in a more useful log file.

The linker attempts to search in the wrong directory as far as I can tell.

/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: i386 architecture of input file `/tmp/portage/media-video/transcode-1.1.7-r3/temp/encode_faac.so.2dXOgY.ltrans0.ltrans.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
Comment 2 Todd Walter 2019-08-30 14:49:41 UTC
I just got bit by this as well.  The build fails regardless of LTO/no-lto
Comment 3 Todd Walter 2019-08-30 14:52:15 UTC
Created attachment 588534 [details]
emerge --info
Comment 4 Todd Walter 2019-08-30 16:57:26 UTC
Doesn't work with fat LTO either. GCC 9.2 or 8.3 are also a bust
Comment 5 Martin Zwicknagl 2019-08-30 17:36:31 UTC
Hello,

I had the same problem with the linker ld.bfd transcode does NOT emerge. The error messages are:

ERROR: option '--enable-lame' failed: cannot link against libmp3lame
libmp3lame can be found in the following packages:
  lame  http://www.mp3dev.org/

ERROR: option '--enable-xvid' failed: cannot link against libxvidcore
libxvidcore can be found in the following packages:
  xvid  http://www.xvid.org/
...


When switching to linker ld.gold with 
    binutils-config --linker ld.gold
before emerge transcode, then transcode compiles

Do not forget to switch back to
    binutils-config --linker ld.bfd
afterwards

Maybe you could try this workaraound.
Comment 6 Thomas 2019-08-31 05:29:42 UTC
(In reply to Martin Zwicknagl from comment #5)
> Hello,
> 
> I had the same problem with the linker ld.bfd transcode does NOT emerge. The
> error messages are:
> 
> ERROR: option '--enable-lame' failed: cannot link against libmp3lame
> libmp3lame can be found in the following packages:
>   lame  http://www.mp3dev.org/
> 
> ERROR: option '--enable-xvid' failed: cannot link against libxvidcore
> libxvidcore can be found in the following packages:
>   xvid  http://www.xvid.org/
> ...
> 
> 
> When switching to linker ld.gold with 
>     binutils-config --linker ld.gold
> before emerge transcode, then transcode compiles
> 
> Do not forget to switch back to
>     binutils-config --linker ld.bfd
> afterwards
> 
> Maybe you could try this workaraound.

Thanks for this.

CFLAGS="-march=native -mprefer-avx128 -mvzeroupper -O2 -ftree-vectorize -ftree-slp-vectorize -mtls-dialect=gnu2 -pipe -fno-ident -flto=8 -fuse-linker-plugin -fno-fat-lto-objects -fdevirtualize-at-ltrans -fopenmp -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -fgraphite-identity -floop-nest-optimize -fipa-pta -fno-semantic-interposition -fno-common"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu ${CFLAGS}"
CFLAGS="${CFLAGS} -fno-lto -fno-use-linker-plugin"
LDFLAGS="${LDFLAGS} -fno-lto -fno-use-linker-plugin -Wl,-fuse-ld=gold"
LD="ld.gold"

Did not work but the following compiled:

CFLAGS="-march=native -mprefer-avx128 -mvzeroupper -O2 -ftree-vectorize -ftree-slp-vectorize -mtls-dialect=gnu2 -pipe -fno-ident"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-fuse-ld=gold"
LD="ld.gold"