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

RESOLVED FIXED in mozilla1.9alpha8

Status

()

Core
Build Config
RESOLVED FIXED
11 years ago
9 years ago

People

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

Tracking

Trunk
mozilla1.9alpha8
x86
Linux
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 ?
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

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

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
2.
3.
Actual Results:  
i686-pc-linux-gnu-g++ -o xptcinvoke_x86_64_linux.o -c -fvisibility=hidden
-DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\"
-DBUILD_ID=0000000000 -DEXPORT_XPTC_API  
-I../../../../../../dist/include/xpcom -I../../../../../../dist/include
-I/usr/include/nspr    -I./../..    -fPIC 
-DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\"
-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 
-DGENTOO_NSPLUGINS_DIR=\"/usr/lib/nsplugins\"
-DGENTOO_NSBROWSER_PLUGINS_DIR=\"/usr/lib/nsbrowser/plugins\"  -DMOZILLA_CLIENT
-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
(Assignee)

Comment 1

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

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

Updated

10 years ago
Duplicate of this bug: 385593

Updated

10 years ago
Status: UNCONFIRMED → NEW
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:

https://bugzilla.mozilla.org/show_bug.cgi?id=385593#c4
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:

CFLAGS=-m32
CXXFLAGS=-m32

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 configure.in 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+

Updated

10 years ago
Blocks: 343975
Keywords: checkin-needed

Updated

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 configure.in;
/cvsroot/mozilla/configure.in,v  <--  configure.in
new revision: 1.1843; previous revision: 1.1842
done
Status: NEW → RESOLVED
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".
(Assignee)

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

Updated

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.