Saturday, October 13, 2007

Lego Mindstorms: OS X lejOS Installation Gotcha: libusb

If you're installing the Linux version of lejOS on OS X, don't use the libusb you get from MacPorts (formerly DarwinPorts). I don't know what's wrong, exactly - probably something to do with the file's location, and where the lejOS build process looks for it - but your safest bet is to install libusb directly from SourceForge.

All you do is download the source code, double-click it until it turns into a folder (I'm assuming this post may eventually attract nontechnical or less-technical readers), and then use Terminal to go to its directory. You'll need some Unix-fu to get there, but when you're in that directory, do the following:

sudo make install

And you should be good to go.

I haven't gotten past the next level yet (so to speak), but when I do I'll post a walkthrough.

By the way, if you got Maximum Lego NXT: Building Robots With Java Brains, you may have noticed that the book says lejOS has an OS X build to download on its home page, and you may have wondered how to reconcile that with the fact that lejOS does not have an OS X build to download on its home page, or, apparently, anywhere in the known universe. All I can say is I've been wondering about that too.

In the meantime, installing and compiling the Linux version is your best bet. Even though it isn't hassle-free, compiling Linux software on a Mac is very often possible with only a few steps (less hassle than installing a new video driver under Windows, for example).

Update: this isn't quite accurate. You need libusb-dev, not libusb. Also libbluetooth-dev and possibly gcj. Haven't installed it yet; will update if/when I get it working.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.