robotology / icub-contrib-common

Meta-package to configure contrib modules and libraries
2 stars 2 forks source link

Trouble compiling icub-basic-demos because ICUBcontribOptions & ICUBcontribHelpers #4

Closed rlober closed 9 years ago

rlober commented 9 years ago

So I am trying to compile 'icub-basic-demos' and when I run 'cmake' (for the main CMakeList) I get the following error:

icub@icub-b1:/usr/local/src/robot/icub-basic-demos/build-x86_64$ cmake ..
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- 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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:16 (include):
  include could not find load file:

    ICUBcontribOptions

CMake Error at CMakeLists.txt:17 (include):
  include could not find load file:

    ICUBcontribHelpers

CMake Error at CMakeLists.txt:18 (icubcontrib_set_default_prefix):
  Unknown CMake command "icubcontrib_set_default_prefix".

-- Configuring incomplete, errors occurred!
See also "/usr/local/src/robot/icub-basic-demos/build-x86_64/CMakeFiles/CMakeOutput.log".
icub@icub-b1:/usr/local/src/robot/icub-basic-demos/build-x86_64$ 

I have followed the 'icub-contrib-common` instructions from here: http://wiki.icub.org/wiki/Linux:Installation_from_sources#Setup_ICUBcontrib_.28optional.29.

What is odd to me is that after I "compile" icub-contrib my build dir only has the following contents:

CMakeCache.txt  CMakeFiles  ICUBcontribConfig.cmake.build  Makefile  cmake_install.cmake  share

There is no bin/ folder or anything. This seems odd.

Also, I have set my env variables as follows:

export ICUBcontrib_DIR=$ROBOT_CODE/icub-contrib-common/build-x86_64
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:${ICUBcontrib_DIR}
export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:${ICUBcontrib_DIR}/share/ICUBcontrib:$WYSIWYD_DIR/share/wysiwyd
export PATH=${PATH}:${YARP_BIN}:${ICUB_BIN}:${ICUBcontrib_DIR}/bin

Any suggestions what is happening? BTW: yarp/icub-main are both up to date.

pattacini commented 9 years ago

@rlober icub-contrib-common is a metapackage providing cmake helpers for installing user contrib code, so no surprise there is no bin directory. However, there are still a bunch of products to be installed wherever you decide at cmake configuration time (by means of the CMAKE_INSTALL_PREFIX var).

Then, as every package, you need to provide an env variable called ICUBcontrib_DIR pointing at that latter location (unless you choose to go for standard make install installation), so that all those helpers can be located.

rlober commented 9 years ago

@pattacini

Thank you for the reply. Right now I am on our cluster for Paris02 and we aren't installing anything but rather just pointing to build_x86_64 and build_pc104. How should I use icub-contrib in this case?

pattacini commented 9 years ago

I'd say you could stick to the same policy then. Identify a suitable directory for you, something like /usr/local/src/robot/iCubContrib, and install the package therein, so that you'll end up having the following env variable:

ICUBcontrib_DIR=/usr/local/src/robot/iCubContrib

Don't forget to do also:

YARP_DATA_DIRS=$YARP_DATA_DIRS:$ICUBcontrib_DIR/share/ICUBcontrib

The latter will serve to let YARP locate user contrib contexts.

rlober commented 9 years ago

That is what I did in the first message on this issue however I wasn't able to get it to work.

I think I am going to switch to make install-ing things for the sake of simplicity with yarp modules.

How are the icub clusters configured at IIT now? Are you still just building the code or are you building and installing?

pattacini commented 9 years ago

Well, the way we use it here is as I described before, that is not by pointing to the build, but rather installing in another directory.

I don't know if for this specific package the build can be used, actually. @drdanz any clue on this?

alecive commented 9 years ago

@rlober can we close this issue?

rlober commented 9 years ago

I am just doing a complete re-install of icub software so, moral of the story, go with make install and avoid headaches.

Thanks for the help guys