build gem5 error: gcc version 4.7 or newer required.

436 views
Skip to first unread message

Jason Von

unread,
Nov 30, 2015, 9:57:51 AM11/30/15
to gem5-gpu Developers List
hi all,
I follow the instruction of start page(https://gem5-gpu.cs.wisc.edu/wiki/start#build) ,and meet error as follow:

$ scons build/X86_VI_hammer_GPU/gem5.opt --default=X86 EXTRAS=../gem5-gpu/src:../gpgpu-sim/ PROTOCOL=VI_hammer GPGPU_SIM=True
scons: Reading SConscript files ...
Error: gcc version 4.7 or newer required.
       Installed version: 4.4.7


But I have already install gcc 4.8
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4


Whats more, i used install gcc by apt-get, so i have 2 gcc
fsj@fsj-Lenovo:/usr/bin$ ll | grep gcc
-rwxr-xr-x  1 root root         428  5月  7  2006 c89-gcc*
-rwxr-xr-x  1 root root         454  4月 11  2011 c99-gcc*
lrwxrwxrwx  1 root root           7 11月 30 22:04 gcc -> gcc-4.8*
-rwxr-xr-x  1 root root      220412  3月 20  2014 gcc-4.4*
-rwxr-xr-x  1 root root      720324  5月 15  2015 gcc-4.8*

......



Anyone know how to solve it?
thanks a lot!
Jason

Joel Hestness

unread,
Nov 30, 2015, 1:55:47 PM11/30/15
to Jason Von, gem5-gpu Developers List
Hi Jason,
  It seems your environment is probably pointing to an incorrect gcc. You can check this by running 'which gcc' and 'which g++' to see if maybe your PATH variable is incorrect.

  One way to get around this without having to debug the environment settings is to explicitly specify which gcc/g++ to use when building gem5. You can do this by adding 'CC=/path/to/your/gcc-4.8 CXX=/path/to/your/g++-4.8' to your build command line.

  Joel


--
  Joel Hestness
  PhD Candidate, Computer Architecture
  Dept. of Computer Science, University of Wisconsin - Madison
  http://pages.cs.wisc.edu/~hestness/

Jason Von

unread,
Dec 1, 2015, 3:04:57 AM12/1/15
to gem5-gpu Developers List, xiaop...@gmail.com
Hi Joel, 
I got it.
In path /usr/bin/, gcc(soft link file ) pointing to gcc-4.8, while g++ pointing to g++4.4, I remove old version g++ and create g++ pointing to g++-4.8. Then , build success.
it is not the problem of environment , maby error info should modifyed into: "gcc and g++ version 4.7 or newer required" :)

Thank you again!
Jason
Reply all
Reply to author
Forward
0 new messages