首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在OS X上安装spim时出现问题

在OS X上安装spim时出现问题
EN

Stack Overflow用户
提问于 2012-04-13 00:34:08
回答 2查看 935关注 0票数 1

我正在尝试在OS X终端中运行spim。我可以使用QTSpim,但是终端中的spim命令还不存在。当涉及到终端(刚从Windows切换)时,我有点新手,所以这一点可能真的很明显。

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

代码语言:javascript
复制
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

代码语言:javascript
复制
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

然后,我尝试了安装指南中的其他内容,

代码语言:javascript
复制
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

哪里出了问题,我该如何修复它?

EN

回答 2

Stack Overflow用户

发布于 2013-04-24 08:09:47

对于那些试图在装有spim 8.0的OS X上编译的人,我建议您执行以下步骤:

代码语言:javascript
复制
$ tar xvf spim-8.0.tar.gz
$ cd spim-8.0/spim
$ ./Configure
$ cat > configuration
-DLITTLEENDIAN
-DUSE_TERMIOS
-U_POSIX_SOURCE
^D
$ make install
票数 1
EN

Stack Overflow用户

发布于 2019-08-01 10:54:54

你可以通过Homebrew获得spim

代码语言:javascript
复制
brew install spim
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10127843

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档