gm2
[Top][All Lists]
Advanced

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

Re: GNU Modula-2 installation problem on Ubuntu


From: Gaius Mulley
Subject: Re: GNU Modula-2 installation problem on Ubuntu
Date: Wed, 05 Jun 2024 16:39:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Simon Dash <simonsdash@aol.com> writes:

> It occurred to me that the program file might need the same name as the 
> module name. So I renamed the file to Hello.mod and it does eliminate two 
> errors
> but still does not link:
>
> ~/code/m2> cp hello_world.mod Hello.mod
> ~/code/m2> gm2-11 Hello.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'
> collect2: error: ld returned 1 exit status
>
> ~/code/m2> gm2-12 Hello.mod
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_select'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_initSemaphore'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_wait'
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/m2/m2pim/libm2pim.so: undefined 
> reference to `RTco_signal'
> collect2: error: ld returned 1 exit status

Hi Simon,

for gm2-12 you need to specify the library dialect order.  So for example:

$ gm2 Hello.mod -flibs=pim,iso,cor

should do the trick.  This is fixed in gm2-13 onwards as the linking
mechanism was rewritten,

regards,
Gaius



reply via email to

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