Headless compilation fail

Typically: "How do I... ", "How can I... " questions
Post Reply
patchaaquatica

Headless compilation fail

Post by patchaaquatica »

Hi,

Trying to compile a true headless version and make fails with;

Code: Select all

In file included from /usr/include/c++/5/random:35:0,
                 from sourceCode/luaScripting/luaScriptObject.h:13,
                 from sourceCode/mainContainers/sceneContainers/objCont.h:22,
                 from sourceCode/inverseKinematics/geomConstraintSolver/geometricConstraintSolverInt.cpp:7:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from sourceCode/mainContainers/sceneContainers/objCont.h:22:0,
                 from sourceCode/inverseKinematics/geomConstraintSolver/geometricConstraintSolverInt.cpp:7:
sourceCode/luaScripting/luaScriptObject.h:260:10: error: ‘mt19937’ in namespace ‘std’ does not name a type
     std::mt19937 _randGen;
          ^
makefile:72: recipe for target 'all' failed
make: *** [all] Error 1

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Headless compilation fail

Post by fferri »


patchaaquatica

Re: Headless compilation fail

Post by patchaaquatica »

So I got past that adding

Code: Select all

CFLAGS += -std=c++11
to the makefile, but now its failing with

Code: Select all

sourceCode/3dObjects/related/3DObject.cpp: In member function ‘int C3DObject::getScriptsToExecute(int, int, std::vector<CLuaScriptObject*>&)’:
sourceCode/3dObjects/related/3DObject.cpp:1702:19: error: ‘sim_scripttreetraversal_parent’ was not declared in this scope
         if (tdir!=sim_scripttreetraversal_parent)
                   ^
sourceCode/3dObjects/related/3DObject.cpp:1708:29: error: ‘sim_scripttreetraversal_forward’ was not declared in this scope
         if ( (traversalDir==sim_scripttreetraversal_forward)&&(attachedScript!=NULL)&&(!attachedScript->getScriptIsDisabled()) )
                             ^
sourceCode/3dObjects/related/3DObject.cpp:1732:29: error: ‘sim_scripttreetraversal_reverse’ was not declared in this scope
         if ( (traversalDir==sim_scripttreetraversal_reverse)&&(attachedScript!=NULL)&&(!attachedScript->getScriptIsDisabled()) )
                             ^
makefile:74: recipe for target 'all' failed
make: *** [all] Error 1

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Headless compilation fail

Post by fferri »

that symbol is defined in v_repConst.h

Which version of v_rep are you compiling? Did you get also the corresponding programming/common and programming/include up-to-date folders?

patchaaquatica

Re: Headless compilation fail

Post by patchaaquatica »

3.5.0, and I got it all fresh today. Fresh download of 3.5.0 from the website, then pulled v_rep, dynamicsPlugin and meshCalculationPlugin from your github.

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Headless compilation fail

Post by fferri »

you can't just pull v_rep, you have to pull programming/common and programming/include as well

patchaaquatica

Re: Headless compilation fail

Post by patchaaquatica »

ok, now it fails with this

Code: Select all

sourceCode/luaScripting/luaWrapper.cpp:7:21: fatal error: lua.h: No such file or directory

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Headless compilation fail

Post by fferri »

did you get lua library?

did you adjust paths in config.pri?

http://www.coppeliarobotics.com/helpFil ... ngVrep.htm

patchaaquatica

Re: Headless compilation fail

Post by patchaaquatica »

ah, wrong lua version.

but now fails on

Code: Select all

sourceCode/interfaces/v_rep_internal.cpp: In function ‘simChar* simGetApiFunc_internal(simInt, const simChar*)’:
sourceCode/interfaces/v_rep_internal.cpp:18540:13: error: ‘sort’ is not a member of ‘std’
             std::sort(t.begin(),t.end());
             ^
makefile:72: recipe for target 'all' failed
make: *** [all] Error 1

patchaaquatica

Re: Headless compilation fail

Post by patchaaquatica »

Added

Code: Select all

#include "algorithm"
to v_rep_internal.cpp and all is now up and running.

Thanks for your help.

Post Reply