gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: A beginner's question


From: Rudolf Schubert
Subject: Re: Fwd: A beginner's question
Date: Fri, 7 Apr 2023 17:19:03 +0200 (CEST)

Hi Michael,

your statement "we will get that fixed" gives me some hope;-)

I just postet some (lengthy) text to the list. Perhaps this will
suffice to confuse people already so that no further posts are
necessary?

But honestly, I am happy to share code because this is just a
'fun project'. But I didn't want to bother people too much with
tons of (old) code. I wanted to ask at least semi intelligent
questions so there might be a chance that people do care.

Let's see what the best way will be trying to clarify my problems/
questions. Since this is a cgi, the binary may also simply be started
on the command line. It just searches for it's 'data base', the
location of which is currently hard coded for the localhost. The
program can handle more than one data base and depending on the
URL the appropriate data base is used. If invoking the binary just
'as is' the following path on the local machine is used for the
data base file:

/home/rudolf/lern/www/squash/data/season

I'm also using a lock file:

/tmp/lock_squash

But again, I don't want to bore people with details but would just
like to know how we could proceed most easily for everobody!

BR

Rudolf


--
Rudolf Schubert                 \
Kirchstr. 18a                    \  mailto:rudolf@muc.de
82054 Sauerlach                   > http://www.dose.muc.de
Deutschland                      /
Tel. 08104/908311               /


On Fri, 7 Apr 2023, Michael Riedl wrote:

> Hallo Rudolf,
> 
> perhaps a good idea to share some code you made some modifications on "to work
> around errors I suspect might be caused by GM2".
> 
> I remember I had some (small) issues at the beginning porting code from XDS
> Modula-2 to GM2 in a similar situation. So I hope I can help out at least
> in some cases. For example GM2 is more strict with type compatibility - I
> detected some issues I was never aware about at that time...
> But now I can compile with both compilers (and AWD M2) with close to zero
> modifications. Do not know GPM but "we will get that fixed" :-)
> 
> Gruß
> 
> Michael
> 
> Am 07.04.23 um 11:52 schrieb Rudolf Schubert:
> >           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               /
> > 
> > 
> 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]