uwgraphics / relaxed_ik_core

MIT License
84 stars 26 forks source link

Failed to run custom build command for `nlopt v0.5.4` #3

Closed yepw closed 2 years ago

yepw commented 2 years ago

Got cmake errors when running cargo build in ubuntu 18.04

 Compiling nlopt v0.5.4
error: failed to run custom build command for `nlopt v0.5.4`

Caused by:
  process didn't exit successfully: `/home/yeping/jaco_ws/src/kinova_optimization/kinova_optimization_core/target/debug/build/nlopt-4cf505d1ab4714f4/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/yeping/.cargo/registry/src/github.com-1ecc6299db9ec823/nlopt-0.5.4/./nlopt-2.5.0" "-DBUILD_SHARED_LIBS=OFF" "-DCMAKE_CXX_COMPILER=c++" "-DNLOPT_CXX=OFF" "-DNLOPT_PYTHON=OFF" "-DNLOPT_OCTAVE=OFF" "-DNLOPT_MATLAB=OFF" "-DNLOPT_GUILE=OFF" "-DNLOPT_SWIG=OFF" "-DNLOPT_LINK_PYTHON=OFF" "-DCMAKE_INSTALL_PREFIX=/home/yeping/jaco_ws/src/kinova_optimization/kinova_optimization_core/target/debug/build/nlopt-157a26e76a43bef0/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
  -- NLopt version 2.5.0
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/yeping/jaco_ws/src/kinova_optimization/kinova_optimization_core/target/debug/build/nlopt-157a26e76a43bef0/out/build
  running: "cmake" "--build" "." "--target" "install" "--config" "RelWithDebInfo" "--parallel" "8"

  --- stderr
  Unknown argument --parallel
  Unknown argument 8
  Usage: cmake --build <dir> [options] [-- [native-options]]
  Options:
    <dir>          = Project binary directory to be built.
    --target <tgt> = Build <tgt> instead of default targets.
                     May only be specified once.
    --config <cfg> = For multi-configuration tools, choose <cfg>.
    --clean-first  = Build target 'clean' first, then build.
                     (To clean only, use --target 'clean'.)
    --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
    --             = Pass remaining options to the native tool.
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/yeping/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
yepw commented 2 years ago

Solution: upgrade cmake version.

https://askubuntu.com/questions/829310/how-to-upgrade-cmake-in-ubuntu