Closed Bug 369660 Opened 18 years ago Closed 18 years ago

add MAC OS X support to JSS

Categories

(JSS Graveyard :: Library, defect)

4.2.4
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glenbeasley, Assigned: glenbeasley)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch add support for MAC OS X (obsolete) (deleted) — Splinter Review
To build on all platforms JAVA_HOME must first set. On Mac OS X used the default JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK Which on MAC OS X 10.4.8 defaults to java version "1.5.0_06" MAC OS X default install of jdk has "Commands" directory instead of "bin" and "Headers" directory instead of include MAC OS X shared library path is DYLD_LIBRARY_PATH with suffix of dylib On MAC OS X a JNI library must have a suffix of .jnilib see MAC tech note http://developer.apple.com/documentation/Java/Conceptual/Java14Development/05-CoreJavaAPIs/CoreJavaAPIs.html therefore the JSS JNI library is named libjss4.jnilib and java requires the -Djava.library.path option to point to the JSS JNI library. This patch is for 32 bit support for MAC OS X. I need to look into MAC OS X 64 bit support.
Attachment #254360 - Flags: review?(christophe.ravel.bugs)
it appears that Java on Mac OS X 10.4 or earlier depends on frameworks and libraries that don't provide 64-bit interfaces. There is some hope that Mac OS X 10.5 will have 64 bit support but I can't find any direct statement from Apple stating this.
in jdk.mk, you can remove "include" sub-dirs from the variable INCLUDES since it is replaced by "Headers". DLL_SUFFIX/lib_suffix definition is duplicated 4 times. - I am not sure that "lib_suffix" is needed in "build_all.pl" (.so is not defined there). - DLL_SUFFIX should be set in coreconf/Darwin.mk. You should add a flag to tell which of "dylib" or "jnilib" to use (maybe set this flag in jss/lib/manifest.mn)
Glen, we added Mac OS X support to JSS in bug 316369. Do you know why the patch in bug 316369 is not sufficient?
Per Comment #4 in bug 316369 you had JAVA_HOME set to /Library/Java/Home if you do a pwd -P to have the symbolic links in the path resolved [1838][b@Macintosh:/Library/Java/Home]$ pwd -P /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home My JAVA_HOME was set to /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK it should of been set to /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home or like you had to "Library/Java/Home" which are the same paths resolved. I will redo this patch since the CurrentJDK/home has "bin" and "include" directories! (my mistake) Bug 316369 would of been able to build jss, but I don't see how JSS was able to run without the libjss4.jnilib change? You do say in bug 316369 "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." Per Comment #3 I do not want to change in coreconf/Darwin.mk for DLL_SUFFIX because this would break NSS shared libraries. The JSS library really is a jni library, and most platforms think of it as a shared library but MAC OS X forces the distinction. therefor I believe I need to change DLL_SUFFIX locally in the JSS tree. I will add the cc from bug 316369 in case I am mistaken, but I believe user just took the built libjss4.dylib and renamed it to libjss4.jnilib themselves. http://developer.apple.com/documentation/Java/Conceptual/Java14Development/05-CoreJavaAPIs/CoreJavaAPIs.html Per Comment #2: I downloaded Java SE 6.0 Release 1 Developer Preview 6 from the apple developer site. It appears to have 64 bit support.
This patch successfully runs the 32 bit build and all.pl tests. There are some failures with the 64 bit tests which I will look into.
Attachment #254360 - Attachment is obsolete: true
Attachment #254386 - Flags: review?(christophe.ravel.bugs)
Attachment #254360 - Flags: review?(christophe.ravel.bugs)
Attachment #254386 - Flags: review?(christophe.ravel.bugs) → review+
Checking in all.pl; /cvsroot/mozilla/security/jss/org/mozilla/jss/tests/all.pl,v <-- all.pl new revision: 1.37; previous revision: 1.36 done Enter passphrase for key '/Users/b/.ssh/id_dsa': Checking in config.mk; /cvsroot/mozilla/security/jss/lib/config.mk,v <-- config.mk new revision: 1.22; previous revision: 1.21 done This bug still needs the nss fix bug 369444 I also still have to work on the 64 bit issues, but I may open a separate bug for the 64 bit issues.
Status: NEW → ASSIGNED
QA Contact: libraries
I opened bug 379673 for 64 bit support.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: