Problems building a package

I'm trying to use Lab Streaming Layer rust bindings. I was able to this easily on Windows, but have switched to a Ubuntu 22.04 machine as it's much faster.

Rust fails to build LSL. In the error, I see a few things that concern me:

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

But I definitely have cmake installed (cmake --version
= 3.22.1). (and I'm not getting the "is cmake installed" question from rust, which I received at one point)

I think there is also a git problem from this part of the error:
...
[ 2%] Building CXX object CMakeFiles/lslboost.dir/lslboost/libs/thread/src/pthread/thread.cpp.o
--- stderr
fatal: not a git repository (or any of the parent directories): .git

Not sure what to do as I'm very new to Rust. The Lab Streaming Layer rust documentation says that, to compile, it needs Cmake 3.12 or higher, which I have, and build_essential, which I have.

Any advice? I don't understand why rust doesn't seem to find cmake (if I'm reading that correctly), as /usr/bin is in my PATH.

I can post the entire error message, but it's gigantic. Thanks for any information!

This "Building CXX object" text comes from cmake. Your cmake works, and is not the problem here.

The problem is this:

fatal: not a git repository (or any of the parent directories): .git

This is not CMake issue, not Rust issue, not Cargo issue. It's a custom error, specific to one of your dependencies, which apparently tried to obtain source code via git and failed doing so.

Cargo prints which dependency is responsible for the error, but unfortunately prints tons of irrelevant garbage too, so you have to carefully sift through the output to find the line which tells you which dependency is responsible for this error. There will be either at the top:

error: failed to run custom build command for this one

or potentially somewhere near the bottom:

thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/this one/build.rs:

1 Like

OK that makes sense, I appreciate the help and the explanation on reading error outputs!