Bug 2949 - mozilla 1.3 fails to compile on pentium4's
: mozilla 1.3 fails to compile on pentium4's
Status: CLOSED FIXED
Product: Codex
Classification: Unclassified
Component: http
: devel grimoire
: x86 Linux
: P2 major
Assigned To: Grimoire Bug List
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-27 01:00 UTC by Eric Sandall
Modified: 2007-04-01 02:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Sandall 2003-03-27 01:00:03 UTC
jsdtoa.c 
jsdtoa.c: In function `JS_strtod': 
jsdtoa.c:1239: warning: `rv0' might be used uninitialized in this function 
jsdtoa.c:1874: unable to find a register to spill in class `AREG' 
jsdtoa.c:1874: this is the insn: 
(insn:QI 2402 2401 2403 (set (reg:CCNO 17 flags) 
        (compare:CCNO (and:SI (subreg:SI (reg/v:DI 21 rxmm0 [369]) 0) 
                (const_int 1 [0x1])) 
            (const_int 0 [0x0]))) 281 {testsi_1} (insn_list 2398 (nil)) 
    (expr_list:REG_DEAD (reg/v:DI 21 rxmm0 [369]) 
        (nil))) 
jsdtoa.c:1874: confused by earlier errors, bailing out 
 
In the directory  /usr/src/mozilla/js/src 
The following command failed to execute properly: 
gcc -o jsdtoa.o -c -DOSTYPE="Linux2.4" -DOSARCH="Linux" -DOJI 
-DEXPORT_JS_API -DJS_USE_SAFE_ARENA -I../../dist/include/js 
-I../../dist/include -I/usr/src/mozilla/dist/include/nspr -I. -I/usr/X11R6/include -fPIC 
-I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -pedantic 
-Wno-long-long -march=pentium4 -mmmx -mfpmath=sse -msse -msse2 -O3 -pthread 
-pipe -DNDEBUG -DTRIMMED -ffunction-sections -march=pentium4 -mmmx 
-mfpmath=sse -msse -msse2 -O3 -I/usr/X11R6/include -include ../../mozilla-config.h 
-DMOZILLA_CLIENT -Wp,-MD,.deps/jsdtoa.pp jsdtoa.c 
make[4]: *** [jsdtoa.o] Error 1 
make[4]: Target `libs' not remade because of errors. 
make[3]: *** [libs] Error 2 
make[2]: *** [tier_2] Error 2 
make[1]: *** [default] Error 2 
 ! Problem Detected ! 
 
If I remove "-O3" and "-z combreloc", also with just removing "-O3" and leaving "-z 
combreloc", I get this error: 
 
