First one needs to create a debian installation containing the relevant compiler tools.
The required steps are:
As root: "apt-get install build-essential flex expect dejagnu"
The first two packages are used to compile, the latter two for running the testsuite.
As regular user: "mkdir -p $HOME/opt/build-4.1.2"
Then download and make:
- wget http://floppsie.comp.glam.ac.uk/download/c/gcc-4.1.2+gm2-cvs-latest.tar.gz to $HOME/opt;
- tar xvf gcc-4.1.2+gm2-cvs-latest.tar.gz
- cd $HOME/opt/build-4.1.2
- ../gcc-4.1.2+gm2-cvs-latest/configure --enable-languages=c,c++,gm2 \
--disable-multilib --enable-checking=all --prefix=$HOME/opt - make SHELL="/bin/bash"
- make SHELL="/bin/bash" install
- export PATH=$HOME/opt/bin:$PATH
and you're done!
A small hello-world test:
- cd gcc-4.1.2/gcc/gm2/examples/hello
- make
- ./a.out
You can also run the gm2 regression tests to gain some more trust in the gm2 code:
- cd $HOME/opt/build-4.1.2/gcc
- make check-gm2
And for the paranoid amongst us:
- cd $HOME/opt/build-4.1.2/gcc
- make gm2.paranoid

Comments (2)
Nov 15, 2009
Anonymous says:
I obtain this result, at end of procedure: ..................... .................I obtain this result, at end of procedure:
.....................
.....................
makeversion has found a consistency error: the ../../../gcc-4.1.2+gm2-cvs-latest/gcc/gm2/gm2-libs/configure.in does not match the GNU Modula-2 release number
make[2]: *** [gm2/gm2version.c] Error 1
make[2]: se sale del directorio `/root/opt/build-4.1.2/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: se sale del directorio `/root/opt/build-4.1.2'
some idea of cause?
Thaks.
Nov 15, 2009
Anonymous says:
The cause was the number of version of pack gcc-gm2. I used the version gcc-4.1...The cause was the number of version of pack gcc-gm2.
I used the version gcc-4.1.2+gm2-20091101 and installed fine !!
Greetings and Thanks.
Add Comment