JSS native library for Mac OS X.



13 years ago
13 years ago


(Reporter: joaquin.sanchez, Assigned: wtc)





(1 attachment, 1 obsolete attachment)



13 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: 

Need JSS native library for Mac OS X or make script

Reproducible: Always

Comment 1

13 years ago
Joaquin: we've never built JSS on Mac OS X.  It should not
be hard to make it build and run, but we need to spend some
time to try it and fix any problems we find.

I'd like to know exactly what you need.  Would you like us
to provide an official JSS native library for Mac OS X, or
would you like to be able to build JSS on Mac OS X yourself?
Severity: normal → enhancement
Ever confirmed: true

Comment 2

13 years ago
I would like to be able to build JSS on Mac OS X myself. NSS has been built on MAC OS X, what is the problem with JSS?

Comment 3

13 years ago
Could you try to build JSS on Mac OS X and post the
build failures here?

I believe that you will need to at least add a MacOSX
section to mozilla/security/coreconf/jdk.mk.  You should
be able to model it after the Linux (or some other OS)
section in that file.

None of our JSS-based applications need to support
Mac OS X, so we don't need to build JSS on Mac OS X.
It should not be hard to port JSS to Mac OS X, and
I hope you can help us do that.

Here is what the Linux section in mozilla/security/coreconf/jdk.mk
looks like:

# set [Redhat Linux] platforms
ifeq ($(OS_ARCH), Linux)
	JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar

	ifeq ($(JRE_HOME),)
		ifeq ($(JRE_CLASSES),)
			JRE_CLASSES = $(JRE_HOME)/lib/rt.jar


	# (2) specify "header" information
	JAVA_ARCH = linux

	INCLUDES += -I$(JAVA_HOME)/include

	# no JIT option available on this platform

So you need to add a section for MacOSX.  The most
important part is the -I pathnames we add to INCLUDES.

To do this work, check out the tip of JSS:

cvs co mozilla/nsprpub
cvs co mozilla/dbm mozilla/security/dbm
cvs co mozilla/security/coreconf mozilla/security/nss
cvs co mozilla/security/jss

You need to set the environment variable JAVA_HOME to
be the pathname of the JDK.

To build JSS, do this:

cd mozilla/security/nss
gmake nss_build_all
cd ../jss

Comment 4

13 years ago
Created attachment 212801 [details] [diff] [review]
CVS Diffs for OS X JSS support

With these changes, I'm able to build JSS on OS X 10.3.9.

Comment 5

13 years ago
Created attachment 213135 [details] [diff] [review]
CVS Diffs for OS X JSS support, v2

I regenerated Nathan's patch against the current JSS
tip and without the -t option to cvs diff.  (The -t
option helps code review but makes it impossible to
apply the patch with the 'patch' command.)

Nathan, does the JDK on Mac OS X have the
$(JAVA_HOME)/../Classes/classes.jar file instead of
the $(JAVA_HOME)/jre/lib/rt.jar file?  It's strange
to have the ".." in the pathname.
Attachment #212801 - Attachment is obsolete: true

Comment 6

13 years ago
Wan-Teh: The classes.jar file does replace the rt.jar file on OS X.  Unfortunately, this jar does not exist inside of JAVA_HOME.  It is one level above the JAVA_HOME location, so we have to use ".." in the pathname to get the proper jarfile.

Comment 7

13 years ago
What is the status on getting this patch reviewed and checked into the tree?

Comment 8

13 years ago
Comment on attachment 213135 [details] [diff] [review]
CVS Diffs for OS X JSS support, v2

r=wtc.  I checked in the patch on the JSS trunk.

Checking in coreconf/jdk.mk;
/cvsroot/mozilla/security/coreconf/jdk.mk,v  <--  jdk.mk
new revision: 1.19; previous revision: 1.18
Checking in jss/lib/config.mk;
/cvsroot/mozilla/security/jss/lib/config.mk,v  <--  config.mk
new revision: 1.21; previous revision: 1.20

I believe we also need the coreconf change in this patch checked
in on NSS_3_11_BRANCH because Sun builds the JSS trunk using
the coreconf from NSS_3_11_BRANCH.
Attachment #213135 - Flags: superreview?(julien.pierre.bugs)
Attachment #213135 - Flags: review+

Comment 9

13 years ago
Comment on attachment 213135 [details] [diff] [review]
CVS Diffs for OS X JSS support, v2

Sun doesn't build JSS on Mac, to the best of my knowledge. I don't have access to a Mac, and I can't verify that the content of this patch is correct. r+ if you have tested this patch.
Attachment #213135 - Flags: superreview?(julien.pierre.bugs) → superreview+

Comment 10

13 years ago
I checked in the coreconf change on the NSS_3_11_BRANCH
for JSS 4.2.5.

Checking in jdk.mk;
/cvsroot/mozilla/security/coreconf/jdk.mk,v  <--  jdk.mk
new revision:; previous revision: 1.18
Last Resolved: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.2.5

Comment 11

13 years ago
I tested a JSS trunk build (with NSPR_4_6_BRANCH and
NSS_3_11_BRANCH) on Mac OS X 10.4.3.  I set the environment
variable JAVA_HOME to /Library/Java/Home.  (I didn't install
Java, so I am using either the built-in Java or the latest
version obtained by Software Update.)  I verified that
both changes in the patch are required to build JSS.

I also found that more changes are needed to run the JSS
test suite (mozilla/security/jss/org/mozilla/jss/tests/all.pl)
on Mac OS X.  Let's do that in a separate bug report.
You need to log in before you can comment on or make changes to this bug.