dartsim / dart

DART: Dynamic Animation and Robotics Toolkit
http://dartsim.github.io/
BSD 2-Clause "Simplified" License
901 stars 286 forks source link

Build on Ubuntu 18.04 (bionic) fails #1091

Closed xemjeff closed 6 years ago

xemjeff commented 6 years ago

I am not able to get a build of the examples files on U18.04 bionic. I am building outside of the source directory, which is in /usr/share/doc/dart/examples (owned by root).

using cmake v 3.10.2

Here are the steps I've taken:

% sudo apt-get install libdart6-all-dev
% cd ~/code/dart
% md build
% cd build
% cmake /usr/share/doc/dart/examples

I get the following error:

jeff@dragon-vm:~/code/dartex/build$ cmake /usr/share/doc/dart/examples
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- 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
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.2.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
CMake Error at simpleFrames/CMakeLists.txt:17 (add_executable):
  add_executable called with incorrect number of arguments

CMake Error at simpleFrames/CMakeLists.txt:19 (target_link_libraries):
  Cannot specify link libraries for target "simpleFrames" which is not built
  by this project.

-- Configuring incomplete, errors occurred!
See also "/home/jeff/code/dartex/build/CMakeFiles/CMakeOutput.log".

Any suggestions as to what I might be doing wrong are appreciated.

jslee02 commented 6 years ago

It seems CMake fails to find the source files for some reason.

Can you replace these lines with followings and share the output?

file(GLOB srcs "*.cpp" "*.hpp")
add_executable(${PROJECT_NAME} ${srcs})
message(STATUS "[DEBUG] PROJECT_NAME: ${PROJECT_NAME}")
message(STATUS "[DEBUG] srcs: ${srcs}")
xemjeff commented 6 years ago

yes, can't seem to find the srcs.

here's the output. the examples are installed in /usr/share/doc/dart/examples, and all owned by root

jeff@dragon-vm:~/code/dartex/build$ cmake /usr/share/doc/dart/examples
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.2.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
-- Found DART: /usr/include (Required is at least version "6.5.0") found components:  utils-urdf gui dart 
CMake Error at simpleFrames/CMakeLists.txt:17 (add_executable):
  add_executable called with incorrect number of arguments

-- [DEBUG] PROJECT_NAME: simpleFrames
-- [DEBUG] srcs: 
CMake Error at simpleFrames/CMakeLists.txt:21 (target_link_libraries):
  Cannot specify link libraries for target "simpleFrames" which is not built
  by this project.

-- Configuring incomplete, errors occurred!
See also "/home/jeff/code/dartex/build/CMakeFiles/CMakeOutput.log".

Looking a little deeper, I see that the source files in the folders are gzipped. So I unzip Main.cpp.gz and modify the CMakeLists.txt file to specify the srcs:

set(srcs $(PROJECT_SOURCE_DIR)/Main.cpp)

I do the same for speedtest (same problem) and I get a little further. Now the build stops here:

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find DART (missing: dart-utils-urdf dart-gui dart-collision-ode
  dart-collision-bullet) (Required is at least version "6.4")
Call Stack (most recent call first):

I verified that the libs for above are installed in /usr/lib:

