Opened 12 years ago

Closed 11 years ago

#2994 closed defect (invalid)

compile error using --proc-opt in configure while using "Intel(R) Celeron(R) M processor"

Reported by: anonymous Owned by: Janne Grunau
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords: compile error asm register
Cc: Ticket locked: no

Description (last modified by stuartm)

make[2]: Entering directory `/usr/src/mythtv/libs/libavcodec'
ccache gcc -c -pipe -march=pentium4 -w -fomit-frame-pointer -Wall -Wno-switch -Os -fomit-frame-pointer -D_REENTRANT -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DLIBDIR=\"/usr/lib\" -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -DHAVE_XVMC -DHAVE_XVMC_VLD -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I.. -I../.. -I../libavutil -I../../../../include/qt3 -o motion_est.o motion_est.c
motion_est_template.c: In function 'qpel_motion_search':
motion_est_template.c:413: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
make[2]: *** [motion_est.o] Error 1
make[2]: Leaving directory `/usr/src/mythtv/libs/libavcodec'
make[1]: *** [sub-libavcodec] Error 2
make[1]: Leaving directory `/usr/src/mythtv/libs'
make: *** [sub-libs] Error 2

removing --enable-proc-opt from the configure removes this error.

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : Intel(R) Celeron(R) M processor         1.40GHz
stepping        : 8
cpu MHz         : 1396.565
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up
bogomips        : 2796.17

Change History (8)

comment:1 Changed 12 years ago by Janne Grunau

Owner: changed from Isaac Richards to Janne Grunau

comment:2 Changed 12 years ago by Janne Grunau

Resolution: fixed
Status: newclosed

(In [12651]) Fixes #2994 by disabling optimize=small for Celeron M processors they have at least 512kB Cache

Use -march=pentium3 for Pentium M and Celeron processors. It's more appropiate than pentium4 since they are both no NetBurst? processors.

More x86 <> x86_32 cleanup

comment:3 Changed 12 years ago by red321

Resolution: fixed
Status: closedreopened

I have exactly the same compile error using --enable-proc-opt. However I have an Athlon Duron 1600, and am using svn r12675

Options: --enable-dvb --enable-xvmc --enable-opengl-vsync --enable-xvmc-pro --e nable-proc-opt --prefix=/usr --disable-distcc --with-bindings=perl # Basic Settings Compile type release Compiler cache no DistCC no Install prefix /usr CPU x86 (model name : AMD Duron(tm) ) big-endian no MMX enabled yes

# Input Support Joystick menu yes lirc support yes Apple Remote no Video4Linux sup. yes ivtv support yes FireWire? support yes DVB support yes usr/include DBox2 support yes HDHomeRun sup. yes IPTV support yes

# Sound Output Support OSS support yes ALSA support yes aRts support yes JACK support yes DTS passthrough no

# Video Output Support x11 support yes xrandr support yes xv support yes XvMC support yes XvMC VLD support yes XvMC pro support yes XvMC OpenGL sup. no XvMC libs -lXvMCW Mac acceleration no OpenGL vsync yes DirectFB no

# Misc Features Frontend yes Backend yes

# Bindings bindings_perl yes Creating libs/libmyth/mythconfig.h and libs/libmyth/mythconfig.mak

WARNING: When using --enable-proc-opt you must include the

output of ./configure along with any bug report.

/proc/cpuinfo

processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : AMD Duron(tm) stepping : 1 cpu MHz : 1600.148 cache size : 64 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts bogomips : 3200.97

comment:4 Changed 12 years ago by Janne Grunau

(In [12686]) Refs #2994. use -O2 instead off -Os for --enable-small

-Os causes build problems with inlined asm after [12645]. fix overwriting --enable-small with --disable-proc-opt

this is only a temporary fix

comment:5 Changed 12 years ago by knowledgejunkie@…

I've been fighting latest SVN (12834, clean source 'svn export'ed from checkout) to compile at all on a slave machine, which I am trying to upgrade from a pre-12645 build. What I need to know is the correct incantion of flags to get a successful compile on a CeleronD (Prescott?) 2.4GHz CPU, as I don't seem to be able to get a build even without my normal 'enable-proc-opt' flag. This CPU has NetBurst? but (only) 256KB cache, so I'm not sure if I should configure as a pentium4 when running configure.

Compilation error (as with OP):

gcc -c -pipe -w -O3 -fomit-frame-pointer -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE -D_FILE
_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DLIBDIR=\"/usr/lib\" -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED
 -I/usr/lib/qt-3.3/mkspecs/default -I. -I.. -I../.. -I../libavutil -I/usr/lib/qt-3.3/include -o motion_est.o motion_est.c
motion_est_template.c: In function âumh_searchâ:
motion_est_template.c:755: error: can't find a register in class âGENERAL_REGSâ while reloading âasmâ
motion_est_template.c:758: error: can't find a register in class âGENERAL_REGSâ while reloading âasmâ
motion_est_template.c:765: error: can't find a register in class âGENERAL_REGSâ while reloading âasmâ
motion_est_template.c:773: error: can't find a register in class âGENERAL_REGSâ while reloading âasmâ

CPU info:

[root@marge mythtv]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 3
model name      : Intel(R) Celeron(R) CPU 2.40GHz
stepping        : 4
cpu MHz         : 2394.898
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips        : 4795.72


[root@marge mythtv]# uname -p 2
i686
[root@marge mythtv]# uname -m
i686

configure options:

./configure --prefix=/usr --disable-audio-arts --disable-audio-jack --disable-joystick-menu --disable-firewire --disable-iptv --disable-dbox2 --disable-hdhomerun --enable-dvb --dvb-path=/usr/include --enable-opengl-vsync --enable-dts

Due to major instability in this slave backend over the past week I took a closer look and noticed that all SVN upgrades had failed in the past 2 weeks, leaving the system stuck at stable 12477. My Athlon64 master backend and PentiumM laptop both compiled without any problems yesterday. When I delved into things earlier, I worried that my CPU was bad, but then saw this ticket and hope it can be resolved.

Thanks in advance for any advice, Nick Morrott

comment:6 Changed 12 years ago by knowledgejunkie@…

A quick update on my Intel Celeron D CPU issue - with many thanks to Simon Kenyon on the -dev list. (Gentoo safe flags http://gentoo-wiki.com/Safe_Cflags#Pentium_4_.28Prescott.29_.28Intel.29 recommend CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" for this CPU).

Compiling with "--cpu=prescott --enable-proc-opt" allowed the MythTV core to compile normally. I'll be monitoring for any further instability over the next few days. I note from the output below the use of -O3 instead of -O2 - should this extra optimisation affect anything other than code portability? What additional effect does enabling -proc-opt have?

Sample output from the compilation (the motion_est.c file which broke things earlier):

gcc -c -pipe -march=prescott -w -O3 -fomit-frame-pointer -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DPIC -fPIC  -DMMX -Di386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr\" -DLIBDIR=\"/usr/lib\" -DHAVE_AV_CONFIG_H -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/usr/lib/qt-3.3/mkspecs/default -I. -I.. -I../.. -I../libavutil -I/usr/lib/qt-3.3/include -o motion_est.o motion_est.c

Thanks, Nick

comment:7 Changed 12 years ago by stuartm

Description: modified (diff)
Status: newinfoneeded_new

Is this still an issue in current SVN? The ticket is nearly a year old.

comment:8 Changed 11 years ago by danielk

Resolution: invalid
Status: infoneeded_newclosed

no response to info needed in two months..

Note: See TracTickets for help on using tickets.