[m-users.] Strange build problem with Mercury after installing Pandoc

Volker Wysk post at volker-wysk.de
Sat Jun 18 19:06:35 AEST 2022


Am Samstag, dem 18.06.2022 um 08:43 +0100 schrieb Sean Charles (emacstheviking):
> Hi,
> I wondered if anybody had seen this and knew how to deal with it... for weeks I've been happily developing my program with Mercury on my new M1 macMini, but this morning I needed to install Pandoc using brew, but in order for it to work I had to use this command line, found from googling it:
> 
>     $ arch -arm64 brew install pandoc
> 
> I tested pandoc with a small markdown to pdf run and it was fine, then I attempted to rebuild my application and for the first time ever I got this error:
> 
> ld: warning: ignoring file /usr/local/mercury-22.01.1/lib/mercury/lib/libgc.dylib, building for macOS-x86_64 but attempting to link
>  with file built for macOS-arm64
> ld: warning: ignoring file /usr/local/mercury-22.01.1/lib/mercury/lib/hlc.gc/libmer_std.dylib, building for macOS-x86_64 but attemp
> ting to link with file built for macOS-arm64
> ld: warning: ignoring file /usr/local/mercury-22.01.1/lib/mercury/lib/hlc.gc/libmer_rt.dylib, building for macOS-x86_64 but attempt
> ing to link with file built for macOS-arm64
> Undefined symbols for architecture x86_64:
>   "_GC_init", referenced from:
>       _init_gc in mlpt_init.o
>   "_GC_malloc", referenced from:
>       <predicate 'classifier.classify_line'/3 mode 0> in classifier.o
>       <predicate 'classifier.classify_file'/4 mode 0> in classifier.o
>       _cleaner__markdown_out_3_p_0_1 in cleaner.o
>       <predicate 'splitter.lines_to_blocks'/2 mode 0> in splitter.o
>       _splitter__lines_to_blocks_2_p_0_1 in splitter.o
>       <predicate 'weaver.UnusedArgs__pred__code_out__[1]_0'/4 mode 0> in weaver.o
>       _weaver__duplicate_check_2_p_0_1 in weaver.o
>       ...
> 
> The full file is very very long but it seems to somehow think that the default build architecture is intel not arm64. I have tried googling but so far to no avail, it has affected all of my Mercury projects on my machine, the same issue during linking.

This may be a stupid question, but have you tried to rebuild your application from scratch? Something like "make clean; make depend" and then make the application.

Or, maybe, try to install pandoc with "arch -x86_64 brew install pandoc". (That's just guesswork by me.)

Good luck,
Volker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220618/900b1280/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220618/900b1280/attachment.sig>


More information about the users mailing list