nsWeakReference.cpp 
nsComponentManagerUtils.cpp 
+++ making chrome /usr/src/mozilla/xpcom/base  => ../../dist/bin/chrome/en-US.jar 
tier_9: js/src/xpconnect intl modules/libjar  js/src/liveconnect js/jsd 
widget/src/gtksuperwin widget/src/gtkxtbin modules/libutil netwerk uriloader 
modules/libpref modules/libimg modules/oji caps rdf expat htmlparser gfx 
modules/libpr0n modules/plugin dom view widget content layout db docshell 
webshell profile embedding editor sun-java themes  accessible directory/xpcom xpfe 
xpinstall l10n toolkit 
make[3]: *** No rule to make target `export'. 
 ! Problem Detected !  
make[2]: *** [tier_9] Error 2 
make[1]: *** [default] Error 2 
 
If I leave "-O3", I get the above jsdtoa.o error. 
 
Any thoughts?
Comment 1 Eric Sandall 2003-03-27 01:14:40 UTC
Also, this guy seems to have the same problem, but I can't find any replies to his 
question:  http://www.geocrawler.com/mail/msg.php3?msg_id=9459458&list=118 
Comment 2 Eric Sandall 2003-03-27 01:24:34 UTC
Here's another, but I don't speak German:  
http://lists.berlios.de/pipermail/lrs-linux-dev/2002-October/001138.html 
 
I _think_ they want him to try with -march=i686 instead of -march=pentium4.  :) 
 
So...if I put the following in BUILD: 
 
export CFLAGS="${CFLAGS/pentium4/i686}" 
 
I get the following (yes, another, different error :(): 
 
cd misc; /usr/bin/make export 
prdtoa.c: In function `PR_strtod': 
prdtoa.c:1235: warning: `bb' might be used uninitialized in this function 
prdtoa.c:1235: warning: `bd' might be used uninitialized in this function 
prdtoa.c:1235: warning: `bs' might be used uninitialized in this function 
prdtoa.c:1235: warning: `delta' might be used uninitialized in this function 
prdtoa.c: In function `PR_dtoa': 
prdtoa.c:1937: warning: `ilim' might be used uninitialized in this function 
prdtoa.c:1937: warning: `ilim1' might be used uninitialized in this function 
prdtoa.c:1939: warning: `spec_case' might be used uninitialized in this function 
prdtoa.c:1945: warning: `mlo' might be used uninitialized in this function 
{standard input}: Assembler messages: 
{standard input}:3843: Error: suffix or operands invalid for `movd' 
{standard input}:4542: Error: suffix or operands invalid for `movd' 
make[6]: *** [prdtoa.o] Error 1 
make[6]: Target `export' not remade because of errors. 
make[5]: *** [export] Error 2 
misc/prdtoa.c: In function `PR_strtod': 
misc/prdtoa.c:1235: warning: `bb' might be used uninitialized in this function 
misc/prdtoa.c:1235: warning: `bd' might be used uninitialized in this function 
misc/prdtoa.c:1235: warning: `bs' might be used uninitialized in this function 
misc/prdtoa.c:1235: warning: `delta' might be used uninitialized in this functio 
n 
misc/prdtoa.c: In function `PR_dtoa': 
misc/prdtoa.c:1937: warning: `ilim' might be used uninitialized in this function 
misc/prdtoa.c:1937: warning: `ilim1' might be used uninitialized in this functio 
n 
misc/prdtoa.c:1939: warning: `spec_case' might be used uninitialized in this fun 
ction 
misc/prdtoa.c:1945: warning: `mlo' might be used uninitialized in this function 
{standard input}: Assembler messages: 
{standard input}:3843: Error: suffix or operands invalid for `movd' 
{standard input}:4542: Error: suffix or operands invalid for `movd' 
make[5]: *** [misc/./prdtoa.o] Error 1 
make[5]: Target `export' not remade because of errors. 
make[4]: *** [export] Error 2 
make[3]: *** [export] Error 2 
make[3]: Target `all' not remade because of errors. 
make[3]: Target `all' not remade because of errors. 
make[2]: *** [nspr] Error 2 
make[1]: *** [default] Error 2 
Comment 3 Eric Sandall 2003-03-27 02:01:06 UTC
More information from bugs-gcc: 
 
http://gcc.gnu.org/ml/gcc-bugs/2002-11/msg00481.html 
 
They say to replace -march=pentium4 -mcpu=pentium4 with -march=i686 
-mcpu-i686.  Which _did_ get rid of that error, but caused another.... 
Comment 4 kyle 2003-03-28 17:52:18 UTC
I got it to compile fine on my pentium 4 1.9ghz. I had to remove all the 
compilation options ie; speedy,risky,combreloc,tiny,strip.

-Kyle
Comment 5 Eric Sandall 2003-03-28 18:06:10 UTC
I tried that, too.  I'll try again, and if not, I'll try again with
-mcpu/march=i686 as well.
Comment 6 Eric Sandall 2003-03-30 00:34:07 UTC
I just got it to compile on her P4 by removing all options (-O3, -z combreloc,
etc.) AND changing the architecture to i686 (instead of pentium4).  Will try
again with all the same but using pentium4 (I believe I've already tried this,
but just to check).
Comment 7 Eric Sandall 2003-03-30 01:32:06 UTC
Compiled with pentium4 and no other optimizations set.  Will try with all BUT
"-z combreloc" (LDFLAG setting).
Comment 8 Eric Sandall 2003-03-30 01:39:56 UTC
Broke.  Now trying with

export  CFLAGS="${CFLAGS/\-O3/}

in BUILD.  If that works, will try with that and "-z combreloc".  Perhaps just
"-O3" breaks mozilla...
Comment 9 Eric Sandall 2003-03-30 02:44:28 UTC
Well, that worked...so it seems to be the "-O3".  The g/f needs her computer
back, so I'll try with "-z combreloc" tomorrow.  :)
Comment 10 Eric Sandall 2003-03-30 12:52:19 UTC
That worked as well.

Looks like we need something such as the following in BUILD:

if  grep -q  pentium4 "echo  ${CFLAGS}"
then
  export  CFLAGS="${CFLAGS/-O3/}"
fi

I got mozilla to compile with the following:   -march=pentium4 -mmmx
-mfpmath=sse -msse -msse2   -z combreloc

Though I find references to both -O2 and -O3 in the compile log....weird...
Comment 11 Sergey Lipnevich 2003-04-05 00:37:54 UTC
I've put this condition in. I remember we had something like this, regardless of
the CPU type, in the past revisions of Mozilla's BUILD. Please reopen the bug if
the problem is not cured.
Comment 12 Steven Fodstad 2003-06-29 01:52:47 UTC
This bug is cured by gcc 3.3, as per the gcc bugzilla thread:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8994

I checked to make sure (commented the export CFLAGS line and added an echo to
stymie a syntax error).  My CFLAGS="-march=pentium4 -mmmx -mfpmath=sse -msse
-msse2 -O3  -z combreloc"  No problems under 1.4b

I recommend removing the fix or adding an additional check for gcc 3.2.x
Comment 13 Sergey Lipnevich 2003-06-29 11:46:02 UTC
Great news, thank you for your work!
Comment 14 Sergey Lipnevich 2003-06-29 11:49:55 UTC
Fixed in devel grimoire.
Comment 15 Eric Sandall 2003-07-03 18:12:47 UTC
Verification...
Comment 16 Eric Sandall 2003-07-03 18:15:50 UTC
Closure....
Comment 17 Jeremy Blosser 2007-04-01 01:05:38 UTC
reassign to sm-grimoire-bugs