Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc...

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


noreply at mythtv

Apr 3, 2012, 3:41 PM

Post #1 of 13 (283 views)
Permalink
Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc...

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
-------------------------------+--------------------------------------
Reporter: andrew@… | Type: Bug Report - General
Status: new | Priority: minor
Milestone: 0.24.3 | Component: MythTV - General
Version: 0.24.2 | Severity: medium
Keywords: c3 cmov configure | Ticket locked: 0
-------------------------------+--------------------------------------
On gentoo using the media-tv/mythtv-0.24.2_p20120315 ebuild ./configure
uses --enable-proc-opt which incorrectly assumes that my Ezra CPU has cmov
extensions etc...
When it has compiled the binary crashes with 'illegal instruction' trying
to run mythtv-setup

Attempting to work around this by passing --tune=c3 --arch=i586 --enable-
mmx --enable-amd3dnow --enable-memalign-hack --disable-sse --disable-ssse3
--disable-amd3dnowext --cpu=c3 etc....

Seems this bug appeared 5 years ago and was squashed - but it seems to
have come back.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 3, 2012, 5:10 PM

Post #2 of 13 (277 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+---------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.24.3
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Won't Fix
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+---------------------------
Changes (by wagnerrp):

* status: new => closed
* resolution: => Won't Fix
* component: MythTV - General => Packaging


Comment:

I'm closing this one Won't Fix. 0.25 is due for release in under a week,
after which I intend to drop the 0.24 ebuilds from our repository. All
support for XvMC playback has been removed from 0.25, effectively ending
the old 586-class C3 as a viable platform for MythTV.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 4, 2012, 5:54 AM

Post #3 of 13 (269 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+---------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.24.3
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Won't Fix
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+---------------------------

Comment (by Simon Kenyon <simon@…>):

will this make it unusable as a slave backend?

this was what i was just in the process of setting up.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 4, 2012, 6:21 AM

Post #4 of 13 (275 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+---------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.24.3
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Won't Fix
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+---------------------------

Comment (by danielk):

Simon, it will still work as a backend. If you can come up with a simple
patch for configure, we'll apply it.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 4, 2012, 11:34 AM

Post #5 of 13 (268 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+---------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.24.3
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Won't Fix
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+---------------------------

Comment (by andrew@…):

A slave backend is what I'm setting up as well - the 250 watts my P4
backend was pulling made the cupboard rather hot and caused the Mrs to
turn it off - not too good for what should be an always on box. - 67 watts
under full load with the c3 looks more likely to survive the heat police,
and it's quieter :-)

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 4, 2012, 11:41 AM

Post #6 of 13 (268 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+---------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: 0.24.3
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Won't Fix
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+---------------------------

Comment (by andrew@…):

Master backend is what I meant - not that it makes much difference.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 5, 2012, 11:09 AM

Post #7 of 13 (268 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution:
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------
Changes (by mdean):

* status: closed => new
* resolution: Won't Fix =>
* milestone: 0.24.3 =>


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:6>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 5, 2012, 11:17 AM

Post #8 of 13 (273 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------
Changes (by mdean):

* status: new => closed
* resolution: => Upstream Bug


Comment:

Re-closing as an upstream bug.

As mentioned in http://www.mythtv.org/pipermail/mythtv-
dev/2012-April/072079.html , the problem is that the compiler and
underlying system thinks it's a Pentium-2-based system (where Pentium 2
supports cmov). Since configure asks the compiler for proper native
configuration information, we end up getting incorrect information and
building for the wrong arch. Workarounds are described in the linked
post, but the proper solution is to fix the underlying compiler/system.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 6, 2012, 2:56 AM

Post #9 of 13 (268 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------

Comment (by Simon Kenyon <simon@…>):

the problem "might" be because the OP has not rebuilt gcc with their new
CFLAGS since installing the system. or maybe they did not change the
CFLAGS after installing the system.

one solution would be to assume that the CFLAGS, etc in /etc/make.conf are
correct and not call "strip-flags" in the ebuild.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:8>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 9, 2012, 11:35 AM

Post #10 of 13 (246 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------

Comment (by andrew@…):

This explains why searching for cmov instructions on my machine returns so
many positives even with i586-pc-linux-gnu as CHOST!

I have now rebuilt gcc (emerge -1av gcc) on the c3 machine (previous
compile was done in an NFS exported CHROOT on my core2 :-), two days later
it still thinks that -march=native == -march=pentium2 even though gcc
configure includes --with-arch=i586.
4.6.2 and 4.4.4 ebuilds (chroot compiled) both have the problem. 3.4.6
(gcc of a c3-ish vintage) doesn't support -march=native and probably won't
compile most of the rest of gentoo anyway...

Anyhow currently have the backend up and running by <ctrl-c>-ing emerge
mythtv after configure had finished, re-running configure manually (after
adding the correct options for my c3 to the standard configure command)
then running "ebuild /path/to/mythtv.ebuild compile" followed by "ebuild
/path/to/mythtv.ebuild qmerge"

