firefox does not work currently with a 64 bit kernel and a full 32 bit userland

RESOLVED FIXED in mozilla1.9alpha8



Build Config
11 years ago
9 years ago


(Reporter: Petteri Räty, Assigned: Petteri Räty)


Dependency tree / graph
Bug Flags:
blocking1.9 ?
in-testsuite -

Firefox Tracking Flags

(Not tracked)



(1 attachment)



11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); fi; rv: Gecko/20070302 Firefox/
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fi; rv: Gecko/20070302 Firefox/

The patch I am going to attach explains things.

Reproducible: Always

Steps to Reproduce:
1. Try to compile Firefox on a system running a 64 bit kernel and a 32 bit userland
Actual Results:  
i686-pc-linux-gnu-g++ -o xptcinvoke_x86_64_linux.o -c -fvisibility=hidden
-I../../../../../../dist/include/xpcom -I../../../../../../dist/include
-I/usr/include/nspr    -I./../..    -fPIC 
-DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\"  -fno-rtti
-fno-handle-exceptions  -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
-Wno-long-long -march=nocona -pipe -Wno-return-type -w -fshort-wchar -pthread
-pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2 
-include ../../../../../../mozilla-config.h
-Wp,-MD,.deps/xptcinvoke_x86_64_linux.pp xptcinvoke_x86_64_linux.cpp
xptcinvoke_x86_64_linux.cpp: In function 'nsresult
XPTC_InvokeByIndex(nsISupports*, PRUint32, PRUint32, nsXPTCVariant*)':
xptcinvoke_x86_64_linux.cpp:182: error: invalid register name for 'a4'
xptcinvoke_x86_64_linux.cpp:183: error: invalid register name for 'a5'
gmake[7]: *** [xptcinvoke_x86_64_linux.o] Error 1

Comment 1

11 years ago
Created attachment 257070 [details] [diff] [review]
Patch for to make it work.

A patch to fix the problem. See the comments in the patch.


10 years ago
Duplicate of this bug: 385593


10 years ago
Component: Build Config → Build Config
Ever confirmed: true
Product: Firefox → Core
QA Contact: build.config → build-config
I tried a patch similar to this before I came up with the patch I attached to bug 385593.  The problem I had with this approach is that every time I tried to define target to anything that did not have x86_64 in the cpu field, the build failed with the segment violation detailed here:
That said, if it is actually possible to do a build with this patch, as I also consider it to be more correct, the environment variable settings and .mozconfig lines to make it work would be helpful.

Comment 5

10 years ago
I haven't played with any dual-arch setups, but IMO, if you want to build for the non-default arch, then you have to specify it to the build system (which may or may not treat it as a cross-compile).  So passing --target=i686 should be the correct option. 

You should figure out why nsinstall is segfaulting.  Did you try running an strace on the process? Or ldd to make sure that it's linking to the proper libs?
changing from the following environment variables:


to these:

CC='gcc -m32'
CXX='c++ -m32'

resulted in a successful compile using the patch in this bug.  Since I like this patch better than mine, especially since the target build system now shows correctly when you do an about:buildconfig.  I think this is the patch to go with.  I am not sure why the CFLAGS CXXLFAGS method did not work, but that is another bug.

Comment 7

10 years ago
Comment on attachment 257070 [details] [diff] [review]
Patch for to make it work.

After a quick dig, it looks like HOST_PROGRAMS (e.g., nsinstall) don't use CFLAGS  even when building natively.  They use HOST_CFLAGS which will use the --enable-optimize=flags when building natively.
Attachment #257070 - Flags: review+


10 years ago
Blocks: 343975
Keywords: checkin-needed


10 years ago
Assignee: nobody → betelgeuse
Flags: in-testsuite-
Flags: blocking1.9?
Target Milestone: --- → mozilla1.9beta1
Version: unspecified → Trunk

Comment 8

10 years ago
Checking in;
/cvsroot/mozilla/,v  <--
new revision: 1.1843; previous revision: 1.1842
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED

Comment 9

10 years ago
Had to fix a typo in the patch, "OS_TEXT" instead of "OS_TEST".

Comment 10

10 years ago
(In reply to comment #9)
> Had to fix a typo in the patch, "OS_TEXT" instead of "OS_TEST".

heh wonder why it worked on my computer with the typo


10 years ago
Blocks: 388276
Duplicate of this bug: 249579
You need to log in before you can comment on or make changes to this bug.