ubuntu on the mac

I have a new 11" mac air with lots of disk and ram.

I'm trying to figure out the best way to configure it for llvm development on ubuntu.

Bootcamp or Virtual Box (or other Virtualization).
Bootcamp seems like it would be a nuisance.

This is just not my main development machine but it's very portable. :slight_smile:

Do your LLVM development on Mac OS X :slight_smile:

It depends on what your needs are. Using VirtualBox will probably be the easiest. It also allows you to run both Mac OS X and Ubuntu simultaneously. The downside is that it will be slower than running Ubuntu natively.

I say, try running in VirtualBox first.

Do your LLVM development on Mac OS X :slight_smile:
Should work well. Apple is one of the bigger supporters of LLVM, so I’d hope OS X would be a suitable dev platform.

It depends on what your needs are. Using VirtualBox will probably be the easiest. It also allows you to run both Mac OS X and Ubuntu simultaneously. The downside is that it will be slower than running Ubuntu natively.

I say, try running in VirtualBox first.
Not much slower. VBox does an amazing job at getting near native performance on modern machines (those with nested paging etc.). This is definitely the best option if your computer has ~2g ram and 2+ cores. Give the Ubuntu VM 2g and 1 (maybe 2) core/s and it should be fine.

Also, look into seamless mode. It lets you use windows opened in the VM in the host OS. That sounds vague. Just Google it.

Not much slower. VBox does an amazing job at getting near native performance on modern machines (those with nested paging etc.). This is definitely the best option if your computer has ~2g ram and 2+ cores. Give the Ubuntu VM 2g and 1 (maybe 2) core/s and it should be fine.

I use VirtualBox (hosting a FreeBSD VM) on a MacBook Pro for most of my LLVM development.

Also, look into seamless mode. It lets you use windows opened in the VM in the host OS. That sounds vague. Just Google it.

Or set up a loopback network adaptor and ssh in. Most of the reason I use OS X is that their Terminal.app doesn't suck nearly as much as the other terminal emulators I've used. It happily persists directory state, so I have a little script that creates a temporary directory for each ssh session storing a tmux id and so I can resume terminal sessions across host machine reboots, without the windows moving.

David

Try iTerm2 with tmux integration.

Off topic for this list, but I've tried iTerm and found a great many UI issues with it, not to mention its propensity for crashing, make it far from useable for daily operation.

Oh, and it only appeared to manage local tmux sessions, so is useless for my use-case where I only care about remote ones.

David

I’ve used both Ubuntu natively and Arch on a VirtualBox VM on a 2011 MBA. Unless you need native-speed GPU acceleration, I would recommend the VirtualBox route. You have to jump through a few hoops to get Ubuntu installed natively (install rEFIt, partition the drive), and I’ve read Ubuntu still has some issues with the 2013 MBAs [1]. Arch (and Ubuntu) in a VirtualBox VM has worked mostly flawlessly for me and are very easy to set up. Battery life takes a hit, but its not outrageous. The biggest problem I’ve had is managing disk space on the puny 128GB SSD.

[1] http://www.phoronix.com/scan.php?page=article&item=apple_mba2013_ubuntu&num=1

At work, it takes significantly longer to boot our Ruby on Rails application on a virtual machine than natively. I also noticed that disk access can be quite slow on a virtual machine compared to native.

What you could do is single boot Ubuntu using a program called refit.

It takes a bit less than 10 minutes for me to do a full build of LLVM+Clang in a FreeBSD VM with 2GB of RAM allocated on my MacBook Pro. The I/O speed is slower than native, but it is still faster than building natively on the Core i5-based Ubuntu box that I tried recently (both machines have SSDs - if you're doing a lot of builds, mechanical disks will cripple your productivity).

Of course, the 24 core machine we have in a rack with 256GB of RAM is noticeably faster - it does a clean build in 3 minutes - but it's less convenient to carry around (and a lot louder!).

David