Forwarding from correct email alias to get by moderation... -- Chris Custine FUSESource :: http://fusesource.com My Blog :: http://blog.organicelement.com Apache ServiceMix :: http://servicemix.apache.org Apache Directory Server :: http://directory.apache.org
---------- Forwarded message ---------- From: Chris Custine <[email protected]> Date: Thu, Apr 9, 2009 at 12:02 PM Subject: Re: [Tinyos-help] TinyOS 2.1 Tools - Mac OS X 10.5.6 To: [email protected], [email protected] Yep Greg is right, the JDK 1.6 on Mac is 64 bit, and the 1.5 JDK is 32 bit. To get jnilib files that work with both, I am adding "-arch x86_64 -arch i386" to the build targets. So change your libtoscomm.jnilib target in Makefile.am in tinyos-2.x/tools/tinyos/java/serial and tinyos-2.x/tools/tinyos/java/env to look like this: libtoscomm.jnilib: $(libtoscomm_jnilib_SOURCES) $(CXX) -arch x86_64 -arch i386 -O2 -bundle "-I$(JDK)/Headers" \ -o $@ NativeSerial_darwin.cpp this will produce a universal binary that will work with both JDKs. You could also get crazy and add -arch ppc etc. if you need portable binaries for older Macs but I have not tried that. Chris -- Chris Custine FUSESource :: http://fusesource.com My Blog :: http://blog.organicelement.com Apache ServiceMix :: http://servicemix.apache.org Apache Directory Server :: http://directory.apache.org On Wed, Apr 8, 2009 at 3:39 PM, Greg Hackmann <[email protected]> wrote: > On 4/8/09 3:43 PM, [email protected] wrote: > > My java version is: > > $ java -version > > java version "1.6.0_07" > > Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153) > > Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode) > > > > > > Thank you for any help or suggestions. > > > > Regards, > > Samuele. > > You're using Java 6, which is 64-bit on OS X. When you built > libtoscomm.jnilib, it was almost certainly built as a 32-bit library. > You can confirm this by running "file > /Library/Java/Extensions/libtoscomm.jnilib" (if it says "Mach-O bundle > i386", it's 32-bit). You can't use 32-bit JNI libraries with a 64-bit > Java VM, so Java is completely ignoring it. > > The simplest fix is to make the 32-bit J2SE 5.0 VM the default by > running Java Preferences and dragging it to the top of the list. > > Or, you could try to compile libtoscomm.jnilib as a 64-bit library. I'm > not sure how to do that, though. > > Greg Hackmann > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
