Sunday, June 7, 2009

Compiling the Toolchain

Since my goal is development of embedded systems, I decided to use the uClibc library and compile a cross compiling toolchain to target an i486 with uClibc. I downloaded a compressed version of the library and had to decide between a .tar.gz and a .tar.bz2. Like I know the difference! went with the bz2. It took a while to download. I unzipped and ran:
make menuconfig
I selected some options I'd like to have access to and then ran:
make
It didn't take long to fail. There was no 'bison'. No 'flex' (didn't I try that before?). A few other missing items. I googled and found out how you install a needed binary:
apt-get install name-of-the-missing program
There is a slightly overwhelming GUI for it as well where you can look at the CD (I think) or the universe or the multiverse. I'm still fuzzy on the difference between the universe and the multiverse... Anyway, after a few make/apt-get cycles, it was off. But it was late--about 2am. So I went to sleep.

When I woke up, it was stopped--on an error. I knew it wouldn't be smooth. Apparently, I need to install g++. Really? I installed them. And restarted. Now it would compile for an hour or so between failures. It did a lot of downloading. Some of the failures were tricky to figure out. For example, when autoreconf was missing, I typed:
apt-get install autoreconf
but it didn't work. I googled and learned what I had to enter:
apt-get install autoconf
so I was off again.

I had some problems with the Ruby install--I think it was trying to use Ruby scripts with the newly compiled Ruby which would sort of work since it was a i486 build, but I'm not sure the libraries would link correctly on the host. I removed it from the .config with make menuconfig to get it past the error.

By the time the afternoon rolled around, it finished. So, now I have a toolchain that may or may not work. Time to start other stuff.

No comments:

Post a Comment