Compiling Gforth without Gforth?

When I try to compile Gforth 0.7.0, I get the following error:

$ ./configure $ make #compiling… Undefined symbols: "_main", referenced from: start in crt1.10.6.o ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [gforth-ll] Error 1 ./preforth -p ".:~+:." -e 's" mach16b.fs"' ./kernel/main.fs -e "save-cross kernl16b.fi- /usr/local/bin/gforth-0.7.0 bye" You need to configure with a gforth in $PATH to build this part make[3]: *** [kernl16b.fi-] Error 1 make[2]: *** [gforth-ll] Error 2 make[1]: *** [optgforth] Error 2 make: *** [gforth] Error 2 [22:16:01] gforth-0.7.0$ 

I get the same error when installing through ports. I suppose the problem is that Gforth is written, at least in part, in Forth, so how do I install it without first installing it (or is it something else)?

I am using Mac OS 10.6.

+4
source share
1 answer

During setup, I received a message:

 ... checking how to invoke m4... m4 -s checking for gforth... echo "You need to configure with a gforth in \$PATH to build this part" && false checking for ./arch/386/asm.fs... yes ... 

I also found that when I built with simple GCC (in 64-bit mode), everything was terribly wrong during compilation (complaints about incorrectly set registers, I assume assembler inserts). But when I reconfigured:

 CC="gcc -m32" ./configure --prefix=$HOME 

I still got a warning about gforth, but the rest of the compilation was successful. A warning appeared in the installation that "chcon" was not working, but the error was ignored.

After installation, I managed to enter:

 Osiris-2 JL: gforth Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc. Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' Type `bye' to exit 2 3 + ok . 5 ok Osiris-2 JL: uname -a Darwin Osiris-2.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 Osiris-2 JL: 
+6
source

Source: https://habr.com/ru/post/1303190/


All Articles