Page 1 of 1

Trouble with PhysX while building from current sources

Posted: Wed Mar 11, 2015 12:33 pm
by ole
Hey,

I want to build Argos3 from the current sources, but there seems to be an issue with PhysX:
In file included from /home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.cpp:1:0:
/home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = argos::CPhysXMultiBodyObjectModel::SBody; _Alloc = std::allocator<argos::CPhysXMultiBodyObjectModel::SBody>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<argos::CPhysXMultiBodyObjectModel::SBody*, std::vector<argos::CPhysXMultiBodyObjectModel::SBody> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = argos::CPhysXMultiBodyObjectModel::SBody*]’:
/usr/include/c++/4.8/bits/stl_vector.h:913:28: required from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = argos::CPhysXMultiBodyObjectModel::SBody; _Alloc = std::allocator<argos::CPhysXMultiBodyObjectModel::SBody>; std::vector<_Tp, _Alloc>::value_type = argos::CPhysXMultiBodyObjectModel::SBody]’
/home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.cpp:152:51: required from here
/home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.h:118:14: error: non-static reference member ‘physx::PxRigidDynamic& argos::CPhysXMultiBodyObjectModel::SBody::Body’, can’t use default assignment operator
struct SBody {

^
In file included from /usr/include/c++/4.8/vector:69:0,
from /home/ole/argos3/src/argos3/core/utility/math/general.h:13,
from /home/ole/argos3/src/argos3/core/utility/math/vector3.h:17,
from /home/ole/argos3/src/argos3/core/simulator/physics_engine/physics_model.h:20,
from /home/ole/argos3/src/argos3/plugins/simulator/physics_engines/physx/physx_model.h:14,
from /home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.h:14,
from /home/ole/argos3/src/plugins/simulator/physics_engines/physx/physx_multi_body_object_model.cpp:1:
/usr/include/c++/4.8/bits/vector.tcc:335:16: note: synthesized method ‘argos::CPhysXMultiBodyObjectModel::SBody& argos::CPhysXMultiBodyObjectModel::SBody::operator=(const argos::CPhysXMultiBodyObjectModel::SBody&)’ first required here
*__position = __x_copy;
^
make[2]: *** [plugins/simulator/physics_engines/physx/CMakeFiles/argos3plugin_simulator_physx.dir/physx_multi_body_object_model.cpp.o] Error 1
make[1]: *** [plugins/simulator/physics_engines/physx/CMakeFiles/argos3plugin_simulator_physx.dir/all] Error 2
make: *** [all] Error 2
Any ideas?

Re: Trouble with PhysX while building from current sources

Posted: Wed Mar 11, 2015 4:39 pm
by pincy
Hi,

It's weird that the compiler goes into the PhysX directory. I'm still working on this engine, and I explicitly commented out the add_subdirectory statement in the relevant CMakeFiles.txt (see https://github.com/ilpincy/argos3/blob/ ... eLists.txt).

Have you modified these settings?

Cheers,
Carlo

Re: Trouble with PhysX while building from current sources

Posted: Wed Mar 11, 2015 5:47 pm
by ole
Yes,
I removed the comment, because the linker is looking for a PhysX-lib:
le@ole-VirtualBox:~/argos3/build_simulator$ make
[ 93%] Built target argos3core_simulator
[ 93%] Built target argos3
[ 93%] Built target argos3plugin_simulator_media
[ 93%] Built target argos3plugin_simulator_entities
[ 93%] Built target argos3plugin_simulator_qtopengl
[ 93%] Built target argos3plugin_simulator_dynamics2d
[ 93%] Built target argos3plugin_simulator_pointmass3d
[ 93%] Built target argos3plugin_simulator_genericrobot
[ 93%] Built target argos3plugin_simulator_actuators
[ 93%] Built target argos3plugin_simulator_sensors
[ 93%] Built target argos3plugin_simulator_footbot
[ 93%] Built target argos3plugin_simulator_eyebot
[ 93%] Built target argos3plugin_simulator_epuck
Linking CXX executable argos3_prof
/usr/bin/ld: cannot find -largos3plugin_simulator_physx
collect2: error: ld returned 1 exit status
make[2]: *** [testing/argos3_prof] Error 1
make[1]: *** [testing/CMakeFiles/argos3_prof.dir/all] Error 2
make: *** [all] Error 2

Re: Trouble with PhysX while building from current sources

Posted: Wed Mar 11, 2015 7:43 pm
by pincy
Hi,

I fixed the issue, thanks for spotting it!

Cheers,
Carlo