2013-03-05 53 views
2

我從官方網站下載Gforth 0.7.0,將文件夾放在/Applications中,並將其別名放在/usr/local/bin中。 使用編譯後:在Mac上編譯Gforth的問題

$ sudo -s 
$ ./configure 
$ make 

making,它得到的結果是:

cd engine && make gforth-ditc-noll OPT=-noll OPTDEFINES= OPTOBJECTS=dblsub.o 
cd .. && CONFIG_FILES=stamp-h CONFIG_HEADERS=engine/config.h ./config.status 
config.status: creating stamp-h 
config.status: creating engine/config.h 
config.status: engine/config.h is unchanged 
config.status: executing stamp-h commands 
echo timestamp > stamp-h 
cp -p engine/gforth-ditc-noll gforth-ditc 
true 
cd engine && make gforth-itc-noll OPT=-noll OPTDEFINES= OPTOBJECTS=dblsub.o 
make[1]: `gforth-itc-noll' is up to date. 
cp -p engine/gforth-itc-noll gforth-itc 
true 
./preforth -p ".:~+:." -e 's" mach16b.fs"' ./kernel/main.fs -e "save-cross kernl16b.fi- /usr/local/bin/gforth-0.7.0 bye" 


Segmentation fault: 11. 
make: *** [kernl16b.fi-] Error 139 
bash-3.2# ./preforth 


Segmentation fault: 11. 

我不知道這裏有什麼問題。我試過the answer to Stack Overflow question Compiling Gforth without Gforth?,但它也沒有工作。我在MacBook Air上運行Mac   OS   X   v10.8(Mountain Lion)。

回答

2

沒關係,我解決了它。我簡單地使用自制軟件,做了一個

brew install gforth 

它的工作!它嚇壞了工作!我不能相信我在2天的嘗試後沒有想到......

+1

它與自己編譯它不一樣。 「釀造」給你最後的版本?獲取可執行的東西通常更容易,也沒問題,但是這對任何人都沒有幫助:你出現seg故障的原因將被「隱藏」在某個地方,並可能影響其他任何試圖獲得gforth編譯而不是「釀造」的人...... – ShinTakezou 2013-04-23 13:22:16

+2

gforth的問題是雞與雞蛋之間的問題:爲了編譯新版本,您需要以前版本的gforth(如bootstrap)。在編譯gforth的初始嘗試中,* bootstrap *(即preforth)顯然不適用於您的系統,因此是段錯誤。所以是的,在編譯之前需要「釀造」;) – wldsvc 2013-06-01 12:28:49