gm2
[Top][All Lists]
Advanced

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

Re: Linker errors - gm2 on Ubuntu Jammy


From: Gaius Mulley
Subject: Re: Linker errors - gm2 on Ubuntu Jammy
Date: Thu, 29 Feb 2024 21:33:42 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Rob Malpass <rmluglist2@gmail.com> writes:

> Hi all
>
> First post here.   I've been looking for a m2 compiler for a bit of nostalgia 
> after 30+ years since I did m2 at Uni.
>
> Trouble is, I'm compiling a very simple m2 program with no calls to any 
> libraries at present: a simple MODULE test; BEGIN END test. and it's throwing 
> out:
> gm2 -I 
> /usr/lib/gcc/x86_64-linux-gnu/11/m2/m2log,/usr/lib/gcc/x86_64-linux-gnu/11/m2/m2cor
>  test.mod
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_select'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_initSemaphore'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_wait'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_signal'
>
> It seems (sorry if I'm wrong) that there are 5 "flavours" of library (pim, 
> cor, iso etc) so I've tried it with -I followed by each and a combination of 
> all.   It would
> appear from the ld errors that it's something more  fundamental than just 
> that.
>
> FWIW I installed it very simply with sudo apt install gm2 on Ubuntu Jammy and 
> the install didn't create any errors.
>
> I suspect it's something obvious but grateful for any help.
>
> Thx
> R

Hi Rob,

if I recall correctly with gm2-11 linking requires the library
dialect (and order) to be specified:

$ gm2 -flibs=pim,iso test.mod

should do the trick.  The linking mechanism was completely re-designed
for gcc-13 onwards, allowing:

$ gm2 test.mod

to work as expected

regards,
Gaius



reply via email to

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