不用Gforth 就可以编译Gforth 吗?

发布于 2024-08-24 03:11:25 字数 729 浏览 17 评论 0原文

当我尝试编译 Gforth 0.7.0 时,出现以下错误:

$ ./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$ 

通过端口安装时出现相同的错误。我想问题是 Gforth 是用 Forth 编写的,至少部分是用 Forth 编写的,那么我如何在不先安装它的情况下安装它(或者问题是其他问题)?

我使用的是 Mac 操作系统 10.6。

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 via ports. I imagine the problem is that Gforth is written, at least partially in Forth, so how do I install it without first installing it (or is the problem something else)?

I am using Mac OS 10.6.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

埖埖迣鎅 2024-08-31 03:11:25

在配置过程中,我收到消息:

...
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
...

我还发现,当我使用普通 GCC(在 64 位模式下)构建时,编译过程中出现了严重错误(我认为是关于汇编器插入中错误指定的寄存器的投诉)。但是当我重新配置时:

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

我仍然收到有关“gforth”的警告,但其余的编译成功了。安装时出现有关“chcon”不起作用的警告,但该错误被忽略。

安装后,我可以输入:

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:

During the configure, I got the 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 plain GCC (in 64-bit mode), things went horribly wrong during the compilation (complaints about mis-specified registers in, I assume, assembler inserts). But when I reconfigured with:

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

I still got the warning about 'gforth' but the rest of the compilation succeeded. The install came up with a warning about 'chcon' not working, but the error was ignored.

After installation, I was able to type:

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:
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文