Problem with compiler on Linux

Requests regarding how to set up experiments in ARGoS.
Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Problem with compiler on Linux

Postby Elendurwen » Mon Jan 13, 2014 6:30 pm

Hi,

I had argos3 installed by someone else on a Redhat-based computer cluster. They compiled and installed argos and you can run argos3 -q all without a problem. You can also run cmake for an argos3-dependant example program, but then the actual compilation fails. I think the g++ is of a wrong version, but it might be something else. Does anyone have any idea or has seen this issue before? This is my output:

Code: Select all

-- The C compiler identification is GNU 4.4.6 -- The CXX compiler identification is GNU 4.4.6 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.23") -- checking for module 'argos3_simulator' -- found argos3_simulator, version 3.0.0-beta21 -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found -- Found Qt4: /usr/bin/qmake-qt4 (found version "4.6.2") -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib64/libX11.so -- Found OpenGL: /usr/lib64/libGL.so -- Found GLUT: /usr/lib64/libglut.so -- GSL using gsl-config /local/software/gsl/1.15/bin/gsl-config -- Using GSL from /local/software/gsl/1.15 -- Found Lua51: /usr/lib64/liblua-5.1.so;/usr/lib64/libm.so -- Configuring done -- Generating done -- Build files have been written to: /home/lp2g12/beeForaging/buildExec [lp2g12@cyan01 beeForaging]$ ./build.sh -ce >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Compiling ... Scanning dependencies of target footbot_foraging [ 16%] Building CXX object controllers/footbot_foraging/CMakeFiles/footbot_foraging.dir/footbot_foraging.cpp.o Linking CXX shared library libfootbot_foraging.so [ 16%] Built target footbot_foraging Scanning dependencies of target foraging_loop_functions [ 33%] Building CXX object loop_functions/foraging_loop_functions/CMakeFiles/foraging_loop_functions.dir/foraging_loop_functions.cpp.o In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/unordered_map:35, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/entity.h:30, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/positional_entity.h:14, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/embodied_entity.h:15, from /local/software/argos3/3.0/include/argos3/core/simulator/space/space.h:21, from /local/software/argos3/3.0/include/argos3/core/simulator/loop_functions.h:19, from /home/lp2g12/beeForaging/loop_functions/foraging_loop_functions/foraging_loop_functions.h:4, from /home/lp2g12/beeForaging/loop_functions/foraging_loop_functions/foraging_loop_functions.cpp:1: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/c++0x_warning.h:31:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
Last edited by Elendurwen on Mon Jan 13, 2014 7:03 pm, edited 1 time in total.

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Problem with compiler on Linux

Postby Elendurwen » Mon Jan 13, 2014 7:02 pm

Edit: I changed the cmake line to

Code: Select all

cmake -DCMAKE_CXX_COMPILER=/local/software/gcc/4.8.1/bin/c++
to assure I have the right compiler version, but it is still not properly recognised, it finds:

Code: Select all

-- The C compiler identification is GNU 4.4.6 -- The CXX compiler identification is GNU 4.8.1
And I still get a similar error when compiling an argos3-dependant program:

Code: Select all

In file included from /home/local/software/gcc/4.8.1/include/c++/4.8.1/unordered_map:35:0, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/entity.h:30, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/positional_entity.h:14, from /local/software/argos3/3.0/include/argos3/core/simulator/entity/embodied_entity.h:15, from /local/software/argos3/3.0/include/argos3/core/simulator/space/space.h:21, from /local/software/argos3/3.0/include/argos3/core/simulator/loop_functions.h:19, from /home/lp2g12/beeForaging/loop_functions/foraging_loop_functions/foraging_loop_functions.h:4, from /home/lp2g12/beeForaging/loop_functions/foraging_loop_functions/foraging_loop_functions.cpp:1: /home/local/software/gcc/4.8.1/include/c++/4.8.1/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Problem with compiler on Linux

Postby Elendurwen » Tue Jan 14, 2014 7:55 pm

Another edit: I found the higher version of the C compiler as well, so now I get output:

Code: Select all

-- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /local/software/gcc/4.8.1/bin/gcc -- Check for working C compiler: /local/software/gcc/4.8.1/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /local/software/gcc/4.8.1/bin/c++ -- Check for working CXX compiler: /local/software/gcc/4.8.1/bin/c++ -- works
However, I still have the same problem during compilation of my program

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Problem with compiler on Linux

Postby Elendurwen » Fri Jan 17, 2014 1:10 pm

I managed to fix my problem by running the cmake first, then editing the build/CMakeCache.txt, changing the line:

Code: Select all

CMAKE_CXX_FLAGS:STRING=-std=c++11
Then running make builds fine. I am not sure if somehow this could have been done better by passing a parameter to cmake though, to make it more automatic.

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Problem with compiler on Linux

Postby pincy » Tue Jan 21, 2014 9:42 am

Hi,

Sorry for the late reply, but the email notification of the forum seems not working properly.

I fixed this problem before Christmas. There was a little issue in entity.h. To the best of my knowledge, updating Argos and getting the latest version of the examples should be enough to fix the issue.

What version of Argos did you use?

Cheers,
Carlo
I made ARGoS.

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Problem with compiler on Linux

Postby Elendurwen » Wed Jan 22, 2014 6:58 pm

Hi Carlo,

the version on that system is 3.0.0-beta21. It was installed shortly before Christmas I believe.

Best,
Lenka

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Problem with compiler on Linux

Postby pincy » Wed Jan 22, 2014 7:07 pm

There's a new one after that, beta22 :-)
I made ARGoS.

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Problem with compiler on Linux

Postby Elendurwen » Wed Jan 22, 2014 7:08 pm

Ok, I'll ask them about updating then, thanks. Must have just missed the new version by days!

Lenka


Return to “How to... ?”