Thanks for the help chaps! - Will post a reference to the upstream bug /
and or a work-around if I find one. (Once I work out if it's a gcc or a
gentoo specific issue that is :-).

(Who ignored that good advice in the wiki not to try running mythtv on
gentoo or old hardware....)

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:9>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 14, 2012, 2:10 PM

Post #11 of 13 (255 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------

Comment (by andrew@…):

Right here's what I found out:

1) -march=native is broken for the c3 in all versions of gcc from
gcc-4.4.4 to gcc-4.6.2 and probably current (see
[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45359]) which includes a
patch to enable the correct flags for my processor.

2) after applying this patch to GCC and re-installing it, mythtv
./configure --enable-proc-opt on the c3 box disables cmov but still gets
some of the options wrong (see attached) you get:[[BR]]
CPU: x86 x86_32 (VIA Ezra), MMX=yes, MMX2=yes, 3DNow!=yes, 3DNow!
extended=yes, SSE=yes, SSSE3=yes, CMOV=no.[[BR]]
Should be: [[BR]]
mmx=yes, mmx2=no, amd3dnow=yes, amd3dnowext=no, sse=no, SSE3=yes, cmov=n

ffmpeg ./configure seems to have a similar problem by the way - if this
is what you are using as a template.

3) if you pass the -ffast-math option to gcc versions gcc-4.4.4 to
gcc-4.6.2 (and probably current) when used as a linker it adds cmovne
instructions into the linked code even if -march=c3 is set. (gcc-3.4.6
doesn't do this) - this explains most of the cmov instructions I found in
my gentoo i586-pc-linux-gnu with -march=c3 CFLAGS system (also appear in
my -march=k6-3 laptop buy the way) - that and the icedtea-bin files which
isn't that surprising really - I'm still trying to wheedle out the rest
and pluck up the courage to file a gcc bug...

4) I spent ages trying to work out where
/mythtv/external/FFmpeg/libavformat/libmythavformat.so.52 was getting cmov
instructions from then discovered it has the function name
'<mov_read_cmov>' in it which was giving me a false positive - doh! (see
my find cmov script, again shamelessly stolen from someone else attached)

I have found that the rest of gentoo's ebuilds don't seem to mind being
merged in a chroot using my core2 - even ffmpeg - they continue to honor
my -march=c3 CFLAGS in make.conf. For this reason (and as compiling on the
C3 itself even with distcc just takes forever) I would suggest that
:[[BR]]
a) mythtv's ebuilds be updated to honour any -march CFLAGS in make.conf
(as suggested by Simon Kenyon above) - by all means continue to strip -Ox
and other stuff out [[BR]]
b) the ./configure script be updated to set the correct options for VIA
processors (see the patch in
[http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45359] as a starting point
which seems sensible and works for me - anyone out there got a cyrix to
fill in the 'fixme'?)

I did have a go at creating a new ebuild so I could test a configure patch
myself but the GIT overlay magic got me royally confused when it started
downloading another version of mythtv using my new ebuild's name (I've got
a serious learning curve by the looks of things!). If someone could point
me to the right part of the configure files and explain what's happening
with the ebuild I would be happy to give it another try though.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:10>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 14, 2012, 4:25 PM

Post #12 of 13 (239 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------

Comment (by Simon Kenyon <simon@…>):

for what it is worth i just rebuilt my epia machine to use as a slave
backend.
i downloaded an minimal iso, installed the base system and updated
/etc/make.conf
i did and emerge world and then i installed enough so that i could emerge
git head mythtv (hacking the ebuild to not strip-flags)
the result is a working mythbackend.

i have not had to do anything special to gcc so i am not sure why you are
having such problems.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:11>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 20, 2012, 11:54 AM

Post #13 of 13 (231 views)
Permalink
Re: Ticket #10542: configure incorrectly detects VIA c3 and enables cmov etc... [In reply to]

#10542: configure incorrectly detects VIA c3 and enables cmov etc...
----------------------------------+------------------------------
Reporter: andrew@… | Owner:
Type: Bug Report - General | Status: closed
Priority: minor | Milestone:
Component: Packaging | Version: 0.24.2
Severity: medium | Resolution: Upstream Bug
Keywords: c3 cmov configure | Ticket locked: 0
----------------------------------+------------------------------

Comment (by andrew@…):

You're right Simon. I've also now commented out the following lines in my
e-build and it works fine, even cross-compiling on the core2 :-). By
making the ebuild use -march=c3 (from make.conf) rather than letting it
assume -march=native, the gcc bug never comes into play. [[BR]]
#strip-flags[[BR]]
#filter-flags "-march=*" "-mtune=*" "-mcpu=*"[[BR]]
#filter-flags "-O" "-O?"[[BR]]
and[[BR]]
#CFLAGS=""[[BR]]
#CXXFLAGS=""[[BR]]
I also haven't had any obvious problems with sse and friends being set to
yes (including using the box for commflagging). I guess it must auto-
detect cpu capabilities at runtime.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10542#comment:12>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.