gm2
[Top][All Lists]
Advanced

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

Re: Compilation failure on macOS


From: Gaius Mulley
Subject: Re: Compilation failure on macOS
Date: Fri, 11 Nov 2022 14:05:21 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Guy <guyfieri@getbackinthe.kitchen> writes:

> Greetings, I was trying to compile this project (the most recent 
> `devel/modula-2` branch) on macOS 13.6 using GCC 11.3 (acquired from 
> MacPorts), and it proceeds (seemingly) without issue for quite awhile, up 
> until it tries to link with the object file `m2rte.so` where I receive:
>
> `g++ -std=gnu++11 -g -I/opt/local/include        -fno-rtti plugin/m2rte.o 
> -shared -o plugin/m2rte.so
> Undefined symbols for architecture x86_64:
>   "integer_zerop(tree_node const*)", referenced from:
>       gimple_call_addr_fndecl(tree_node const*) in m2rte.o
>   "rtegraph_init()", referenced from:
>       _plugin_init in m2rte.o
>   "rtegraph_finish()", referenced from:
>       (anonymous namespace)::analyse_graph(void*, void*) in m2rte.o
>   "rtegraph_lookup(gimple*, tree_node*, bool)", referenced from:
>       (anonymous 
> namespace)::pass_warn_exception_inevitable::execute(function*) in m2rte.o
> …`
>
> Quite a few more similar symbol errors are emitted for the same file before 
> progress eventually halts with:
>
> `ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> <stdout>:2190:16: warning: function 'yyinput' is not needed and will not be
>       emitted [-Wunneeded-internal-declaration]
>     static int yyinput (void)
>                ^
> make[2]: *** [plugin/m2rte.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
> 28 warnings generated.
> 4 warnings generated.
> make[1]: *** [all-gcc] Error 2
> make: *** [all] Error 2`
>
> I saw that sometime last year someone seemed to be able to successfully 
> compile the project on OSX 10.5.8 for PowerPC, though I am unsure what has 
> exactly changed since then. I am certainly aware that this is quite a 
> specific issue to my local environment and understand if you can’t or don’t 
> want to help, but thought I would at least ask if you had any tips on why it 
> might failing on this specific file/point in the compilation/link process?
>
> I also noticed that the final error indicates it is from clang, which may 
> likely be apart of the issue that I will have to look more into personally.
>
> Thank you 

Hi Guy,

thanks for the email - there appears to be gathering interest in getting
modula-2 on macOS.  The testing compilefarm has a macOS machine
available and I will examine this bug together with a bug report which
also came in yesterday.  Porting tends to improve the code base and
expose bugs.

The m2rte.so is just a plugin - which could be sidelined if necessary.
What happens if you:

  cd builddir
  cd gcc ; make cc1gm2 ; cd ..
  # if successful then perhaps try
  make -k
  make -k install

The driver:

  gm2 -fno-m2-plugin hello.mod

will invoke the compiler without referencing m2rte.so

regards,
Gaius



reply via email to

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