Error in installing crate on Qubes OS

I am trying to build the nitrocli using these instructions, but I bump into the same error which is:

error: failed to run custom build command for `nitrokey-sys v3.5.0`

Caused by:
  process didn't exit successfully: `/home/user/nitrocli/target/release/build/nitrokey-sys-ee756cfbc037241e/build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("z")
  HOST = Some("x86_64-unknown-linux-gnu")
  CXX_x86_64-unknown-linux-gnu = None
  CXX_x86_64_unknown_linux_gnu = None
  HOST_CXX = None
  CXX = None
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CXXFLAGS = None
  CXXFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "c++" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "libnitrokey-v3.5/libnitrokey" "-Wall" "-Wextra" "-std=c++14" "-o" "/home/user/nitrocli/target/release/build/nitrokey-sys-bb7ab9e7dd5c710f/out/libnitrokey-v3.5/DeviceCommunicationExceptions.o" "-c" "libnitrokey-v3.5/DeviceCommunicationExceptions.cpp"

  --- stderr


  error occurred: Failed to find tool. Is `c++` installed?

My questions is as following: the error might be caused by the fact that it does not recognize the machine it is installed on. I use a standlaone Fedora 30 VM, on Qubes OS 4.0.3.

If yes, what would be workaround?

Rustc and Cargo are v 1.46.0

Thanks

As the error message says, is c++ installed? You can check by running which c++, which should print the full path to c++. c++ is not installed if the command does not print any output.

2 Likes