Compilation of media-libs/gavl-1.4.0 for x32 ARCH fail with the following : libtool: compile: x86_64-pc-linux-gnux32-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl -I../include/gavl -I/var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/include -I/var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/include/gavl -I../include -D__GAVL__ -march=native -O2 -pipe -fomit-frame-pointer -Wall -Wmissing-declarations -Wdeclaration-after-statement -fvisibility=hidden -c /var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl/cputest.c -fPIC -DPIC -o .libs/cputest.o /var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl/cputest.c: Assembler messages: /var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl/cputest.c:75: Error: operand type mismatch for `pop' /var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl/cputest.c:78: Error: operand type mismatch for `push /var/tmp/portage/media-libs/gavl-1.4.0/work/gavl-1.4.0/gavl/cputest.c:81: Error: operand type mismatch for `pop' make[2]: *** [cputest.lo] Error 1 Attached a complete build log, and emerge --info Reproducible: Always
Created attachment 350112 [details] build.log
Created attachment 350114 [details] emerge --info
I'm compiling using MSYS/MinGW/gcc on Windows and got the same error. However, only for the 64 bit build, not for 32 bits. Also Bertrands build.log and emerge --info output tell, its a 64 bit architecture. The error is in the code to find out if the processor supports multimedia instructions. I was able to skip the assembly code with: --- gavl/cputest.c.old 2014-05-22 13:46:31 +0000 +++ gavl/cputest.c 2014-05-22 13:44:30 +0000 @@ -65,7 +65,7 @@ int gavl_accel_supported() { -#ifdef ARCH_X86 +#if defined(ARCH_X86) && !defined(ARCH_X86_64) int rval = 0; int eax, ebx, ecx, edx; int max_std_level, max_ext_level, std_caps=0, ext_caps=0; gavl 1.4.0 is from 2012-06-08, I used the current code from: http://sourceforge.net/p/gmerlin/code/HEAD/tree/trunk/gavl/ http://sourceforge.net/p/gmerlin/code/HEAD/tarball?path=/trunk/gavl Commit [r4204] But the error is there too. Simply apply the little patch. E*
Bug fixed here: https://sourceforge.net/p/gmerlin/code/4209/#diff-1
(In reply to Gerrit M. Albrecht from comment #4) > Bug fixed here: > > https://sourceforge.net/p/gmerlin/code/4209/#diff-1 ACK. Why not use __ILP32__ as stated on https://sites.google.com/site/x32abi/ ?
Bertrand has submitted a Pull Request for this at: https://github.com/gentoo/gentoo/pull/170 Please review it and let us know if it's ok to merge.
commit b3c6cf1eee6fb13c4a92ed82eb9d6fe3192bf471 Merge: 4bbf3c6 d7673d3 Author: Michał Górny <mgorny@gentoo.org> Date: Sat Oct 10 10:39:05 2015 +0200 media-libs/gavl: Merge "Add patch for x32" Pull-Request: https://github.com/gentoo/gentoo/pull/170