※ 引述《[email protected] (Ronald)》之銘言:
> 想請問有沒有版友友在FreeBSD上成功安裝過simplescalar
> 並且可以正常模擬的??
> 實驗所需
> 在FreeBSD 6.1上嘗試安裝simplescalar
> 卻發生如下的錯誤
> gcc -c -g -I. -I./../include ./dummy.c 2>/dev/null
> *** Error code 1
> Stop in /home/simplescalar/binutils-2.5.2/libiberty.
> *** Error code 1
> Stop in /home/simplescalar/binutils-2.5.2.
> 這才開始要建立binutils 就發生錯誤
> 已經Google過解決方法
> 嘗試過在dummy.c中加入 #include <stdarg.h> 假指令
> 也重新編譯過dummy.c檔案
> 並且重新操作卻還是一直出現這錯誤
> 希望有經驗的版友可以幫忙一下
我沒玩過 simplescalar,
但是建議你不要把 stderr 導到 /dev/null,
不然看不到 error message,
先這樣試試看:
1. cd /home/simplescalar/binutils-2.5.2
2. gcc -c -g -I. -I./../include ./dummy.c
然後依錯誤訊息來決定要怎麼搞。
另外從你提到 #include <stdarg.h> 這件事看來,
你可能是拿很新的 gcc 去編譯極其老舊的 source code,
有一個方法是你用 gcc 3.4 以下的版本去編,
另一種方法是你要把所有的 #include <varargs.h> 換成 #include <stdarg.h>,
而且所有用到 ellipsis 的 function 全部都要檢查,
參數列不可以只有 ellipsis,
第一個參數必須具名,
譬如:
void foo(...) { } 這是錯的。
void foo(char *ptr, ...) { } 這是對的。
GCC 3.4 開始不再支援舊標準裡的 varargs.h 以及舊標準的 ellipsis 用法。
--
Name: Tseng, Ling-hua E-mail Address: [email protected]
School: National Tsing Hua University Department: Computer Science
Interesting: C++, Compiler, PL/PD, OS, VM, Large-scale software design
Researching: Undecided
Homepage: https://it.muds.net/~uranus
--
※ Origin: 交大資工鳳凰城資訊站 <bbs.csie.nctu.edu.tw>
◆ From: 218-171-144-142.dynamic.hinet.net