krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
378 stars 96 forks source link

make apps fails during installation #61

Closed blooop closed 4 years ago

blooop commented 5 years ago

On ubuntu 18.04:

The make apps step from the installation instructions fails:

 make apps
[ 93%] Built target Klampt
[ 93%] Linking CXX executable ../../bin/TrajOpt
../Dependencies/KrisLibrary/lib/libKrisLibrary.a(fileutils.cpp.o): In function `FileUtils::TempName(char*, char const*, char const*)':
fileutils.cpp:(.text+0x29b): warning: the use of `tempnam' is dangerous, better use `mkstemp'
../../lib/libKlampt.a(TimeScaling.cpp.o): In function `TimeScalingSLP::GetLagrangeMultipliers(std::vector<double, std::allocator<double> >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&)':
TimeScaling.cpp:(.text+0x726d): undefined reference to `Optimization::GLPKInterface::GetVariableDual(int)'
TimeScaling.cpp:(.text+0x7293): undefined reference to `Optimization::GLPKInterface::GetVariableDual(int)'
TimeScaling.cpp:(.text+0x72b8): undefined reference to `Optimization::GLPKInterface::GetVariableDual(int)'
TimeScaling.cpp:(.text+0x72e2): undefined reference to `Optimization::GLPKInterface::GetVariableDual(int)'
TimeScaling.cpp:(.text+0x7303): undefined reference to `Optimization::GLPKInterface::GetVariableDual(int)'
../../lib/libKlampt.a(TimeScaling.cpp.o):TimeScaling.cpp:(.text+0x7324): more undefined references to `Optimization::GLPKInterface::GetVariableDual(int)' follow
collect2: error: ld returned 1 exit status
Cpp/Main/CMakeFiles/TrajOpt.dir/build.make:113: recipe for target 'bin/TrajOpt' failed
make[3]: *** [bin/TrajOpt] Error 1
CMakeFiles/Makefile2:319: recipe for target 'Cpp/Main/CMakeFiles/TrajOpt.dir/all' failed
make[2]: *** [Cpp/Main/CMakeFiles/TrajOpt.dir/all] Error 2
CMakeFiles/Makefile2:371: recipe for target 'Cpp/Main/CMakeFiles/apps.dir/rule' failed
make[1]: *** [Cpp/Main/CMakeFiles/apps.dir/rule] Error 2
Makefile:277: recipe for target 'apps' failed
make: *** [apps] Error 2

All the other steps on the installation page work, and the python demos I have run seem to work. I just don't have access to klamp_sim etc.

I also tried updating the docker container to 18.04 as the it fails on the base image of 15.04.

The docker build fails on the make -j deps step with:

/etc/Klampt/Cpp/Dependencies && make -j deps' returned a non-zero code: 2
krishauser commented 4 years ago

This problem is caused when GLPK is not available on your system. Try sudo apt-get install libglpk-dev

krishauser commented 4 years ago

The most recent git push to KrisLibrary should at least allow the programs to be built when GLPK is not available.