Fixing linking errors caused by MacPorts’ incompatible binaries

I was recently compiling SFML, to see whether it would be a viable replacement for SDL in Plinth, when I came across the following error:

ld: warning: in /opt/local/lib/libfreetype.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

What this means is that I needed libfreetype, but the version installed by MacPorts (into /opt/local/lib, was a 32-bit version).
This is particularly odd, because I was on a 64-bit mac, and I don’t really need 32-bit libraries. Apparently, certain packages in MacPorts don’t get the memo and install only i386 binary libraries anyway.

Upon googling, I saw a lot of people encountering these errors during mac compilation, with all sorts of weird solutions. In many of these cases, the quick fix is simply to tell MacPorts to install all binary versions of the library. This takes up a bit of extra space, since you’ll get other versions of the library for other platforms that you don’t need, but it includes the 64-bit libraries that you do need.

To do this, simply tell MacPorts to install your package with the +universal argument:

$ sudo port install freetype +universal

Voila, linking errors begone.

Posted in Linux, Plinth, Projects | Tagged |

Enabling infrastructure wifi on the ARDrone with DHCP

There are a number of different articles on “patching” the AR Drone to connect to infrastructure. I’m going to talk a little about the technical details of what is going on, based on my own experience.
Read More »

Posted in Hardware Hacking, Projects, Uncategorized | Tagged , , , |

Fixing an SQLite version mismatch between Subversion and PHP5

If you are running an Apache2 server and mod_dav_svn, and you upgrade to the latest version of subversion, you might suddenly lose the ability to access newly created respositories, but still be able to access your older repositories.

When you access the new repositories, you will get:

svn: Could not open the requested SVN filesystem

And when you look in /var/log/apache/error_log, you will see:

[Wed Apr 21 15:19:18 2010] [error] [client xx.xx.xx.xx] (20014)Internal error: SQLite compiled for 3.6.11, but running with 3.3.7
[Wed Apr 21 15:19:18 2010] [error] [client xx.xx.xx.xx] Could not fetch resource information.  [500, #0]
[Wed Apr 21 15:19:18 2010] [error] [client xx.xx.xx.xx] Could not open the requested SVN filesystem  [500, #200030]
[Wed Apr 21 15:19:18 2010] [error] [client xx.xx.xx.xx] Could not open the requested SVN filesystem  [500, #200030]

Read More »

Posted in Hardware Hacking, Projects | Tagged |

Making a cheap electrical wire caddy

For many hobbyists, having a bit of wire around is a must.  But outside of the lab, I’ve always had trouble finding useful ways to store wire in my kits.  Finally, I got frustrated and lightly modded a line spool box, used for fishing, to do the trick.  Here’s what I ended up with:

My wire caddy

Read More »

Posted in Electronics | Tagged , , |

Creating Amazon AMI images for ROS

Simulating large numbers of robots can be a pain. I’ve decided to experiment with building Amazon Machine Instances of ROS to enable me, and anyone else, to quickly launch any number of pre-installed ROS machines and simulate running robots. I’m not sure if this will work, so bear with me…

Read More »

Posted in Linux |

Installing Ubuntu 9.10 on the BeagleBoard

Since there don’t appear to be any clear step-by-step instructions for doing this, I figured I would make a nice instructional post for people that don’t spend their whole day hacking embedded hardware.  This assumes you have basic linux knowledge and a BeagleBoard you don’t mind completely gutting out to put on Ubuntu.

Read More »

Posted in Hardware Hacking, Linux |

Removing packages + dependencies from Synaptic in Ubuntu

So, a complaint that has come up a number of times over the years is the fact that you can open up Synaptic package manager, browse through the history, find a package you installed and all of the dependencies that came with it, and… nothing.  It’s just a text log, you can’t select or un-install those packages.

Now, aptitude auto-remove almost solves this problem, but there are still cases where for one reason or another, auto-remove is fudged up or something, or you just want to uninstall a few packages.

For these situations, I offer the following simple, terminal-based hack solution:

  1. Open Synaptic package manager, go to File>History, and browse around until you find the packages you want.
  2. Select the packages and copy them (or just select them and use the magic middle click buffer)
  3. Open up a text file, say foobar.log, and paste the list of packages into this file
  4. Run the following command in a terminal:
sudo aptitude remove `cat foobar.log | awk '{gsub(/\(.*\)/,"");print}' | xargs echo`

This will tell aptitude to remove all of the entries that you pasted into foobar.log.  Awesome!

Posted in Linux | Tagged |

Fixing AP handover on the Gumstix Verdex + wifi module

I was using my Gumstix Verdex to control an iRobot Create with the ever handy Element Sticky board when I encountered a serious problem.  The network setup around here has a ton of access points with the same SSID.  When you move throughout the network, most sane wireless hardware does what is called a “handover.”  The wireless adapter detects that the signal to the current access point is weak, and then scans and reassociates with a stronger AP.  The process isn’t always seamless, but it happens.  Apparently, the Marvell 88W8385 (the wireless module used by the Verdex) has no such support in its driver/hardware.  So as the Create trundles along, the wifi signal just keeps getting weaker, until it starts dropping out.  As another wonderful feature of the driver, when the wifi signal has dropped out, the module refuses to execute any commands.  That’s right, you can’t even ifdown wlan0 to reset/reassociate the stupid thing.  If you try, you get a helpful: NETDEV WATCHDOG: wlan0: transmit timed out.

What’s a roboticist to do?  Well, obviously, create a software hack that forces the gumstix to reassociate when its signal strength to the current AP gets low!

Read More »

Posted in Hardware Hacking |

ARToolkit Plus recipe for Gumstix Verdex

After much messing around, I was able to create a surprisingly compact bitbake recipe for compiling ARToolkit Plus in OpenEmbedded.  Since qmake and qt3-embedded are already well-supported packages, it was just a matter of creating the right patch to the bizarrely placed “build/linux/” file.  This turned out to be quite easy.

The two key things to know are that qmake really wants to use gcc for linking, and that hidden in the file are the cpu architecture flags.  That just means the following options are needed:

QMAKE_CXXFLAGS = -march=armv5te -mtune=xscale
LIBS += -lstdc++ -lm

Then, it’s a matter of convincing qmake to use the existing qt3-embedded mkspec file.  This was a bit tricky, and I’m still not sure I did it right.  My solution was to throw a couple of exports into the recipe:

export ARTKP=${S}

Then, voila, we have a recipe that yields an ipk that installs ARToolkit Plus into /usr/lib on our gumstix!  If anyone wants it, feel free to grab the tarball and stick it in user.collections/packages.

Tarball of recipe: artkplus.tar.gz

IPK binary package: libartoolkitplus2_2.1.1-r0_armv5te.ipk

Posted in Hardware Hacking | Tagged , , , , |