Uninstalling MacFuse on Lion
Last Updated on Samedi, 28 janvier 2012 09:15 Written by Henri Gomez Samedi, 28 janvier 2012 09:13
If you installed MacFuse on Lion (10.7) and tried to uninstall you may encountered the following error :
sudo /Library/Filesystems/fusefs.fs/Support/uninstall-macfuse-core.sh MacFUSE Uninstaller: Can not find the Archive.bom for MacFUSE Core package.
Uninstaller didn’t check for Lion (uname -r reporting 11.x).
So fix is easy, just edit uninstaller script /Library/Filesystems/fusefs.fs/Support/uninstall-macfuse-core.sh and add 11*) in case next to 10*)
...
OS_RELEASE=`/usr/bin/uname -r`
case "$OS_RELEASE" in
8*)
log "Incorrect uninstall. Use the Tiger version please."
exit 1
;;
9*)
PACKAGE_RECEIPT="$INSTALL_VOLUME/Library/Receipts/MacFUSE Core.pkg"
OUTER_PACKAGE_RECEIPT="$INSTALL_VOLUME/Library/Receipts/MacFUSE.pkg"
BOMFILE="$PACKAGE_RECEIPT/Contents/Archive.bom"
;;
10*|11*)
PACKAGE_RECEIPT=""
BOMFILE="$INSTALL_VOLUME/var/db/receipts/com.google.macfuse.core.bom"
;;
esac
Learn More
Building Universal Apache Tomcat Native Library on OS/X
Last Updated on Mercredi, 21 mars 2012 08:18 Written by Henri Gomez Mercredi, 13 juillet 2011 03:41
I recently notice that my Apache Tomcat running on OS/X 10.6.8 couldn’t use Apache Tomcat Native Library.
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java Jul 13, 2011 11:02:30 AM org.apache.coyote.http11.Http11Protocol init
After digging around and with the help of ASFer Mladen Turk, I figure my previous build was stick to 64bits mode only and I switched my JVM to 32bits mode using -d32.
The fix was then easy, just had to rebuild tomcat-native and asking OS/X gcc to produce both 32/64 bits model library using the following CLFAGS/APXSLDFLAGS.
CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386-arch x86_64'
Here is a small script I’m using now to produce Apache Tomcat Native Library on OS/X.
curl http://mir2.ovh.net/ftp.apache.org/dist/tomcat/tomcat-connectors/native/1.1.23/source/tomcat-native-1.1.23-src.tar.gz -o tomcat-native-1.1.23-src.tar.gz tar xvzf tomcat-native-1.1.23-src.tar.gz cd tomcat-native-1.1.23-src/jni/native CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-ssl=/usr --with-java-home=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home --with-apxs=/usr/sbin/apxs make clean make sudo cp .libs/libtcnative-1.0.1.23.dylib /usr/lib/java sudo rm -f /usr/lib/java/libtcnative-1.dylib sudo ln -s /usr/lib/java/libtcnative-1.0.1.23.dylib /usr/lib/java/libtcnative-1.dylib
A note about Lion
If you get Java on Lion using the java command on terminal or via the Java Developer Package for Mac OS X 10.7, Java headers are not on the usual location and you could find them under /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
You should then update the configure command line like this :
CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-apxs=/usr/sbin/apxs --with-ssl=/usr --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/A/
Lion came with Xcode 4.1 and there is also an impact on linker side, libtcnative is now produced as libtcnative-1.0.dylib
Commands became so :
curl http://mir2.ovh.net/ftp.apache.org/dist//tomcat/tomcat-connectors/native/1.1.23/source/tomcat-native-1.1.23-src.tar.gz -o tomcat-native-1.1.23-src.tar.gz tar xvzf tomcat-native-1.1.23-src.tar.gz cd tomcat-native-1.1.23-src/jni/native CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS='-arch i386 -arch x86_64' ./configure --with-apr=/usr --with-apxs=/usr/sbin/apxs --with-ssl=/usr --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/A/ make clean make sudo cp .libs/libtcnative-1.0.dylib /usr/lib/java sudo rm -f /usr/lib/java/libtcnative-1.dylib sudo ln -s /usr/lib/java/libtcnative-1.0.dylib /usr/lib/java/libtcnative-1.dylibLearn More
Apple JDK’s / OpenJDK’s – Core2Duo vs Core i7
Last Updated on Mercredi, 21 mars 2012 08:36 Written by Henri Gomez Lundi, 18 avril 2011 07:39
Previously I did benchmark of Apple VMs and OpenJDK 6 and I wanted to see how all of the JVMs available today on our Mac on two systems, an old Core2Duo and a newer Core i7. And also see how they perform 32 / 64 bits kernel mode.
So I redo full dacapo bench suite to include OpenJDK 6, and we have now 5 VMs (3 Java 6 and 2 Java 7) :
- Apple Java 1.6.0_22 – Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-314, mixed mode)
- Apple Java 1.6.0_24 – Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-348, mixed mode)
- OpenJDK 7 bsd-port – OpenJDK 64-Bit Server VM (build 21.0-b07, mixed mode)
- OpenJDK 7 macosx-port – OpenJDK 64-Bit Server VM (build 21.0-b07, mixed mode)
- OpenJDK 6 macports – OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)
Results on MacBook Pro – Core2Duo 2.66Ghz – 32bits kernel
| Bench | Apple JDK6 b22 | Apple JDK6 b24 | OpenJDK 1.7 bsd-port | OpenJDK 1.7 macosx-port | OpenJDK 1.6 |
|---|---|---|---|---|---|
| avrora (10 iterations) | 5436 | 5246 | 4917 | 5059 | 5061 |
| eclipse (2 iterations) | 49442 | 49529 | 37131 | 43572 | 37292 |
| fop (10 iterations) | 561 | 519 | 395 | 398 | 456 |
| h2 (2 iterations) | 7204 | 6635 | 6312 | 6341 | 11051 |
| jython (2 iterations) | 6517 | 5928 | 5947 | ||
| luindex (10 iterations) | 1095 | 2170 | 1014 | 985 | 953 |
| lusearch (10 iterations) | 7764 | 4379 | 5077 | 7611 | 5534 |
| pmd (10 iterations) | 3178 | 3295 | 2475 | 3438 | 2437 |
| sunflow (10 iterations) | 6969 | 7038 | 6543 | 6566 | 6564 |
| tomcat (5 iterations) | 4024 | 3924 | 3571 | 3820 | |
| tradebeans (5 iterations) | 8028 | 7516 | 5851 | 5914 | 5954 |
| tradesoap (5 iterations) | 16839 | 14603 | 12477 | 13096 | 12943 |
| xalan (10 iterations) | 3128 | 2744 | 2917 | 3783 | 2816 |
Results on iMac – Core i7 2.8Ghz – 64bits kernel
| Bench | Apple JDK6 b22 | Apple JDK6 b24 | OpenJDK 1.7 bsd-port | OpenJDK 1.7 macosx-port | OpenJDK 1.6 |
|---|---|---|---|---|---|
| avrora (10 iterations) | 3452 | 3349 | 3505 | 3600 | 3269 |
| eclipse (2 iterations) | 26081 | 24506 | 20664 | 22676 | 23706 |
| fop (10 iterations) | 392 | 354 | 299 | 303 | 324 |
| h2 (2 iterations) | 5559 | 5341 | 4814 | 4752 | 8766 |
| jython (2 iterations) | 4204 | 4168 | 4094 | ||
| luindex (10 iterations) | 2076 | 763 | 620 | 2226 | 643 |
| lusearch (10 iterations) | 1484 | 2101 | 2998 | 3055 | 1168 |
| pmd (10 iterations) | 2055 | 1884 | 1614 | 1876 | 1635 |
| sunflow (10 iterations) | 2808 | 2689 | 2315 | 2267 | 2276 |
| tomcat (5 iterations) | 1935 | 1850 | 1772 | 1751 | |
| tradebeans (5 iterations) | 6633 | 6127 | 5135 | 5092 | 5242 |
| tradesoap (5 iterations) | 19250 | 18265 | 19443 | 20217 | 22195 |
| xalan (10 iterations) | 1067 | 1673 | 762 | 791 | 775 |
Conclusion
As seen if previous article, latest Apple JVM, 1.6.0-24 perform better than the old 1.6.0-22, and still behind OpenJDK 7 and even OpenJDK 6. OpenJDK 7 bsd-port is still faster (by a small factor) than OpenJDK 7 from macosx-port (built with LLVM), in both simple threaded (Core2Duo, 2 cores) and large threaded (i7 4 cores with hyperthreading).
This benchmark show how good is Intel Core i7 comparing to previous generation Intel Core2Duo, roughly twice as fast.
Learn More
