Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472288 - =media-libs/gavl-1.4.0-r1 on x32 - .../work/gavl-1.4.0-r1/gavl/cputest.c:75: Error: operand type mismatch for `pop'
Summary: =media-libs/gavl-1.4.0-r1 on x32 - .../work/gavl-1.4.0-r1/gavl/cputest.c:75: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: x32 512646
  Show dependency tree
 
Reported: 2013-06-04 14:28 UTC by Bertrand Jacquin
Modified: 2015-10-10 08:42 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,115.21 KB, text/x-log)
2013-06-04 14:28 UTC, Bertrand Jacquin
Details
emerge --info (info.log,15.78 KB, text/x-log)
2013-06-04 14:29 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2013-06-04 14:28:35 UTC
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
Comment 1 Bertrand Jacquin 2013-06-04 14:28:45 UTC
Created attachment 350112 [details]
build.log
Comment 2 Bertrand Jacquin 2013-06-04 14:29:19 UTC
Created attachment 350114 [details]
emerge --info
Comment 3 Gerrit M. Albrecht 2014-05-22 14:15:05 UTC
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*
Comment 4 Gerrit M. Albrecht 2014-06-05 08:02:42 UTC
Bug fixed here:

https://sourceforge.net/p/gmerlin/code/4209/#diff-1
Comment 5 Bertrand Jacquin 2014-06-07 11:55:47 UTC
(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/ ?
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-10 07:39:50 UTC
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.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-10 08:42:38 UTC
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