I've had several problems installing Code::Blocks. Ubuntu .deb package didn't work, rpm's with alien failed, and when compiling from source autoconf and automake threw several errors (as Code::Blocks does not follow the usual rules for building from source, and its BUILD file is not helpful at all), the main compilation file was not executable and had DOS crlf, etc.
So, these are the steps to be followed to get this working (I think these instructions should be added to the BUILD file):
Previously:
1. Make sure you have the latest autoconf, automake and libtool ( 'apt-get update; apt-get install autoconf automake libtool' could do it if your sources are Internet repositories).
2. Run 'apt-get install sysutils'. You will need it for dos2unix.
3. Become root ( 'su -' ).
WXWIDGETS INSTALLATION
1. Download wxGTK-2.6.2.tar.gz from
www.wxwidgets.org. No debian package seemed to provide the Code::Blocks required wx-config.
2. Run 'tar -xvzf wxGTK-2.6.2.tar.gz' (from a console, standing in the same directory as the file...)
3. Run 'cd wxGTK-2.6.2'
4. Run './configure --prefix=/usr' (if you don't want to compile the samples, check ./configure --help). I use that prefix so I don't have to use /usr/local/bin|lib. Disclaimer: if you set the prefix to /usr, compiled files could get overwritten by apt-get, as /usr/bin|lib is its territory. If you don't, you'll have to modify PATH and LD_LIBRARY_PATH before attempting Code::Blocks installation. Your choice...
5. Run 'make' and get a cup of tea. Later, go get a cup of coffee. Drink them slowly.
6. Run 'make install'
CODE::BLOCKS INSTALLATION
1. Download codeblocks-1.0rc2.tgz from
www.codeblocks.org2. Run 'tar -xvzf codeblocks-1.0rc2.tgz'
3. Run 'cd codeblocks-1.0rc2'
4. 'bootstrap' needs to be executed. Its permissions are wrong. Even if they were right, the line have DOS terminators and you won't get much from this. As it is not the only file with this problem, run:
'find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" | sed "s/.*/\"\\0\"/" | xargs dos2unix'
in a single line. WARNING: make sure you are in the right directory. You could mess your whole Linux box with this command...
5. Run 'sh bootstrap'. Some warnings could appear.
6. Run './configure --prefix=/usr'. As stated before, you can leave the prefix behind. If this command failed, you are missing some crucial Debian package. 'apt-get' and the packages section in
www.debian.org are your friends.
7. Run 'make'. Check if there is some coffee left.
8. Run 'make install'.
9. Drop root privileges (Ctrl-D, if you made a 'su'), and run 'codeblocks'. Have fun !