I’ve found some great resources out there that help us Mac folk out with building an arm toolchain on the OS X platform. Here they are if any others stumble across this thread looking for the same:
http://www.benmont.com/tech/crosscompiler.html
http://will-tm.com/cross-compiling-mac-os-x-mavericks/
http://hansbot.blogspot.com/p/beaglebone-black-mac-os-x-toolchain.html (this one is the most detailed)
I’ve gotten through a few of the stumbling blocks but I’m currently stuck. I get this far:
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20151023.200552
[INFO ] Building environment variables
[00:03] /
So, after that, if I look at the activity monitor, bash is around 100% processor utilization on one of the cores. I figure “great, it’s doing something”. I left it to do its thing and after an hour, I killed the process. I changed a few settings… ran it again… same thing. Okay… maybe it just takes a really long time. I left it overnight. This morning it was still near 100% processor utilization and nothing had changed in the build.log file. Here’s the last few lines from the build log:
[DEBUG] =================================================================
[DEBUG] Checking that we can run gcc -v
[DEBUG] ==> Executing: ‘x86_64-build_apple-darwin15.0.0-gcc’ ‘-v’
[DEBUG] Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
[DEBUG] Apple LLVM version 7.0.0 (clang-700.1.76)
[DEBUG] Target: x86_64-apple-darwin15.0.0
[DEBUG] Thread model: posix
[DEBUG] Checking that we can run gcc -v: done in 0.00s (at 00:03)
[DEBUG] =================================================================
[DEBUG] Checking that gcc can compile a trivial program
[DEBUG] ==> Executing: ‘x86_64-build_apple-darwin15.0.0-gcc’ ‘-O2’ ‘-g’ ‘-pipe’ ‘/Volumes/CaSe/.build/arm-JoesBeaglebone-linux-gnueabi/build/test.c’ ‘-o’ ‘/Volumes/CaSe/.build/arm-unknown-linux-gnueabi/build/.gccout’
[DEBUG] Checking that gcc can compile a trivial program: done in 0.00s (at 00:03)
[EXTRA] Installing user-supplied crosstool-NG configuration
[DEBUG] ==> Executing: ‘mkdir’ ‘-p’ ‘/Volumes/CaSe/prefix/bin’
[DEBUG] ==> Executing: ‘install’ ‘-m’ ‘0755’ ‘/usr/local/Cellar/crosstool-ng/1.21.0/lib/ct-ng.1.21.0/scripts/toolchain-config.in’ ‘/Volumes/CaSe/prefix/bin/arm-unknown-linux-gnueabi-ct-ng.config’
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step ‘(top-level)’
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@564]
[ERROR]
[ERROR] (elapsed: 756:57.00)
Any suggestions on how to debug this? Obviously it’s attempting to do something given the processor utilization but… what the heck is it hung up on?
One thing worth noting… early in the process the build log had an error with regards to not being able to find the ginstall tool. Since this was at the beginning of the test process I figured it hadn’t gotten to building anything yet and as such, ct-ng clean was not needed (maybe I’m wrong). As part of running ct-ng build it creates a directory structure (running clean deletes this structure and all the tools included) at /YourCaseSensitiveDirectory/.build/tools/bin. My solution was to just cp install ginstall, and that got me past that error. Not sure if that’s contributing to anything but I thought it worth mentioning. Is there another way around the missing ginstall problem?
Cheers, Joe