Hi,
I'm about porting an old Programm developped with Gardens Point
Modula-2
(GPM) and facing a few problems. But before I possibly ask silly
questions I'd like to know how I can make sure to use the latest
version of GM2.
I'm working on a (current) Arch Linux with this gcc version:
gcc (GCC) 12.2.1 20230201
I started with the instructions found here:
https://www.nongnu.org/gm2/12/development.html
The idea was to have a local installation directory, so my
configure command was this:
../gcc-git-devel-modula2/configure --prefix=<some_local_inst_dir>
--enable-languages=default,m2 --enable-libgm2
But during 'make install' I got this error:
/usr/bin/ld: build/genmodes.o: relocation R_X86_64_32S against
`.rodata' can not be used when making a PIE object; recompile with -fPIE
So finally I changed my configure command:
../gcc-git-devel-modula2/configure --prefix=<some_local_inst_dir>
--with-system-zlib --enable-default-pie --enable-default-ssp
--enable-languages=default,m2 --enable-libgm2
and could easily compile the famous hello.mod:
<some_local_inst_dir>/bin/gm2 -g hello.mod
ldd showed this:
rudolf@archkiste: /mo1/more_homedata/lern/gpm_gm2 $ ldd a.out
linux-vdso.so.1 (0x00007ffe00770000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fcb2ca00000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fcb2c918000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fcb2cc9f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fcb2c731000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2
(0x00007fcb2cd0e000)
rudolf@archkiste: /mo1/more_homedata/lern/gpm_gm2 $ ./a.out
hello world
This was the easy part. Then I tried compiling my 'big' programm
which I wanted to port but did not succeed. I played around a bit
but with no success. Again I saw 'PIE' in some messages and I
guessed if the problem might be that my Arch system does not use
PIE but GM2 was now compiled with PIE and that this will go wrong.
So I installed a Debian sid with gm2 in a virtual machine (BTW,
gm2 --version says this: gm2 (Debian 12.2.0-14) 12.2.0) and with
this installation I am now finally able to compile and run a
modified version of my 'big' programm.
The modifications I made were to work around errors I suspect
might be caused by GM2. When using GPM, however I do not need
to use these workarounds! But I'm not sure if GM2 in Debian sid
really is the latest version. So I first want to make sure I'm
using the latest version. And thus my question simply is:
How will I do this?
BR
Rudolf
--
Rudolf Schubert \
Kirchstr. 18a \ mailto:rudolf@muc.de
82054 Sauerlach > http://www.dose.muc.de
Deutschland /
Tel. 08104/908311 /