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

Bug 293744

Summary: mythtv compile fails with gcc-4.4.2
Product: Gentoo Linux Reporter: Robert Bradbury <robert.bradbury>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: N/A
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Robert Bradbury 2009-11-19 16:35:10 UTC
Attempting to emerge mythtv-0.22_p22824 fails to compile with gcc-4.4.2.

When compiling x86/flacdsp_mmx.c
one gets the error:
x86/flacdsp_mmx.c: In function 'ff_flac_compute_autocorr_sse2':
x86/flacdsp_mmx.c:87: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
x86/flacdsp_mmx.c:87: error: 'asm' operand has impossible constraints
x86/flacdsp_mmx.c:116: error: 'asm' operand has impossible constraints

Several recent versions of mythtv have failed to compile due to asm() errors.

Reproducible: Always

Steps to Reproduce:
1. enable media-tv/mythtv ~x86 in /etc/package.keywords
2. emerge mythtv

Actual Results:  
flacdsp_mmx.c fails to compile on the x86 due to a lack of registers.

Expected Results:  
mythtv should compile or there should be some constraint in the ebuild regarding exactly what version of gcc should be used.  I was running an earlier version of gcc but upgraded to 4.4.2 when mythtv 0.22_p22772 failed on other asm() errors when compiling h264.c in cabac.h.

The ebuild needs to be fixed as there is now a constraint in the mythtv configure process that prevents it from building on an x86 with -mmx.

When building mythtv with -mmx it is now necessary to add to the configure options the switch "--enable-disable-mmx-for-debugging" because apparently the mythtv developers want you to know that "MythTV will be very slow".

If somebody does get the cutting edge of mythtv to compile please add the gcc version and USE flags (emerge -pv mythtv) to this report so there will be some clue as to how to work around these problems.  Right now it looks like one has to stick with mythtv-0.21_p20877 which is about 5 months old.
Comment 1 Robert Bradbury 2009-11-19 16:37:21 UTC
Created attachment 210633 [details]
emerge --info

Shows I'm using gcc-4.4.2.
Comment 2 Rafał Mużyło 2009-11-19 17:13:18 UTC
Nothing to do with gcc.
It's the recent ffmpeg sources hating pic safety
on x86.
Comment 3 Robert Bradbury 2009-11-19 19:17:31 UTC
Rafal, I'd agree with your statement possibly regarding the previous h264 errors (I did at one point browse the Gentoo bug report involving the PIC problems) but I'm reluctant to say that the flacdsp_mmx.c error falls into the ffmpeg bin.  First of all flac is a sound encoder not a video encoder.  Second of all mmx is a standard feature of all x86 processors.  So there is the issue of *what* C compiler and/or libraries is mythtv being released with.  If one is writing assembler into the C code which is supposed to work on a specific architecture then one is presumably testing it with *some* compiler (be it gcc or some other) so there appears to be some disconnect from the mythtv developers to the gentoo repackagers (unless the mythtv developers have basically gone to a 64 bit architecture and given up on the 32 bit architectures -- which would presumably be unfortunate given the hundreds of millions of x86 machines in the world).
Comment 4 Rafał Mużyło 2009-11-19 20:22:45 UTC
Well, take a look at bug 290741:
while it's not quite the same and
I didn't exactly looked at mythtv sources,
still certain function names seem suspiciously
similar - perhaps it's not directly ffmpeg related,
maybe mythtv based something on ffmeg code,
still it fails the same way.
Comment 5 Sebastian Luther (few) 2009-11-20 10:05:21 UTC

*** This bug has been marked as a duplicate of bug 292421 ***