Building my own ECL for and on the Raspberry Pi

qr-code for this page's url

Just a quick update on my progress with ecl on the Raspberry Pi.

The hacky "fix" for flexi-streams mentioned in the previous post only got me past that hurdle but the babel package also fails with lacking unicode support. So in the end I bit the bullet and concentrated on getting a version of ecl compiled that does support.

Getting the source (see this page for all options) is a easy as a

git clone git://ecls.git.sourceforge.net/gitroot/ecls/ecl

and building as easy as

./configure --prefix=/usr/local --enable-unicode=yes; make

However that soon leads to a fatal error about lacking features of the processor. A bit of searching the web finds that we should tell the system what sort of CPU we have

./configure --prefix=/usr/local --enable-unicode=yes "CFLAGS=-mcpu=arm1176jzf-s"; make

That works better but fails to build the libatomic-ops because of lack of some CAS operation in the processor. The mailing list was of great help here, see the thread on this problem.

In short: the solution is to properly get the system libatomic-ops in (requires a lot of autoconf hacking which I don't understand) or not to use threads (which I also don't want to do).

For the moment I got around this by passing yet another flag which seems to tell the system to use pthreads to emulate the atomic operations needed. This can surely not be very efficient but it seems to do the trick for the moment.

The correct configure call is thus:

./configure --prefix=/usr/local --enable-unicode=yes "CFLAGS=-mcpu=arm1176jzf-s -DAO_USE_PTHREAD_DEFS"

With that a simple make; sudo make install works (but takes a looooong while to build).

If you want to try this, don't want to wait for it to build and trust me, you can download the install here (2.8MB; md5sum b01f93fec982aa17e286fd195fa6c081).

Happy hacking!