我现在正在我的Mac上安装代码。
代码来自here。在此页面中查找“基准和边界检测代码”。
在自述文件中,它说:
(1)对于数据集中的图像和分段读取例程 要运行的目录,请确保编辑数据集/ bsdsRoot.m以指向 您的BSDS数据集的本地副本。
(2)从此目录运行'gmake install'以构建所有内容。您 那么应该将lib / matlab目录放在MATLAB路径中。
(3)阅读Benchmark / README文件。
第一步,我按照建议做了。
第二步,我很困惑。我在MATLAB中运行了命令gmake install
,但是,我得到了:
gmake
Undefined function or variable 'gmake'.
实际上,在运行MATLAB之前,我通过macports安装了gmake端口。
我刚在终端做过,但是,这就是我得到的......
hou229:segbench yaozhongsong$ cd /Users/yaozhongsong/Documents/MATLAB/segbench
hou229:segbench yaozhongsong$ sudo gmake install
gmake[1]: execvp: ../Util/gethosttype: Permission denied
gmake[1]: Entering directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
GNUmakefile-library:26: *** mexSuffix not defined. Stop.
gmake[1]: Leaving directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
hou229:segbench yaozhongsong$
在MATLAB中,我也是这样的:
!gmake install
/bin/bash: gmake: command not found
如何在自述文件中执行第2步?
提前致谢!
@Amro
hou229:segbench yaozhongsong$ cd /Users/yaozhongsong/Documents/MATLAB/segbench
hou229:segbench yaozhongsong$ sudo gmake install
Password:
gmake[1]: execvp: ../Util/gethosttype: Permission denied
gmake[1]: Entering directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
mkdir -p ../lib/matlab
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Exception.cc -o build//Exception.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c String.cc -o build//String.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Random.cc -o build//Random.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Timer.cc -o build//Timer.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Matrix.cc -o build//Matrix.o
Matrix.cc:13:21: error: ieee754.h: No such file or directory
Matrix.cc: In function ‘double nextpow2(double)’:
Matrix.cc:86: error: ‘ieee754_double’ was not declared in this scope
Matrix.cc:86: error: expected `;' before ‘val’
Matrix.cc:87: error: ‘val’ was not declared in this scope
Matrix.cc:88: error: ‘IEEE754_DOUBLE_BIAS’ was not declared in this scope
Matrix.cc: At global scope:
Matrix.cc:48: warning: ‘snan’ defined but not used
Matrix.cc:49: warning: ‘inf’ defined but not used
gmake[1]: *** [build//Matrix.o] Error 1
gmake[1]: Leaving directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
答案 0 :(得分:4)
对于“未定义的mexSuffix”错误,首先在MATLAB中运行mexext
,取出该输出(我怀疑它是mexmaci64
),编辑文件Util/GNUmakefile-library
并添加以下内容:第24行:
mexSuffix := mexmaci64
将值替换为您从mexext
注意:我没有测试任何这个,我在Windows机器上..
答案 1 :(得分:0)
您需要从终端(命令行)运行gmake,而不是在MATLAB中运行。