Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524282 - media-video/mplayer2 injects -march=... -mtune=... into CFLAGS
Summary: media-video/mplayer2 injects -march=... -mtune=... into CFLAGS
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Nikoli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-02 13:10 UTC by David Flogeras
Modified: 2015-03-15 09:21 UTC (History)
3 users (show)

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


Attachments
media-video:mplayer2-2.0_p20130428-r1:20140823-092249.log.xz (media-video:mplayer2-2.0_p20130428-r1:20140823-092249.log.xz,14.57 KB, application/x-xz)
2014-10-02 20:55 UTC, Jeroen Roovers (RETIRED)
Details
build log from x86 chroot (build.log.xz,8.66 KB, application/x-xz)
2014-10-02 21:13 UTC, David Flogeras
Details
emerge --info from x86 chroot (emerge_info.xz,2.80 KB, application/x-xz)
2014-10-02 21:13 UTC, David Flogeras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2014-10-02 13:10:54 UTC
I build binaries for my aging machines on my most powerful machine.  Since smplayer now uses mplayer2 (was mplayer) as its backend I ran into this issue.  When building mplayer2 inside of my 32bit chroot, the resulting binary crashes with an illegal instruction.  Firstly, no my chroot make.conf does not use -march=native.

At first I suspected that maybe I had botched the sse/mmx USE flags, but putting the binary in gdb shows the instruction was ANDN (which is part of BMI1 instruction set introduced in Haswell, which the build host is).

After looking closer, it seems that the mplayer2 build system is injecting it's own -march=native -mtune=native in the CFLAGS in the generated config.mak.

I can "fix" it by running ebuild /usr/portage/.../mplayer2-2.0_p20130428-r1 configure, hand editing the config.mak to remove the "native" CFLAGS (my original ones are also in there), and then letting the ebuild continue.  I do not know how to properly fix it though.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-02 20:43:26 UTC
1) Please post your `emerge --info media-video/mplayer2' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-02 20:55:25 UTC
Created attachment 385952 [details]
media-video:mplayer2-2.0_p20130428-r1:20140823-092249.log.xz

Confirmed.
Comment 3 David Flogeras 2014-10-02 21:13:37 UTC
Created attachment 385954 [details]
build log from x86 chroot
Comment 4 David Flogeras 2014-10-02 21:13:57 UTC
Created attachment 385956 [details]
emerge --info from x86 chroot
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-03 07:02:07 UTC
It differes based on whether USE=cpudetection is set. ./configure will gladly use whatever CPU it finds on the system. An entire section of configure should probably be ripped out.
Comment 6 Nikoli 2014-10-04 07:55:09 UTC
media-video/mplayer has USE cpudetection and similar build system, does it have same behaviour for you?
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-04 10:11:18 UTC
(In reply to Nikoli from comment #6)
> media-video/mplayer has USE cpudetection and similar build system, does it
> have same behaviour for you?

Are you asking this because you couldn't possibly begin to check how mplayer does that yourself? This bug is about mplayer2.
Comment 8 David Flogeras 2014-10-04 10:20:42 UTC
In the same build environment, mplayer with default USE="-cpudetection" does _not_ exhibit this problem.  If you check the generated config.mak, there is no mention of -march=native (that is, as long as you didn't specify it yourself).
Comment 9 Ben de Groot (RETIRED) gentoo-dev 2015-03-15 09:21:26 UTC
mplayer2 is abandoned and last-rited