Cross-compiling for DroboFS: cURL 7.21.0

Hi everyone,

Here is another post on the cross-compile series for DroboFS.

Introduction: Why cURL?

This is another required library for rtorrent. In my opinion, one of the most efficient torrent clients. Performs amazingly well on ARM devices.

Overall compiling complexity: Medium.

Step 1: Background info

To be able to make use of this post, you need a VM configured as indicated in this post.

Step 2: Enter the cross-compiling environment

See step 2 of this post to see instructions on how to enter the chroot environment.

Step 3: Dependencies

If you want cURL to support SSL-based protocols such as HTTPS (and you most likely want that), make sure to compile openssl first.

Step 4: Get the source code

openssl’s website: http://curl.haxx.se/
Version: 7.21.0
Direct link: http://curl.haxx.se/download/curl-7.21.0.tar.bz2

Make sure that you are in the folder /root/code, then type:

wget http://curl.haxx.se/download/curl-7.21.0.tar.bz2 tar jxf curl-7.21.0.tar.bz2 cd curl-7.21.0

Step 5: Configuration

Here is why this is considered a “medium” complexity compile. cURL requires a special configure command:

ac_cv_path_PKGCONFIG=/usr/bin/pkg-config ac_cv_file___dev_urandom_=yes ./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm --with-ssl=/usr/arm

Explanation: the configuration for cross-compilation requires overrides for the PKGCONFIG location and to force the use of /dev/urandom. We place those two options before the configure line, and specify that we do want compilation with SSL.

This should return no errors.

Step 6: Compiling

Within the folder /root/code/curl-7.21.0:


Again, there should be no errors. If any errors are reported, make sure you performed steps 3 and 4 correctly. If you still have errors, make sure that the VM is properly configured (e.g. like I did the first time around, when I got the wrong toolchain, or forgot to ‘export’ the proper compiler flags).

Step 6: Installing

As simple as it gets:

make install

…which will place the compiled library under /usr/arm.

Then we package the whole /usr/arm and copy it over to the DroboFS, as indicated on step 9 here.


Now you can cross-compile any application that uses cURL, since the required headers are libraries are present in /usr/arm both in the VM and on the Drobo.