PlatformIO - STM32 - Library not loaded: /opt/local/lib/libusb-1.0.0.dylib [upload] Error 134 - macos

I am trying to program my STM32 via PlatformIO. I am using the built in blink example so I 'know; that my code is not what is causing the issue. I am using macOS - M1 Max - Monterey(12.13.1).
Here is the board I am using: https://ubld.it/products/stm32-midi-dev
The program builds just fine, but when trying to upload, I get the following error:
dyld[54244]: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /Users/***/.platformio/packages/tool-stm32duino/dfu-util/dfu-util
Reason: tried: '/opt/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/lib/libusb-1.0.0.dylib' (no such file)
/Users/***/.platformio/packages/tool-stm32duino/maple_upload: line 53: 54244 Abort trap: 6 ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} -R ${dfuse_addr} -R
*** [upload] Error 134
My platformio.ini file is as follows:
[env:genericSTM32F103CB]
platform = ststm32
board = genericSTM32F103CB
framework = arduino
board_build.core = maple
upload_protocol = dfu
I have tried the following:
brew install libusb - but it was already installed
brew uninstall libusb - then - brew install libusb
Library not loaded: /opt/local/lib/libssl.1.0.0.dylib (LoadError) - This seemed to be more SSL related, but tried anyways
I have read the error message and understand that it appears that a file does not exist, but unsure of what next steps would be as I tried reinstalling libusb above.
Here is my full upload output if helpful:
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103CB.html
PLATFORM: ST STM32 (15.3.0) > STM32F103CB (20k RAM. 128k Flash)
HARDWARE: STM32F103CBT6 72MHz, 20KB RAM, 128KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduinoststm32-maple # 3.10000.201129 (1.0.0)
- tool-dfuutil # 1.9.211020
- tool-openocd # 2.1100.211028 (11.0)
- tool-stm32duino # 1.0.1
- toolchain-gccarmnoneeabi # 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> https://docs.platformio.org/en/latest/librarymanager/ldf.html
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio/build/genericSTM32F103CB/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 21.1% (used 4312 bytes from 20480 bytes)
Flash: [= ] 14.3% (used 18712 bytes from 131072 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, dfu, jlink, serial, stlink
CURRENT: upload_protocol = dfu
Looking for upload port...
Auto-detected: /dev/cu.usbmodem1101
Uploading .pio/build/genericSTM32F103CB/firmware.bin
Failed to open serial device.
dyld[54773]: Library not loaded: /opt/local/lib/libusb-1.0.0.dylib
Referenced from: /Users/***/.platformio/packages/tool-stm32duino/dfu-util/dfu-util
Reason: tried: '/opt/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/local/lib/libusb-1.0.0.dylib' (no such file), '/usr/lib/libusb-1.0.0.dylib' (no such file)
/Users/***/.platformio/packages/tool-stm32duino/maple_upload: line 53: 54773 Abort trap: 6 ${DFU_UTIL} -d ${usbID} -a ${altID} -D ${binfile} -R ${dfuse_addr} -R
*** [upload] Error 134
Thanks in advance for the help. Pretty new to embedded.
=== EDIT ===
As I continue to research, I think it is related to homebrew not installing in the normal spot for libusb. Homebrew Mac M1 can't find installs

Ok. Thanks to Ivan at PlatformIO, he was able to give me the below resolution. It now works great.
There are no new versions of STM32Duino /dfu-binaries for macOS ARM:
https://github.com/stm32duino/Arduino_Tools/tree/main/macosx/dfu-util
Could I ask you to try the next things?
Edit ~/.platformio/packages/tool-stm32duino/maple_upload
Comment line 43 and add a new one below
DFU_UTIL=~/.platformio/packages/tool-dfuutil/bin/dfu-util

Related

Numba: can't locate cuda libraries

I'm trying to take advantage of cuda with my gtx 1080 on windows, I installed cuda toolkit 10 from nvidia website and set up the environment variables using this tutorial on medium: tutorial
However' when I ran numba -s command on anaconda prompt I got the following message:
Finding cublas
ERROR: can't locate lib
Finding cusparse
ERROR: can't locate lib
Finding cufft
ERROR: can't locate lib
Finding curand
ERROR: can't locate lib
Finding nvvm
located at C:\Users\Nimrod Naim\Anaconda3\DLLs\nvvm64_32_0.dll
finding libdevice for compute_20... ERROR: can't open libdevice for compute_20
finding libdevice for compute_30... ERROR: can't open libdevice for compute_30
finding libdevice for compute_35... ERROR: can't open libdevice for compute_35
finding libdevice for compute_50... ERROR: can't open libdevice for compute_50
Found 1 CUDA devices
id 0 b'GeForce GTX 1080' [SUPPORTED]
compute capability: 6.1
pci device id: 0
pci bus id: 7
Summary:
1/1 devices are supported
thus cuda won't be enabled using numba.
Can you please help me solve that problem?
Thanks!
for cublas : sudo apt-get install cuda-cublas-[version]
nvidia-smi give the cuda version.
Other libs were installed by default (cuda 10-2 for me). Otherwise, packages are named like cuda-cusparse-[use completion to see available version, take the good one : ex: sudo apt-get install cuda-cusparse-10-2]
Same problem now, solution:
put those lines in ~/.profil :
export NUMBAPRO_CUDALIB=/usr/local/cuda/lib64
export NUMBAPRO_LIBDEVICE=/usr/local/cuda/nvvm/libdevice
export NUMBAPRO_NVVM=/usr/local/cuda/nvvm/lib64/libnvvm.so
(note that cuda here has the path /usr/local/cuda/, correct if needed)

Wine: Prefix creation exited with error

I'm trying to get wine/winebottler to work on my mac. I've got OS X El Capitan 10.11.5. But whenever I try to run an .exe file, I'm getting the following error: "Prefix creation exited with error" and the following log:
###BOTTLING### customprefix.sh
###BOTTLING### Gathering debug Info...
Versions
OS...........................: darwin15
Wine.........................: 1.4.1
WineBottler..................: 1.4.1
Environment
PWD..........................: '/Applications/Wine.app/Contents/Resources/bin'
PATH.........................: /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
WINEPATH.....................: /Applications/Wine.app/Contents/Resources/bin
LD_LIBRARY_PATH..............:
DYLD_FALLBACK_LIBRARY_PATH...:
FONTCONFIG_FILE..............: /Applications/Wine.app/Contents/Resources/etc/fonts/fonts.conf
DIPSPLAY.....................: /private/tmp/com.apple.launchd.8YDmM9MQvn/org.macosforge.xquartz:0
SILENT.......................:
http_proxy...................:
https_proxy..................:
ftp_proxy....................:
socks5_proxy.................:
Hardware:
Hardware Overview:
Model Name: MacBook Air
Model Identifier: MacBookAir6,1
Processor Name: Intel Core i5
Processor Speed: 1,4 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Memory: 8 GB
Boot ROM Version: MBA61.0099.B22
SMC Version (system): 2.12f143
Serial Number (system): C02NK02MG5RK
Hardware UUID: DFAA0049-4DD3-596A-8F15-F937EBF89364
###BOTTLING### Turn on Coreaudio...
wine: created the configuration directory '/Users/janni/Wine Files'
Wine cannot find the FreeType font library. To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
Wine cannot find the FreeType font library. To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
Wine cannot find the FreeType font library. To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
Wine cannot find the FreeType font library. To enable Wine to
use TrueType fonts please install a version of FreeType greater than
or equal to 2.0.5.
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
err:x11drv:process_attach failed to load libX11.6.dylib: dlopen(libX11.6.dylib, 10): image not found
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:appbar:initialize_appbar Could not create appbar message window
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:psdrv:PSDRV_PPDGetNextTuple Line too long.
err:psdrv:PSDRV_PPDGetNextTuple Line too long.
err:psdrv:PSDRV_PPDGetNextTuple Line too long.
err:psdrv:PSDRV_PPDGetNextTuple Line too long.
fixme:psdrv:PSDRV_UpdateDevCaps Can't find page
err:rundll32:wWinMain Unable to load L"setupapi"
wine: configuration in '/Users/janni/Wine Files' has been updated.
###BOTTLING### Sandboxing...
### LOG ### Command 'find /Users/janni/Wine Files/drive_c/users/janni -name * -type l -exec sh -c rm "{}"; mkdir -p "{}" ;' returned status 1.
###ERROR### Command 'find /Users/janni/Wine Files/drive_c/users/janni -name * -type l -exec sh -c rm "{}"; mkdir -p "{}" ;' returned status 1.
find: /Users/janni/Wine Files/drive_c/users/janni: No such file or directory
Task returned with status 15.
It seems, other people habe got this problem too, but google was not able to give me any usable solution.

To view dvi files under osx 10.9. X11 and Ghostscript issue

I just have upgraded to os x 10.9 (clean install), but am finding issues with ghostscipt (or with X11-quartz). I need to view a dvi file (from latex) with this line command in Terminal
$ xdvi doc.dvi
The text appears fine, but the figures (.eps, .ps) do not show up. It left blank rectangles instaed. I get this error message
Warning: Unable to load any usable fontset
gs: Unknown device: x11
gs: Unrecoverable error: undefined in .uninstallpagedevice
gs: Operand stack:
gs: defaultdevice
xdvi-xaw: Warning: Read_from_gs returned 0 bytes
P.S. I installed XQuartz 2.7.5 (xorg-server 1.14.4), and GPL Ghostscript 9.07.
Any guidance please?
The first answer is correct, as re-installing MacTex should relink gs to gs-X11.
You can also just relink it yourself. For instance:
ls -l /usr/local/bin/gs
/usr/local/bin/gs -> /usr/local/bin/gs-noX11
sudo ln -sf /usr/local/bin/gs-X11 /usr/local/bin/gs
Now xdvi displays the images. Tested on Mavericks 10.9.4.
I reinstalled latex with MacTex again and now seems working fine.
Perhaps one needs to first install ghostscript then latex (?)
But note that I did some manipulations prior to this... In fact I reinstalled Ghostscript with mac ports. But even at that time it did not work, until I reinstalled Latex as highlighted above.

Can't update Macports (with Mac OS X Mavericks)

After upgrading Mac OS X to newest version Mavericks, I attempted to selfupdate my Macports, but it failed:
$ sudo port -v selfupdate
---> Updating MacPorts base sources using rsync
receiving file list ... done
sent 36 bytes received 69 bytes 210.00 bytes/sec
total size is 4925440 speedup is 46908.95
receiving file list ... done
sent 36 bytes received 76 bytes 74.67 bytes/sec
total size is 512 speedup is 4.57
MacPorts base version 2.2.0 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from rsync://rsync.macports.org/release/tarballs/ports.tar
receiving file list ... done
sent 36 bytes received 70 bytes 70.67 bytes/sec
total size is 57702400 speedup is 544362.26
receiving file list ... done
sent 36 bytes received 77 bytes 75.33 bytes/sec
total size is 512 speedup is 4.53
receiving file list ... rsync: change_dir "tarballs/PortIndex_darwin_13_i386" (in release) failed: No such file or directory (2)
done
sent 4 bytes received 9 bytes 26.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(1400) [receiver=2.6.9]
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/PortIndex_darwin_13_i386/PortIndex /opt/local/var/macports/sources/rsync.macports.org/release/tarballs
Exit code: 23
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
checking build system type... x86_64-apple-darwin13.0.0
checking host system type... x86_64-apple-darwin13.0.0
checking target system type... x86_64-apple-darwin13.0.0
checking MacPorts version... 2.2.1
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.1
checking for gcc... /usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
<snip>
checking CommonCrypto/CommonDigest.h presence... yes
checking for CommonCrypto/CommonDigest.h... yes
checking for readline in -lreadline... yes
checking whether rl_username_completion_function is declared... no
checking whether rl_filename_completion_function is declared... yes
checking whether rl_completion_matches is declared... yes
checking whether username_completion_function is declared... yes
checking whether filename_completion_function is declared... yes
checking whether completion_matches is declared... yes
checking for Tcl configuration... configure: error: Can't find Tcl configuration definitions
Command failed: cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/base && CC=/usr/bin/cc OBJC=/usr/bin/cc ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make SELFUPDATING=1 && make install SELFUPDATING=1
Exit code: 1
Error: Error installing new MacPorts base: command execution failed
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
$
If I just try to upgrade a particular port, it failed too:
$ sudo port upgrade emacsapp
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Error: emacsapp is not installed
$ sudo port search emacs
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
$ sudo port upgrade emacs-app
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
---> Fetching archive for gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://packages.macports.org/gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/gperf
---> Attempting to fetch gperf-3.0.4_2.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gperf
---> Fetching distfiles for gperf
---> Attempting to fetch gperf-3.0.4.tar.gz from http://ykf.ca.distfiles.macports.org/MacPorts/mpdistfiles/gperf
---> Verifying checksums for gperf
---> Extracting gperf
Error: org.macports.extract for port gperf returned: command execution failed
Please see the log file for port gperf for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gperf/gperf/main.log
Error: Problem while installing gperf
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
$
Any idea
if this is caused by incompatibility between OS X Mavericks and Macports?
how to fix it?
Edit:
I tried a different computer upgrading it from 10.8.5 to 10.9, and then try to do selfupdate for macports, it did not work again but gave a different error:
$ sudo port -v selfupdate
---> Updating MacPorts base sources using rsync
receiving file list ... done
base.tar
sent 13396 bytes received 10355 bytes 15834.00 bytes/sec
total size is 4925440 speedup is 207.38
receiving file list ... done
base.tar.rmd160
sent 64 bytes received 635 bytes 1398.00 bytes/sec
total size is 512 speedup is 0.73
MacPorts base version 2.2.1 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
Synchronizing local ports tree from file:///opt/local/var/macports/sources/svn.macports.org/trunk/dports/
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy '/opt/local/var/macports/sources/svn.macports.org/trunk/dports' is too old (format 10, created by Subversion 1.6)
Command failed: /usr/bin/svn update --non-interactive /opt/local/var/macports/sources/svn.macports.org/trunk/dports
Exit code: 1
Error: Synchronization of the local ports tree failed doing an svn update
Error: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization of 1 source(s) failed
Install the "Command Line Tools" first:
sudo xcode-select --install
(Explicitly agreeing to the license is sometimes necessary via "sudo xcodebuild -license")
Then upgrade the ports:
sudo port -v selfupdate
I answered a similar question. The location of the Tcl framework has changed, breaking the existing MacPorts infrastructure. The 2.2.1 installer for Mavericks has since become available here. Make a list of your installed ports, and consider deleting /opt/local prior to installing. You will likely need to 'update' everything anyway.
There might be a chance that you haven't agreed with the XCode license.
If xcode-install doesn't help, you can run the belowing command to agree with Xcode license.
sudo xcodebuild -license
there is an actual bug with
gperf #3.0.4: error: expected parameter declarator
thankfully this issue has its own ticket at MacPorts ticket 40918
if anything you could read all the issues in Mavericks at http://trac.macports.org/wiki/MavericksProblems
I had the same issue. I am assuming that you had Xcode command line utils installed previously. Just launch XCODE and let it finish configuration. Now rerun port command and it should work properly.
I got an error with selfupdate, and resolved it by doing a fresh installation of MacPorts from http://www.macports.org/install.php. Now I can run the selfupdate command without error and install other ports.
The error I were seeing was below, it seems the same problem as Yo Sophia has pointed out:
$ sudo port selfupdate
Password:
---> Updating MacPorts base sources using rsync
MacPorts base version 2.1.3 installed,
MacPorts base version 2.2.1 downloaded.
---> Updating the ports tree
---> MacPorts base is outdated, installing new version 2.2.1
Installing new MacPorts release in /opt/local as root:admin; permissions 0755; Tcl-Package in /Library/Tcl
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
I mainly wanted to comment on #Brett's answer above (sorry, SO n00b still, not allowed) and share my experience upgrading... not really a new answer, but hopefully some useful info.
I downloaded and installed the Mavericks MacPorts installer as described above, (but without removing /opt, as suggested by #King Julian did self update which was fine, and then upgrade outdated and it seems to be uninstalling and reinstalling all my ports with a message:
Warning: Deactivate forced. Proceeding despite dependencies.
on each one. Luckily i made a copy of the etc and apache2/conf dirs, so should be able to get my config back when it eventually finishes... after 30 minutes or so it threw an error
Unable to open port: extra characters after close-quote
So i did self update again and upgrade outdated seems to run again...
So looks like it can be done (LAMP all working anyway) - it might have been quicker to start again from scratch, but make sure you have at least a couple of hours spare for this (and be connected to mains power ;)
Apologies if too much info, but hope it helps!
The problem seems to be with Macports and the location of the Tcl framework and it's path once Xcode has been installed. I suggest installing a fresh version of Macports for Mavericks here : http://www.macports.org/install.php.
I had this issue on Mountain Lion and it was actually to do with MacPorts looking at an old XCode path (I had several versions including betas installed). I ran with the -d option and checked the config.log file at /opt/local/var/macports/sources/rsync.macports.org/release/base and it reported some errors:-
--- snip ---
...
configure:3331: checking for C compiler version
configure:3340: gcc --version >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
configure:3351: $? = 0
configure:3340: gcc -v >&5
Configured with: --prefix=/Applications/Xcode5-DP3.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: Error: could not stat active Xcode path '/Applications/Xcode5-DP3.app/Contents/Developer'. (No such file or directory)
...
--- snip ---
So I gave it the correct path using:-
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
and that fixed it.
I got my clues from this useful page.

java 6 on mac os x 10.7.5

On my Mac, I deleted java locally, just deleted the folder with java (/System/Library/Frameworks/JavaVM.framework/Versions/).
When I install java 6 again, I was installed into: /Library/Java/JavaVirtualMachines/
Then after installation new one, I have this error when trying to invoke './java' from the console:
Here I put java into my home directory. But, even if use standard one I've got the same exception:
dyld: Library not loaded: /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
Referenced from: /Users/myuser/java/1.6.0.jdk/Contents/Home/bin/./java
Reason: image not found
Trace/BPT trap: 5
Is there any way to fix it?
---2---
Here I just copied working Java 6 from different machine and put to proper/default location, then go to .../bin and type ./java:
$ pwd
/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
$ ./java -version
dyld: Library not loaded: #rpath/libjli.jnilib
Referenced from: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/./java
Reason: image not found
Trace/BPT trap: 5
But if install Java 7, it works perfectly.
--3--
If install JavaDeveloper.pkg package (javadeveloper_for_os_x_2012006__11m3909.dmg) with jdk6 in it - from Apple site
dyld: Library not loaded: /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/bin/./java
Reason: image not found
Trace/BPT trap: 5
--4--
If try to install java 6 (open jdk) from mac ports
$ sudo port install openjdk6
info:build Exiting because of the above error(s). \n
:info:build make: *** [post-sanity] Error 1
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_java_openjdk6/openjdk6/work/." && /usr/bin/make ARCH_DATA_MODEL="64" ALT_BOOTDIR="/opt/local/share/java/openjdk6_bootstrap" ALT_JDK_IMPORT_PATH="/opt/local/share/java/openjdk6_bootstrap" ALT_BINARY_PLUGS_PATH="/opt/local/share/java/icedtea6-plugs/jre/lib/rt-closed.jar" ALT_DROPS_DIR="/opt/local/var/macports/distfiles/openjdk6" ANT_HOME="/opt/local/share/java/apache-ant" ALT_FREETYPE_HEADERS_PATH="/opt/local/include" ALT_FREETYPE_LIB_PATH="/opt/local/lib" ALT_CUPS_HEADERS_PATH="/usr/include" ALT_MOTIF_DIR="/opt/local" ALT_X11_PATH="/opt/local" ALT_DEVTOOLS_PATH=/usr ALT_CACERTS_FILE=/System/Library/Frameworks/JavaVM.framework/Home/lib/security/cacerts NO_DOCS=true LANG="C" BUILD_NUMBER="b20" MILESTONE=fcs HOTSPOT_BUILD_JOBS="2"
**:info:build Exit code: 2
:error:build org.macports.build for port openjdk6 returned: command execution failed
:debug:build Error code: CHILDSTATUS 7773 2
:debug:build Backtrace: command execution failed**
Ok. I fixed it.
The problem was that there are two places that Java is located.
/System/Library/Frameworks/JavaVM.framework (were real jdk 6 is located)
/Library/Java/JavaVirtualMachines/ (were may java6 is now, it has only links)
And if put JDK to source 1, it will try refers to source 2 (by symlinks) using specific version of java (in my case it is 1.6.0) and it could not find proper object/file to link to.
As soon as I fixed it started working.
So, I just restored all contents, getting it from another working machine. Bu the idea is that Mac OS uses two locations to store java related files.

Resources