As you guys know, Ubuntu 11.10 has gcc g++ v4.6.x, building Android 4.0 in Ubuntu 11.10 will require gcc g++ v4.4, This is a pretty BASIC tutorial, easy to follow.
I'm going to tell you how to change versions (downgrade)-
First thing is first, install gcc g++ if you don't already have it, most likely you do.
Now check the version-
gcc --version g++ --version
The output should say 4.6.x
Once you have those installed, we will now install 4.4
All you have to do is "sudo apt-get install gcc-4.4" and "sudo apt-get install g++-4.4"
We will now link:
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
ln -s /usr/bin/g++-4.4 /usr/bin/g++
You may have to restart the terminal, but after you do this, you should be able to run "gcc and g++ --version" and have version 4.4
After doing this and installing all the other necessary programs to build, I have no problems compiling ICS on 11.10