Euphoria 4.0b3 on ARM
- Posted by rkdavis Aug 21, 2010
- 1409 views
A few months ago I was trying to port Euphoria to an ARM based device but as per normal when it didn't work first time (or the next 20 to 50 times) I got side tracked with other things and some other more important projects. One of which was porting OpenCOBOL to ARM based devices. I finished the other projects a couple of days ago and decided that between finishing those and starting some new ones i'd have another go at building Euphoria for ARM using what've learnt in the meantime.
One of my biggest stumbling blocks originally was that my target device uses uClibc, which seems to be the cause of alot of problems even with various patches and mods I made to the Euphoria source code. I got it to build eventually and run but it wouldn't accept any command line options. I suspect that the string handling functions are fubar'ed in the version of uClibc i was forced to use as it is very old.
So as I have had more success building for generic ARM and glibc/eglibc I decided to remove uClibc from the equation and build for glibc/eglibc.
To further simplify matters I decided to use my Scratchbox2 setup (I have written up how to set up scratchbox2 on my blog, although it is mostly about setting it up for my target device if you change all references to zubuntu to your target rootfs they are generic enough).
After setting up Scratchbox2, download (or build) the x86 linux binaries for Euphoria and put them in your path and then download and extract the Euphoria sources.
Follow the Euphoria build instructions but instead of make use sb2 -R make The build will error after a while building becallc_conly.c you need to edit the file and either remove the first 612 lines or the 2nd 612 lines and then restart the make with sb2 -R make again and after a while you will have ARM binaries in the build directory.
I've only done cursory tests but everything seems ok at least within scratchbox2. I can't currently test on a real ARM based device as I don't have one that is setup to use glibc/eglibc at the moment.
In theory the same process should work for any processer/toolchain that scratchbox2 supports which includes MIPS and Sparc...
I hope this is useful to someone.
Russell