Yaozhong
Yaozhong

Reputation: 89

How to run "gmake install"?

I am now installing a code on my mac.

The code is from here. Look for "Benchmark and Boundary Detection Code" in this page.

In the readme file, it says:

(1) For the image and segmentation reading routines in the Dataset directory to work, make sure you edit Dataset/bsdsRoot.m to point to your local copy of the BSDS dataset.

(2) Run 'gmake install' from this directory to build everything. You should then probably put the lib/matlab directory in your MATLAB path.

(3) Read the Benchmark/README file.

For the 1st step, I did as suggested. For the 2nd step, I am pretty confused. I ran command gmake install in MATLAB, however, I got:

gmake

Undefined function or variable 'gmake'.

Actually, before running MATLAB, I installed gmake port through macports.

I just did it in terminal, however, this is what I got...

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$

In MATLAB, I also did like this:

!gmake install
/bin/bash: gmake: command not found

How to do the 2nd step in readme file?

Thanks in advance!

@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'

Upvotes: 3

Views: 8754

Answers (2)

Amro
Amro

Reputation: 124563

For the "mexSuffix not defined" error, first run mexext inside MATLAB, take that output (I suspect it is mexmaci64), edit the file Util/GNUmakefile-library and add the following at line 24:

mexSuffix := mexmaci64

replace the value with the one you get from mexext

Note: I haven't tested any of this, I am on a Windows machine..

Upvotes: 4

craig65535
craig65535

Reputation: 3582

You need to run gmake from the Terminal (command line), not in MATLAB.

Upvotes: 0

Related Questions