0

I am trying to build a code from this website on linux. https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/ When I run gmake install in the directory (as instructed), I get the following error below telling me to use gcc 4.7.x.

Building with 'g++'.
Warning: You are using gcc version '4.8.4'. The version of gcc is not
supported. The version currently supported with MEX is '4.7.x'. For a list of
currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release. 
Error using mex
In file included from

I have followed this thread to install gcc version 4.7.3 How to activate gcc 4.7 version? and have verified that my version of gcc 4.7.3 by typing gcc -v.

sudo apt-get install gcc-4.7
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc

So im not sure why its still trying to build with 4.8.4. Was hoping someone could help me out.

  • g++ is not the same thing as gcc (well, not in this context, at least) – steeldriver Feb 18 '17 at 3:50
  • 1
    . . . you likely need to install the corresponding g++-4.7.3 and either symlink that to /usr/bin/g++ or (less drastically - and how I would recommend) simply set appropriate variables CC=/usr/bin/gcc-4.7.3 and CXX=/usr/bin/g++-4.7.3 – steeldriver Feb 18 '17 at 4:05
  • Messing with the gcc symlink (et al.) is just asking for trouble. – fkraiem Feb 18 '17 at 5:41
  • hi steeldriver thanks for the help. I installed g++-4.7 then typed CXX=/usr/bin/g++-4.7 but g++ -v still says gcc version 4.8.4 while gcc -v says gcc version 4.7.3 – RuiQi Feb 18 '17 at 10:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.