[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] gm2
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] gm2 |
Date: |
Mon, 12 May 2014 09:36:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Charles Bradshaw <address@hidden> writes:
> Gaius
>
> OK progress. The first completes, but the second produces the link
> error:
>
> address@hidden executive]$ gm2 -g -flibs=pim-coroutine,pim
> testexecutive.mod -lpth
> /tmp/ccOHKUT5.a(cct6rWqQstart.o): In function `init':
> /home/brad/modula2/examples/executive/testexecutive_m2.cpp:78: undefined
> reference to `_M2_pth_init'
> /tmp/ccOHKUT5.a(cct6rWqQstart.o): In function `finish':
> /home/brad/modula2/examples/executive/testexecutive_m2.cpp:106:
> undefined reference to `_M2_pth_finish'
> collect2: ld returned 1 exit status
Hi Charles,
ops I missed the iso libraries at the end:
so:
gm2 -g -flibs=pim-coroutine,pim,iso -c testexecutive.mod
gm2 -g -flibs=pim-coroutine,pim,iso testexecutive.mod -lpth
should hopefully work (for 4.1.2 gm2, maybe 4.7.3 as well - although I'm
currently seeing 32bit/64bit confusion in some of the 4.7.3 libraries -
which is being worked on at present). The -lpth is required for the
context switch primitives.
regards,
Gaius
>
> That was using gm2 4.1.2
>
> Using 4.7.3 for the second produces:
> no source file found for module pth
>
> What is -lpth? I see no mention in man gm2 or gm2 --help
>
> Thanks Charles Bradshaw
>
> On Sun, 2014-05-11 at 14:57 +0100, Gaius Mulley wrote:
>> Charles Bradshaw <address@hidden> writes:
>>
>> > Following my partial success with gm2 I tried to compile
>> > testexecutive.mod
>> >
>> > Now depending which version 4.7.3 or 4.1.2 I use I get various failed to
>> > find errors. Either the previously reported -fmakeall bug or with 4.1.2:
>> >
>> > address@hidden executive]$ gm2 -g -c testexecutive.mod
>> > failed to find definition module Executive.def
>>
>> Hi Charles,
>>
>> for the executive tests you need to use the SYSTEM module which includes
>> the PIM coroutine support, which is referenced by specifying the
>> libraries:
>>
>> gm2 -fsources -g -c -flibs=pim-coroutine,pim testexecutive.mod
>> gm2 -g -flibs=pim-coroutine,pim testexecutive.mod -lpth
>>
>> hopefully this should pull in the correct libraries. Note the library
>> ordering is important. (-fsources) is optional of course
>>
>> regards,
>> Gaius
>>
>>
>> > The output from this makes my brain hurt:
>> > address@hidden executive]$ gm2 -print-search-dirs
>> >
>> > So I append \n after the :
>> >
>> > install: /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/
>> > programs: =/home/brad/opt/libexec/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/libexec/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/libexec/gcc/i686-pc-linux-gnu/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/:
>> > /usr/libexec/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /usr/libexec/gcc/i686-pc-linux-gnu/:
>> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /usr/lib/gcc/i686-pc-linux-gnu/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/
>> >
>> > libraries: =/home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/lib/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../i686-pc-linux-gnu/4.1.2/:
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../:/lib/i686-pc-linux-gnu/4.1.2/:
>> > /lib/:
>> > /usr/lib/i686-pc-linux-gnu/4.1.2/:
>> > /usr/lib/
>> >
>> > Non of which is useful because the missing def is else where:
>> >
>> > address@hidden executive]$ locate Executive.def
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/gm2/pim-coroutine/Executive.def
>> >
>> > So using the -I option:
>> > address@hidden executive]$ gm2 -g -c
>> > -I /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/gm2/pim-coroutine
>> > testexecutive.mod
>> > failed to find definition module SYSTEM.def
>> >
>> > But SYSTEM.def is in the included path!
>> >
>> > address@hidden executive]$
>> > ls
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/gm2/pim-coroutine/SYSTEM.def
>> > /home/brad/opt/lib/gcc/i686-pc-linux-gnu/4.1.2/gm2/pim-coroutine/SYSTEM.def
>> >
>> >
>> > If I do, as is suggested in the README:
>> > address@hidden executive]$ make
>> > I see:
>> > failed to find definition module
>> >
>> > ~ o ~
>> >
>> > This is all very confusing!
>> >
>> > Can I set some environment variables to fix these problems?
>> >
>> > ~ o ~
>> >
>> > May I respectfully suggest that compiling default search paths into gm2,
>> > or wherever they go, is a bad idea.
>> >
>> > Good old Topspeed Modula 2 used a configuration file called M2.RED which
>> > lived in the current directory, thus:
>> >
>> > When working in the directory c:\ihi\control
>> >
>> > C:\ihi\control\>type M2.RED
>> > *.mod = .;c:\m2\source
>> > *.def = c:\ihi\control\def;c:\m2\lib
>> > *.obj = c:\ihi\control\obj;c:\m2\lib
>> > *.dat = c:\sigma
>> > *.exe = c:\ihi\control;c:\m2
>> > *.map = c:\ihi\control
>> > *.dbd = c:\ihi\control
>> > *.db$ = c:\ihi\control
>> >
>> > The contents says it all.