Unable to Build from Source

I am currently attempting to complete the “Deploying Deep Learning” tutorial on the TX1. Setting up the host and flashing the TX1 went really well, but I have hit a snag while trying to build from source. I cloned the repo (dusty-nv/Jetson inference), but have been unable to configure using cmake. Was only able to make it as far as creating the build directory, but when I attempt to run cmake…/I get the response "bash: cmake…/: No such file or directory.

Have been trying to solve this all morning. Does it have anything to do with changing the environment variables?

I am running Ubuntu 16.04, sure would appreciate any help.

“cmake” is a developer tool which isn’t installed on Ubuntu by default. You can:

sudo apt-get install cmake

Hey linuxdev, thanks for chiming in. This is the part that stumps me, is I have already installed it with sudo apt-get install git cmake, but I am still getting the No such file or directory.

Perhaps your user path is at issue, or permissions (which shouldn’t be happening, but it is easy to check). When I type “which cmake” it shows it at “/usr/bin/cmake”. See if cmake is there, and if so, what permissions it has.

Also run “echo $PATH” and see if that shows with “/usr/bin” in it (it is colon-delimited).

Hi again, linuxdev, and sure want to say thanks for all your help. I typed “which cmake” and got back /usr/bin/cmake. I checked permission with “ls -ld cmake” and got back “-rwxr=xr=x 1 root root”. Still trying to decipher what that means.

Hi again, linuxdev, and sure want to say thanks for all your help. I typed “which cmake” and got back /usr/bin/cmake. I checked permission with “ls -ld cmake” and got back “-rwxr=xr=x 1 root root”. Still trying to decipher what that means.

According to that cmake is there and installed with correct permissions. Additionally, since “which” found cmake, it implies this is in your default path and should not require anything special for it to work.

Perhaps you ran cmake with a directory named which did not exist, or perhaps a directory where something it wanted was not in that directory. What directory did you run cmake from? If you ran this command from that directory, try the command which follows to see what is there:

cmake ../
ls ../

If you missed the space between cmake and “…/”, this would cause an error, but I’m just guessing.

I have been following the instructions accompanying this repo: https://github.com/dusty-nv/jetson-inference#system-setup. I am in the section “building from source on the Jetson”. I ran cmake in the newly-created directory jetson-inference/build.

Still getting “no such file or directory” when I run the command cmake…/

If you create a directory called “build”, then cd to it, the “…/” implies the parent directory holding the build subdirectory. Should cmake not find what it wants, then this implies either a typo in “…/” (such as missing a space), or else that the parent to “build” is missing the file cmake wants. The directions probably assume you are in some directory with source code…if you are, then perhaps you need a subdirectory within that. Likely the file which must be in the parent directory owning the “build” subdirectory is “CMakeLists.txt”. Do you see this file?

Good day,

Yes, within the parent directory “jetson-inference” there is a CMakeLists.txt file.

From the “build” subdirectory does this command run without error:

cat ../CMakeLists.txt

No, this won’t run at all, it returns “No such file or directory”.

Then CMakeLists.txt does not exist in the parent directory of the build subdirectory. This is the error, cmake itself is not what the complaint is about. The complaint is instead about the missing CMakeLists.txt. I keep thinking perhaps there is a typographic error.

When naming files “.” is a pseudonym for “the current directory”, and “…” is a pseudonym for “the parent directory containing the current directory”. If you type “pwd” you will see what the current directory is. If you then “cd …”, you will be in the parent directory.

If you start in the “build” subdirectory, type “cd …”, and then “ls” (listing all files, not just the one), this is where you must see CMakeLists.txt. If you see CMakeLists.txt with just “ls”, yet you can’t list the file with “ls CMakeLists.txt” (specifically naming the file), it implies that perhaps there is a hidden character in CMakeLists.txt which is not obvious, e.g., a space character at the end of the name might not be noticed even though the file appears to be there. Spaces at the start or end of a file name have fooled many people (and in fact some malware is based on this, e.g., fork bombs have lots of spaces and long names).

Can’t believe I made this mistake, but I didn’t type a space between the parent directory and cmake.

So, problem solved for this n00b. You have my respect and gratitude for all of your help!