Am Freitag, 31. Januar 2025, 10:29:59 Mitteleuropäische Normalzeit schrieb 
Marvin Littlewood:
> Hello,
> 
> I have an Intel i5 MacBook Pro running MacOS 13.7.2 (Ventura), running
> Darwin Kernel 22.6.0. I installed the following, using MacPorts:
> 
> sudo port install gforth
> sudo port install mesa
> sudo port install yodl
> sudo port install gcc14
> sudo port install harfbuzz
> sudo port install texinfo
> sudo port install xz
> sudo port install mesa
> sudo port install xorg-server
> sudo port install automake
> sudo port install libtool
> sudo port install emacs
> 
> and ensured that GCC was being used as the compiler:
> 
> sudo port select --set gcc mp-gcc14
> 
> I then followed the next steps of the build procedure:
> 
> ./install-swig.sh --nosudo "--prefix=${PWD}/local"
> export PATH="${PWD}/local/bin:$PATH"
> ./autogen.sh # if not done previously
> ./configure CC='gcc -arch x86_64' --build=x86_64-apple-darwin13.7.2
> make
> 
> After configuration there were no errors or warnings, and initially the
> build proceeded as expected until:
> 
> make: Circular lib/gforth/0.7.9_20250130/amd64/libcc-named/libgfpthread.la
> <- gforth dependency dropped.
> make: Circular prim-fast.b <- gforth dependency dropped.
> GFORTH-FAST
> rm: gforth-fast-ll-reg: No such file or directory
> GFORTH-FAST-ll-reg
> LD -o gforth-fast-ll-reg
> ld: Undefined symbols:
>   _gforth_engine, referenced from:
>       _gforth_go in main-fast-ll-reg.o
>       _gforth_loader in main-fast-ll-reg.o
>       _gforth_pointers in main-fast-ll-reg.o
> collect2: error: ld returned 1 exit status
> make[3]: *** [gforth-fast-ll-reg] Error 1
> 
> This happens again for GFORTH-FAST-ll and then the process aborts. gcc -v
> reports:
> 
> gcc version 14.2.0 (MacPorts gcc14 14.2.0_1+stdlib_flag)
> 
> with a lot of configuration information and ld -v reports:
> 
> @(#)PROGRAM:ld  PROJECT:dyld-1022.1
> BUILD 05:26:33 Dec  7 2023
> 
> also with a lot of configuration information. (MacPorts and Apple's native
> linker report the same information.)
> 
> Please can someone help figure out what is going wrong with the build?

It looks like the way we build the engine via an assembler file and replacing 
gforth_engine2 with gforth_engine fails on MacOS due to the _ prefix on the 
symbol (sys_symbol_underscore=yes on MacOS).

Edit engine/Makefile, search for ENGINE1, and add the necessary underscore 
here:

ENGINE1 = -DSKIP4= -D_gforth_engine2=_gforth_engine

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to