Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 562208 - media-video/cinelerra-20140710 with sys-devel/gcc-5.2.0 - mmx.h:118:2: error: ‘asm’ operand has impossible constraints
Summary: media-video/cinelerra-20140710 with sys-devel/gcc-5.2.0 - mmx.h:118:2: error:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-10-04 09:50 UTC by Markus Walter
Modified: 2015-10-10 09:06 UTC (History)
1 user (show)

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


Attachments
emerge --info (info.txt,6.23 KB, text/plain)
2015-10-04 09:50 UTC, Markus Walter
Details
build log (cinelerra-20140710:20151004-084914.log,161.36 KB, text/plain)
2015-10-04 09:50 UTC, Markus Walter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2015-10-04 09:50:10 UTC
Created attachment 413678 [details]
emerge --info

On my hardened ~amd64 machine with gcc-5.2.0 I see the following failure for cinelerra.

ibtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../libmpeg3 -D__STDC_CONSTANT_MACROS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_MMX -DUSE_MMX -DX86_CPU -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex -DENCORE_INCLUDE=\"encore50/encore.h\" -I/usr/include/libavcodec -I/usr/include/libswscale -DHAVE_SWSCALER -O2 -pipe -march=native -ggdb -floop-interchange -floop-strip-mine -floop-block -finline-functions -Wformat -Werror=format-security -c libdv.c  -fPIC -DPIC -o .libs/libdv.o
In file included from libdv.c:13:0:
mmx.h: In function ‘mm_support’:
mmx.h:118:2: error: ‘asm’ operand has impossible constraints
  __asm__ __volatile__ (
  ^
Comment 1 Markus Walter 2015-10-04 09:50:35 UTC
Created attachment 413680 [details]
build log
Comment 2 Alexis Ballier gentoo-dev 2015-10-09 13:54:26 UTC
it'd be worth to report a minimal test case upstream.

clobber list is: "eax", "ebx", "ecx", "edx"

which seems plenty enough to be able to solve it; but since, basically, inline asm is defined by what gcc supports, they might reply some of these registers are reserved, which means it'd have to be patched here, but before that I'd like to have a clear statement on what's wrong.
Comment 3 Alexis Ballier gentoo-dev 2015-10-09 14:00:21 UTC
Hmmm:

/*
 * Drop mm_support() and mmx_ok() as these do not build with clang and
 * are unused by Cinelerra CV.  Inspired by change found in
 * <URL: http://hg.libsdl.org/SDL/file/32f0f603a0c8/src/video/mmx.h >
 */


So, it might be even simpler by ifdefing that stuff out (but maybe still worth reporting to gcc upstream so that they can have a look at it)
Comment 4 Magnus Granberg gentoo-dev 2015-10-09 18:56:26 UTC
You may be hit by -fstack-check it need one registers to work
and it is default on hardened.
check if it works if you pass -fstack-check=no
Comment 5 Alexis Ballier gentoo-dev 2015-10-10 08:37:59 UTC
(In reply to Magnus Granberg from comment #4)
> You may be hit by -fstack-check it need one registers to work
> and it is default on hardened.
> check if it works if you pass -fstack-check=no

no, that's not it, I have it without hardened too, and clobbering only "eax" makes it fail the same way. anyway, this asm seems very wrong, and I'm not even sure "eax" is valid on amd64.
Comment 6 Alexis Ballier gentoo-dev 2015-10-10 09:06:08 UTC
commit cc1aa656e022d809b2e9d2ef64c2c4360c75a9d3
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Sat Oct 10 11:04:52 2015 +0200

    media-video/cinelerra: Fix build with gcc 5.2 by disabling old useless code. Bug #562208.



this code was definitely buggy and useless, so I went the simple way :)