compile on Solaris 10 / SunFire v20z with Opteron 64-Bit faild when using gcc

VERIFIED WORKSFORME

Status

NSS
Build
VERIFIED WORKSFORME
14 years ago
14 years ago

People

(Reporter: Ewald Ertl, Assigned: Wan-Teh Chang)

Tracking

unspecified
3.9.5
x86
Solaris

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0

Configuring the C-SDK using gcc on a SunFire V20z ( Opteron-Processor with
64-bit ) to build a 64-Bit Environment fails. 
gas - the assembler fails, because of the Option -Wa,-P which is supplied. 
The compilation should succed with "-m64 -march=opteron" for 64-Bit. 

After I got this all, the compilation broke, because of a missing Assembler-Modul 
in /nsprpub/pr/src/md/unix/ for the 64-Bit-Part under Solaris. 



Reproducible: Always

Steps to Reproduce:
1. compilation of the c-sdk with 64-Bit support on Solaris 10 with a 64-Bit
AMD-processor by using the gcc
2.
3.

Comment 1

14 years ago
I do not have access to Solaris 10 or an Opteron-based system.  Did the
compilation fail inside NSPR (mozilla/nsprpub) or in the LDAP
(mozilla/directory) code?  Can you provide a patch?
Summary: compile on Solaris 10 / SunFire v20z with Opteron 64-Bit faild when using gcc → compile on Solaris 10 / SunFire v20z with Opteron 64-Bit faild when using gcc
(Reporter)

Comment 2

14 years ago
The problem occured during the compile step in security/nss

Here I started with NS_USE_GCC=1 USE_64=1 USE_X86=1 gmake nss_build_all. 

In security/coreconf/SunOS5.10_i86pc.mk  I added to the OS_DEFINES -m64
-march=opteron, but I don't know if this is the right place. 
The Place of the error is appended at the end. 
Sorry, I can not provide a patch, because I've no knowledge about
assembler-programming. 



Here is the extract where the make produced an error: 
gmake[5]: Entering directory
`/entw/tools/MozillaDirectorySDK/mozilla/nsprpub/SunOS5.10_i86pc_gcc_64_DBG.OBJ/pr/src/md/unix'
gcc -o os_SunOS_x86.o   -m64 -march=opteron   -Wall -pthreads -gstabs -Wa,-s
-fPIC  -UNDEBUG -DDEBUG_tools  -DDEBUG=1 -DXP_UNIX=1 -DSVR4=1 -DSYSV=1
-D__svr4=1 -D__svr4__=1 -DSOLARIS=1 -DHAVE_FCNTL_FILE_LOCKING=1 -Di386=1
-D_PR_HAVE_OFF64_T=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1
-D_REENTRANT=1 -DHAVE_POINTER_LOCALTIME_R=1  -DFORCE_PR_LOG -D_PR_PTHREADS
-UHAVE_CVAR_BUILT_ON_SEM -D_NSPR_BUILD_
-I/entw/tools/MozillaDirectorySDK/mozilla/security/nss/../../dist/SunOS5.10_i86pc_gcc_64_DBG.OBJ/include
-I../../../../../pr/include -I../../../../../pr/include/private   -c
../../../../../pr/src/md/unix/os_SunOS_x86.s
../../../../../pr/src/md/unix/os_SunOS_x86.s: Assembler messages:
../../../../../pr/src/md/unix/os_SunOS_x86.s:46: Error: `4(%esp)' is not a valid
64 bit base/index expression
../../../../../pr/src/md/unix/os_SunOS_x86.s:88: Error: `4(%esp)' is not a valid
64 bit base/index expression

Comment 3

14 years ago
Reassigning this bug to NSS for now (there may be issues under mozilla/directory
as well, but NSPR and NSS need to compile first).
Component: LDAP C SDK → Build
Product: Directory → NSS
Version: other → unspecified

Updated

14 years ago
Assignee: mcs → wtchang
QA Contact: wtchang
(Assignee)

Comment 4

14 years ago
Support for Solaris 10 on AMD Opteron with 64-bit
is only available in NSPR 4.5.1 and NSS 3.9.3 or later.

I suggest you cvs checkout -r NSPR_4_5_1_RTM mozilla/nsprpub
and cvs checkout -r NSS_3_9_5_RTM mozilla/security/coreconf mozilla/security/nss.

By the way, USE_X86 is not used by anything in
the Mozilla cvs repository (including NSPR and
NSS).  So passing USE_X86=1 to
gmake nss_build_all is useless (but also harmless).
Status: NEW → ASSIGNED
NSS 3.10 is going to Public Beta next week (assuming all goes according 
to plan).  It supports AMD64, and even has optimized assembler for it.
I use a v20z as my primary development system and build NSS 3.10 every 
day on it.  I suggest you try it.

Can we mark this bug "works for me"? 

Comment 6

14 years ago
Ewald,

If you don't have access to Solaris 10, you won't be able to build an AMD64
version of NSS, for the simple reason that the NSS build system runs a command
called "shlibsign" , which is a tool it has just built. This requirement
prevents cross-compilation of NSS.

You need to :
1) download and install Solaris 10 on your machine. This is free from sun.com .
On a v20z, the AMD64 kernel will automatically be installed
2) update your source trees to the versions Wan-Teh noted, NSPR 4.5.1 and NSS
3.9.5 .
3) go to mozilla/security/nss and run "gmake nss_build_all USE_64=1 NS_USE_GCC=1"

Note that if you pull the tip of NSS instead of 3.9.5, you will also get several
new optimizations for RSA and RC4 in native AMD64 assembly .

Marking the bug WORKSFORME.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 7

14 years ago
(In reply to comment #6)

Hi!
Sorry for the late answere, but currently I have other things to do. 

I've downloaded the suggestet SOURCES mentioned by Wan-Teh and compiled 
NSS & NSPR successfully. 
The next step for me was  to compile the directory-Part, but here I stuck, but I
will continue, when I've again time. 

But nevertheless, thank you all for your help
(Assignee)

Updated

14 years ago
Target Milestone: --- → 3.9.5
(Assignee)

Updated

14 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.