robotology / react-control

Framework for reaching with whole-body obstacle avoidance.
GNU General Public License v2.0
0 stars 0 forks source link

Compile error in ubuntu 16.04 #12

Closed towardthesea closed 8 years ago

towardthesea commented 8 years ago

Issues description

Trying to compile react-control in Ubuntu 16.04 with updated yarp, icub-main and IpOpt but got the following error.

Error log

react-control/build$ make 
[  8%] Generating code from reactController.thrift
Scanning dependencies of target reactController
[ 16%] Building CXX object modules/reactController/CMakeFiles/reactController.dir/src/reactIpOpt.cpp.o
In file included from /usr/include/coin/IpJournalist.hpp:15:0,
                 from /usr/include/coin/IpException.hpp:13,
                 from /usr/include/coin/IpTNLP.hpp:14,
                 from /home/pnguyen/icub-workspace/react-control/modules/reactController/include/reactIpOpt.h:26,
                 from /home/pnguyen/icub-workspace/react-control/modules/reactController/src/reactIpOpt.cpp:20:
/usr/include/coin/IpSmartPtr.hpp:18:4: error: #error "don't have header file for stddef"
 #  error "don't have header file for stddef"
    ^
modules/reactController/CMakeFiles/reactController.dir/build.make:71: recipe for target 'modules/reactController/CMakeFiles/reactController.dir/src/reactIpOpt.cpp.o' failed
make[2]: *** [modules/reactController/CMakeFiles/reactController.dir/src/reactIpOpt.cpp.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'modules/reactController/CMakeFiles/reactController.dir/all' failed
make[1]: *** [modules/reactController/CMakeFiles/reactController.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
matejhof commented 8 years ago

I was having this error in Sept when compiling on the blackie console. Back then we had the issues with the icub-common package. Is it your machine or blackie? @pattacini told me to: dpkg -l *icub-common* to see whether icub-common is installed.

towardthesea commented 8 years ago

This is from my machine. I will try will blackie in next monday. I did re-install icub-common also, then checked it with dpkg -l icub-common and got results as following:

$ dpkg -l icub-common
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-====================================================
ii  icub-common             1.4.0-5~xenial   amd64            List of dependencies for iCub software

but the compile error is still the same.

pattacini commented 8 years ago

Hi @towardthesea

Try to compile the Ipopt smoke test shipped with icub-tutorials.

towardthesea commented 8 years ago

Hi @pattacini ,

Compilation of Ipopt smoke test ran without any problem, then the same for test_ipopt:

./test_ipopt 
Ipopt: testing correct installation...

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

target position = (-0.30000  0.10000  0.10000) [m]
solved position = (-0.30060  0.09992  0.09992) [m]
distance to target = 0.000605631 [m] ... test successful!
pattacini commented 8 years ago

Let me test myself the compilation of react-controller/dev. Hold on 🖐

pattacini commented 8 years ago

What's this missing header iCub/motionPlan/motionPlan.h?

towardthesea commented 8 years ago

It is provided by reaching-planner to communicate the trajectory message.

pattacini commented 8 years ago

Yeah, that was what I imagined, but then the react-controller doesn't deal with that as a proper dependency. For example, on my system where reaching-planner is not installed, cmaking the project didn't catch any problem and I stumbled into that missing header.

@towardthesea can you please fix that? 😄

towardthesea commented 8 years ago

I am willing to do that but sincerely don't know which is the most efficient solution? Do you have any hint? Is it OK to include the same motionPlan class as lib in react-control?

pattacini commented 8 years ago

Since reaching-planner is a library, it should be organized as e.g. kinect-wrapper.

Modules depending on such a library can be coded taking inspiration from e.g. agentDetector, where a call to find_package(kinectWrapper) is done conveniently before.

towardthesea commented 8 years ago

The motionPlan is added as lib in the new branch integration-plan. Hope it can solve the dependency problem

What's this missing header iCub/motionPlan/motionPlan.h?

alecive commented 8 years ago

@towardthesea you should not add and compile the motionPlan library inside this repository. You just have to properly export the library in your repository (i.e. reaching-planner), and add it as dependency of this one so that it can be proficiently linked by the executables which need it :slightly_smiling_face:

pattacini commented 8 years ago

Yep indeed, @alecive's comment is spot on. We can do that together on Monday if you want.

pattacini commented 8 years ago

Hi @towardthesea I've fixed the problem as per my commit.