lrwxrwxrwx   1 root root       31 May 12 06:25 libdart-collision-bullet.so -> libdart-collision-bullet.so.6.5
lrwxrwxrwx   1 root root       33 May 12 06:25 libdart-collision-bullet.so.6.5 -> libdart-collision-bullet.so.6.5.0
-rw-r--r--   1 root root    97400 May 12 06:25 libdart-collision-bullet.so.6.5.0
lrwxrwxrwx   1 root root       28 May 12 06:25 libdart-collision-ode.so -> libdart-collision-ode.so.6.5
lrwxrwxrwx   1 root root       30 May 12 06:25 libdart-collision-ode.so.6.5 -> libdart-collision-ode.so.6.5.0
-rw-r--r--   1 root root    60480 May 12 06:25 libdart-collision-ode.so.6.5.0
lrwxrwxrwx   1 root root       29 May 12 06:25 libdart-external-imgui.so -> libdart-external-imgui.so.6.5
lrwxrwxrwx   1 root root       31 May 12 06:25 libdart-external-imgui.so.6.5 -> libdart-external-imgui.so.6.5.0
-rw-r--r--   1 root root   328168 May 12 06:25 libdart-external-imgui.so.6.5.0
lrwxrwxrwx   1 root root       31 May 12 06:25 libdart-external-lodepng.so -> libdart-external-lodepng.so.6.5
lrwxrwxrwx   1 root root       33 May 12 06:25 libdart-external-lodepng.so.6.5 -> libdart-external-lodepng.so.6.5.0
-rw-r--r--   1 root root   125728 May 12 06:25 libdart-external-lodepng.so.6.5.0
lrwxrwxrwx   1 root root       36 May 12 06:25 libdart-external-odelcpsolver.so -> libdart-external-odelcpsolver.so.6.5
lrwxrwxrwx   1 root root       38 May 12 06:25 libdart-external-odelcpsolver.so.6.5 -> libdart-external-odelcpsolver.so.6.5.0
-rw-r--r--   1 root root    47440 May 12 06:25 libdart-external-odelcpsolver.so.6.5.0
lrwxrwxrwx   1 root root       22 May 12 06:25 libdart-gui-osg.so -> libdart-gui-osg.so.6.5
lrwxrwxrwx   1 root root       24 May 12 06:25 libdart-gui-osg.so.6.5 -> libdart-gui-osg.so.6.5.0
-rw-r--r--   1 root root   736576 May 12 06:25 libdart-gui-osg.so.6.5.0
lrwxrwxrwx   1 root root       18 May 12 06:25 libdart-gui.so -> libdart-gui.so.6.5
lrwxrwxrwx   1 root root       20 May 12 06:25 libdart-gui.so.6.5 -> libdart-gui.so.6.5.0
-rw-r--r--   1 root root   143696 May 12 06:25 libdart-gui.so.6.5.0
lrwxrwxrwx   1 root root       30 May 12 06:25 libdart-optimizer-ipopt.so -> libdart-optimizer-ipopt.so.6.5
lrwxrwxrwx   1 root root       32 May 12 06:25 libdart-optimizer-ipopt.so.6.5 -> libdart-optimizer-ipopt.so.6.5.0
-rw-r--r--   1 root root    43512 May 12 06:25 libdart-optimizer-ipopt.so.6.5.0
lrwxrwxrwx   1 root root       30 May 12 06:25 libdart-optimizer-nlopt.so -> libdart-optimizer-nlopt.so.6.5
lrwxrwxrwx   1 root root       32 May 12 06:25 libdart-optimizer-nlopt.so.6.5 -> libdart-optimizer-nlopt.so.6.5.0
-rw-r--r--   1 root root    35488 May 12 06:25 libdart-optimizer-nlopt.so.6.5.0
lrwxrwxrwx   1 root root       23 May 12 06:25 libdart-planning.so -> libdart-planning.so.6.5
lrwxrwxrwx   1 root root       25 May 12 06:25 libdart-planning.so.6.5 -> libdart-planning.so.6.5.0
-rw-r--r--   1 root root   348856 May 12 06:25 libdart-planning.so.6.5.0
lrwxrwxrwx   1 root root       14 May 12 06:25 libdart.so -> libdart.so.6.5
lrwxrwxrwx   1 root root       16 May 12 06:25 libdart.so.6.5 -> libdart.so.6.5.0
-rw-r--r--   1 root root  6129944 May 12 06:25 libdart.so.6.5.0
lrwxrwxrwx   1 root root       20 May 12 06:25 libdart-utils.so -> libdart-utils.so.6.5
lrwxrwxrwx   1 root root       22 May 12 06:25 libdart-utils.so.6.5 -> libdart-utils.so.6.5.0
-rw-r--r--   1 root root   726864 May 12 06:25 libdart-utils.so.6.5.0
lrwxrwxrwx   1 root root       25 May 12 06:25 libdart-utils-urdf.so -> libdart-utils-urdf.so.6.5
lrwxrwxrwx   1 root root       27 May 12 06:25 libdart-utils-urdf.so.6.5 -> libdart-utils-urdf.so.6.5.0
-rw-r--r--   1 root root   187856 May 12 06:25 libdart-utils-urdf.so.6.5.0
jslee02 commented 6 years ago

Thanks for the investigation on this. There are two causes on this build failures, and here are the fixes:

I'll rebuild the debian packages and post here once they're completely uploaded.

Lastly, you might need to install tiny-dnn to build humanJointLists. You can download tiny-dnn from their GitHub repo. Or you can omit to build it by comment out this line.

xemjeff commented 6 years ago

I am progressing along, leaving out the humanJointsLimit

One problem that exists in many of the examples is that the some of the source (.cpp, .hpp) is stiill gzipped, and then cmake cannot find the source files. I remedied this by running gunzip -r * but it appears that some step is missing. (or cmake magic is needed to look inside the .gz files for source.).

Another problem is that LocalResource.cpp is looking for .skel files in a strange place:

Warning [LocalResource.cpp:48] [LocalResource::constructor] Failed opening file '/build/dart6-ZDUVKX/dart6-6.5.0.ppa0~bionic/data/skel/test/chainwhipa.skel' for reading: No such file or directory

Maybe I need to set some env variable for dart to find the necessary skeletons?

jslee02 commented 6 years ago

gzipped problem should be gone once you upgrade DART as:

sudo apt update
sudo apt upgrade libdart6-all-dev

The other problem is a known issue. Let me work on this.

jslee02 commented 6 years ago

The issue of resource retriever should be resolved by #1095. Could you please upgrade DART by:

sudo apt update
sudo apt upgrade libdart6-all-dev

and let us know if the problem is still persistent? Thanks!

jslee02 commented 6 years ago

I believe this is resolved. Feel free to reopen if not.