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

Bug 426248

Summary: media-libs/libvpx-1.1.0 builds with incorrectly -m64 on x32
Product: Gentoo Linux Reporter: devsk <funtoos>
Component: [OLD] LibraryAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    

Description devsk 2012-07-12 04:00:20 UTC
media-libs/libvpx-1.1.0 builds fine but does not link with anything e.g. it makes ffmpeg fail like this:

x86_64-pc-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -fno-lto -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -fno-lto -std=c99 -fomit-frame-pointer -fPIC -pthread -I/usr/include/freetype2 -D_REENTRANT -c -o /var/tmp/portage/media-video/ffmpeg-0.10.3/temp/ffconf.KzVhTxDm.o /var/tmp/portage/media-video/ffmpeg-0.10.3/temp/ffconf.6BaXip8h.c
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=gnu -fno-lto -Wl,--as-needed -o /var/tmp/portage/media-video/ffmpeg-0.10.3/temp/ffconf.kYhDgC4W /var/tmp/portage/media-video/ffmpeg-0.10.3/temp/ffconf.KzVhTxDm.o -lvpx -lvorbisenc -lvorbis -logg -lvo-aacenc -ltheoraenc -ltheoradec -logg -lpulse-simple -lpulse -lopenjpeg -lmp3lame -lfreetype -lfaac -ldc1394 -lgnutls -lm -pthread -lbz2 -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../libx32/libvpx.so when searching for -lvpx
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/../libx32/libvpx.so when searching for -lvpx
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/libx32/libvpx.so when searching for -lvpx
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lvpx
collect2: error: ld returned 1 exit status
ERROR: libvpx decoder version must be >=0.9.1

The reason is that /usr/libx32/libvpx.so* is a 64-bit binary. Here is the compile/link line from vpx build:

x86_64-pc-linux-gnu-gcc  -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -m64 -fomit-frame-pointer -O3 -fPIC -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=native -fforce-addr -fomit-frame-pointer -pipe -ftracer -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wunused-but-set-variable -Wno-unused-function -I. -I"/var/tmp/portage/media-libs/libvpx-1.1.0/work/libvpx-v1.1.0" -M vpx_ports/x86_cpuid.c | sed -e 's;^\([a-zA-Z0-9_]*\)\.o;vpx_ports/\1.c.o vpx_ports/x86_cpuid.c.d;' > vpx_ports/x86_cpuid.c.d

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2012-09-25 05:38:06 UTC
the lib now builds as x32, and seems to work with mmx/sse, but the sse2 code seems to have a bug, so i would avoid that USE flag for now

Commit message: Initial x32 ABI support
http://sources.gentoo.org/media-libs/libvpx/files/libvpx-1.1.0-x32.patch?rev=1.1
http://sources.gentoo.org/media-libs/libvpx/libvpx-1.1.0.ebuild?r1=1.14&r2=1.15
Comment 2 Alexis Ballier gentoo-dev 2013-06-25 16:47:16 UTC
(In reply to SpanKY from comment #1)
> the lib now builds as x32, and seems to work with mmx/sse, but the sse2 code
> seems to have a bug, so i would avoid that USE flag for now
> 
> Commit message: Initial x32 ABI support
> http://sources.gentoo.org/media-libs/libvpx/files/libvpx-1.1.0-x32.
> patch?rev=1.1
> http://sources.gentoo.org/media-libs/libvpx/libvpx-1.1.0.ebuild?r1=1.14&r2=1.
> 15

closing then