编译Gforth没有Gforth? [英] Compiling Gforth without Gforth?

查看:256
本文介绍了编译Gforth没有Gforth?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试编译Gforth 0.7.0时,得到以下错误:

  $ ./configure 
$ make
#编译...
未定义的符号:
_main,引用自:
在crt1.10.6.o中开始
ld:symbol发现
collect2:ld返回1退出状态
make [3]:*** [gforth-ll]错误1
./preforth -p。:〜+:。 -e'mach16b.fs''./kernel/main.fs -esave-cross kernl16b.fi- /usr/local/bin/gforth-0.7.0 bye
您需要配置$ path中的gforth构建此部分
make [3]:*** [kernl16b.fi-]错误1
make [2]:*** [gforth-ll]错误2
make [1]:*** [optgforth]错误2
make:*** [gforth]错误2
[22:16:01] gforth-0.7.0 $

我通过端口安装时遇到同样的错误。我想象的问题是,Gforth是写的,至少部分在Forth,所以我如何安装它没有第一次安装它(或者是其他问题)?



我在使用Mac OS 10.6。

解决方案

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

  ... 
检查如何调用m4 ... m4 -s
检查gforth ... echo您需要配置\ $ PATH中的gforth构建此部分&&& false
检查./arch/386/asm.fs ...是
...


b $ b

我还发现,当我使用纯GCC(64位模式)构建时,在编译过程中遇到了严重的错误(抱怨指定的寄存器错误,我认为是汇编插入)。但是当我重新配置:

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

我仍然收到关于gforth的警告,但编译的其余部分成功。



安装完成后,我可以输入:



Osiris-2 JL:gforth
Gforth 0.7.0,版权所有(C)1995-2008自由软件基金会,
Gforth自带绝对保修;详细信息类型`license'
键入`bye'退出
2 3 + ok
。 5 ok

Osiris-2 JL:uname -a
Darwin Osiris-2.local 10.2.0 Darwin Kernel版本10.2.0:Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11〜1 / RELEASE_I386 i386
Osiris-2 JL:


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.

解决方案

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:

这篇关于编译Gforth没有Gforth?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