Ubuntu has a few cross compile toolchains available, for example:

sudo apt install gcc-arm-linux-gnueabi # for arm chips
sudo apt install gcc-arm-linux-gnueabihf # for arm chips with floating point registers

Crosstool-NG is a great help in getting the tougher cross compile toolchains built. I was targeting a specific ARM 926EJ-S chipset, and the vendor had their own toolchain.

Trying to cross compile on newer versions of ubuntu was a headache though. I would get “FATAL: kernel tool old” errors from the executable on the target system, and the autotools configure option to limit kernel version (–enable-kernel=…) did not fix it.

In the end, I was able to build zlib and openssl and libwebsockets statically, with a Crosstool-NG toolchain on an older ubuntu, but had to deal with this glibc bug by explicitly specifying the system lib folder, or getaddrinfo, gethostbyname, and all other NSS based functions just plain old failed (lost some hair to that fine feature – cmon RMS and Drepper, get along better so your code doesn’t stink…):

LD_LIBRARY_PATH=/lib ./my_static_app

Details as usual on the wiki. Onwards.

I dropped my Macbook Pro laptop on the concrete sidewalk on the short walk to work a couple weeks ago. I had popped the messenger bag shoulder strap up off my shoulder to pull my coat out, and didn’t quite catch it on the way down. Blammo. Turns out that when push comes to shove, concrete retains its shape a lot better than aluminum. All the USB ports on my Macbook Pro 5.2 were instantly transformed into trapezoids, as the corner crumpled up like a soft soda can.

Those Apple folks know what they’ve got going, and do a good job of treating people with no regard for money well. $600 later I had a lot of heartburn, but also had a 50% brand new MBP that worked perfectly. Too bad the 50% included the hard drive. 🙁

Anyway… long story short -too late-… my clean hard drive emboldened me to finally install all the OSes I needed. What does it take to get my four favorite ones squeezed onto one fat-assed macbook pro? A little more pain than should really be necessary. The moral of the story is that this is the stuff you play with when you don’t really care if you blow all your data away. No, really. Back up anything you care about first. Technical details start up after the break… (continued…)