2012-04-12 88 views
0

我试图在OS X Terminal中运行spim。我能够使用QTSpim,但终端中的spim命令尚不存在。当谈到终端(刚刚从Windows切换)时,我有点新手,所以这可能很明显。在OS X上安装Spim时遇到困难

首先,我只是导航到spim文件夹并键入make

Lasker:spim orthogonal$ make 
./Configure 
cc 
Check if this machine is big-endian or little-endian. 
This may take a few minutes. 
I believe this is a little-endian machine. 
Looks like a Mac OS X/OpenStep universe exists... 
Scanning libc.dylib 

Checking if libc on this machine contains: 
    vsprintf: No, I don't think 
    _doprnt: NO, THIS IS A PROBLEM: NO VSPRINTF AND NO _DOPRNT 
SPIM WILL NOT RUN PROPERLY 
    vfprintf: No, I don't think 
    _doprnt: NO, THIS IS A PROBLEM: NO VFPRINTF AND NO _DOPRNT 
SPIM WILL NOT RUN PROPERLY 
    strtoul: No, I don't think 
    strtol: No, I don't think 
    memcpy: No, I don't think 

Checking for /usr/include/termios.h 
Yes, it is there 
make -f Makefile spim2 
bison -d --file-prefix=y ../CPU/parser.y 
../CPU/parser.y: conflicts: 25 shift/reduce 
gcc -I. -I../CPU `cat configuration` -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536 -DDEFAULT_EXCEPTION_HANDLER="\"/usr/local/lib/spim/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\"" -g -Wall -c -o spim-utils.o ../CPU/spim-utils.c 
In file included from ../CPU/spim-utils.c:39: 
../CPU/spim.h:71:1: warning: "memcpy" redefined 
In file included from /usr/include/string.h:190, 
       from ../CPU/spim-utils.c:36: 
/usr/include/secure/_string.h:53:1: warning: this is the location of the previous definition 
../CPU/spim-utils.c:501: error: expected ‘)’ before numeric constant 
../CPU/spim-utils.c:504: error: expected identifier or ‘(’ before ‘{’ token 
../CPU/spim-utils.c:520: error: conflicting types for ‘strtol’ 
/usr/include/stdlib.h:181: error: previous declaration of ‘strtol’ was here 
make[1]: *** [spim-utils.o] Error 1 
make: *** [spim] Error 2 

我回去,并再次读取installation guide和它说尝试make install

Lasker:spim orthogonal$ make install 
make -f Makefile spim2 
gcc -I. -I../CPU `cat configuration` -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536 -DDEFAULT_EXCEPTION_HANDLER="\"/usr/local/lib/spim/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\"" -g -Wall -c -o spim-utils.o ../CPU/spim-utils.c 
In file included from ../CPU/spim-utils.c:39: 
../CPU/spim.h:71:1: warning: "memcpy" redefined 
In file included from /usr/include/string.h:190, 
       from ../CPU/spim-utils.c:36: 
/usr/include/secure/_string.h:53:1: warning: this is the location of the previous definition 
../CPU/spim-utils.c:501: error: expected ‘)’ before numeric constant 
../CPU/spim-utils.c:504: error: expected identifier or ‘(’ before ‘{’ token 
../CPU/spim-utils.c:520: error: conflicting types for ‘strtol’ 
/usr/include/stdlib.h:181: error: previous declaration of ‘strtol’ was here 
make[1]: *** [spim-utils.o] Error 1 
make: *** [spim] Error 2 

然后我试图从安装指南别的东西,

Lasker:spim orthogonal$ make test 
make -f Makefile spim2 
gcc -I. -I../CPU `cat configuration` -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536 -DDEFAULT_EXCEPTION_HANDLER="\"/usr/local/lib/spim/exceptions.s\"" -DSPIM_VERSION="\"`cat ../VERSION`\"" -g -Wall -c -o spim-utils.o ../CPU/spim-utils.c 
In file included from ../CPU/spim-utils.c:39: 
../CPU/spim.h:71:1: warning: "memcpy" redefined 
In file included from /usr/include/string.h:190, 
       from ../CPU/spim-utils.c:36: 
/usr/include/secure/_string.h:53:1: warning: this is the location of the previous definition 
../CPU/spim-utils.c:501: error: expected ‘)’ before numeric constant 
../CPU/spim-utils.c:504: error: expected identifier or ‘(’ before ‘{’ token 
../CPU/spim-utils.c:520: error: conflicting types for ‘strtol’ 
/usr/include/stdlib.h:181: error: previous declaration of ‘strtol’ was here 
make[1]: *** [spim-utils.o] Error 1 
make: *** [spim] Error 2 

什么错和我该如何解决它?

+0

我不知道如何解决它,但你需要使用垃圾信息?如果没有,[MARS](http://courses.missouristate.edu/KenVollmar/MARS/)是一个梦幻般的跨平台(Java)替代方案。 – 2012-04-12 18:51:41

+0

是的,我需要使用spim。 – 2012-04-12 20:13:33

回答

1

对于那些试图在OS X上编译SPIM 8.0,我建议这个程序:

$ tar xvf spim-8.0.tar.gz 
$ cd spim-8.0/spim 
$ ./Configure 
$ cat > configuration 
-DLITTLEENDIAN 
-DUSE_TERMIOS 
-U_POSIX_SOURCE 
^D 
$ make install 
相关问题