Compiling 0.1.2 x86_64 on OS X 10.6.2

For some reason, $uname -m returns “i386,” even on x86_64 Macs. In order to build an x86_64 binary of the JOCL JNIlib, I had to hard-code the $HP_64 variable in Makefile_common.mk to ‘x86_64.’ After setting this, compiling, and copying to my java extensions folder, everything worked swimmingly and I’m able to run the samples.

I don’t know enough about makefile syntax to know the “right” way to fix this and submit a patch, but I thought it might be useful info for anyone trying to run JOCL on Leopard/Snow Leopard, considering their Java 1.6 JVMs are 64-bit. Also, if anyone does know the “right” way to detect arch on OS X, I’d be glad to learn (I have this problem with building many Java JNIlibs, sadly).

Hello Alterscape,

Thank you for this information. As mentioned in the “Makefile_common.mk”, this file originally had been provided by NVIDIA, and I only adjusted it slighty for JOCL. I have to admit, I don’t know much about the makefile syntax either… :o I’ll probably have to get more involved in “making makefiles”, since I already received a few comments about manual adjustments that have been necessary for specific platforms.

Your hints will probably be helpful for anyone who tries to compile the binaries for MacOS 64. Unfortunately, MacOS 64 binaries are still missing in the collection of pre-built binaries that are available on the website…

I just emailed the JOCL contact address about submitting my makefile and/or jnilibs; will see what comes of it. I’m also going to asking a friend who’s far more literate in makefiles than I am; if we get a working Makefile for Darwin, I’ll post that.

Yes, thank you, I received the mail. The response should be in your mailbox :slight_smile: