Astra cmake errors

Dear all,

I cloned the astra source code and tried to compile it. I previously downloaded and installed required deps. However, when executing cmake i get the error pasted below. Any suggestion?



cesc@cesc-1000H:~/astra/build$ cmake …
flags -Wall -fPIC -std=c++11
CMake Error at vendor/CMakeLists.txt:1 (add_subdirectory):
The source directory


does not contain a CMakeLists.txt file.

– Found Astra includes in /home/cesc/astra/include
– Found Astra lib dir:
– Found Astra libraries: Astra;AstraAPI;AstraUL
– Found Astra TOML:
– Found Astra plugins:
– Found Astra plugin TOML:
Setting rpath to $ORIGIN/…/lib
– Found SFML … in /usr/include
– Found SFML … in /usr/include
– Found SFML … in /usr/include
– Found SFML … in /usr/include
– Found SFML … in /usr/include
– Found SFML … in /usr/include
CMAKE_INSTALL_PREFIX : /home/cesc/astra/build/sdk
– Configuring incomplete, errors occurred!
See also “/home/cesc/astra/build/CMakeFiles/CMakeOutput.log”.
See also “/home/cesc/astra/build/CMakeFiles/CMakeError.log”.

1 Like

You’ll need to fetch the submodules, or remove shinyprofiler from the build. Running git submodule update --init --recursive should handle it. Don’t know if this is fixed yet, but you may need to update the submodule urls to use HTTP:


How i can remove the shinyprofile from the build?

Looks like there are some deps in the source

#include <Shiny.h>

As you mentioned the git command fails due to perm errors. Where i should change the HTTP you specified in the previous email?


Encountering this cmake error:

CMake Error at src/plugins/openni_sensor/CMakeLists.txt:50 (include_directories):
include_directories given empty-string as include directory.

  • Ubuntu 14.04
  • Cloned the repository
  • Checkout developer branch
  • ran this command: git submodule update --init --recursive
  • created a build directory
  • from the build directory, ran command cmake …

which generated the above error. I’ve looked around and not found a fix for this issue. Trying to build the astra sdk.

The line of code in question is:

include_directories ("$ENV{OPENNI2_INCLUDE}")

And this means you haven’t defined the OPENNI2_INCLUDE environment variable. For example:


You should define these in your .bash_profile or equivalent:

export OPENNI2_INCLUDE=/usr/local/include/ni2.3-dev
export OPENNI2_REDIST=/usr/local/lib/ni2.3-dev

Pointing to your own installation directories of course.

Thank you for the quick response. The environment variables are set and I am still getting the same error.

It should not be necessary to sudo cmake. That would invoke the root user context which may not have that environment variable set. (Quick sanity check… do sudo echo $OPENNI2_INCLUDE) Even so, you shouldn’t use sudo for cmake.

Thank you. Your answer made me relize that I made the mistake of cloning the repo with sudo git clone and that is why everything was requiring the sudo command. Recloned the repo with just git clone and successfully ran cmake. Now I am ready to try the make step.

HI, josh
I am facing a similar problem:
cp: cannot stat ‘/usr/local/lib/ni2.3-dev/*’: No such file or directory
Makefile:25: recipe for target ‘copy-redist’ failed

I am not sure what sourcing the OpenNIDevEnvironment did or did not but how should i define the above export path in which .bash_profile.
Please explain.

I keep getting the error:
Makefile:14: *** OPENNI2_INCLUDE is not defined. Please define it or ‘source’ the OpenNIDevEnvironment file from the installation. Stop.

I guess running $source OpenNIDevEnvironment does nothing.

What to do?

Hello Josh,
I’m using Astra SDK for Astra Pro. and using Ubuntu14.04. when trying to compile a .cpp file I’m getting this error.
fatal error: astra/astra.hpp: No such file or directory
#include <astra/astra.hpp>
compilation terminated.

I have put the lines below in .bashrc file

export ASTRA_SDK_INCLUDE=/home/pkumars/Astra-SDK-Linux/install/include
export ASTRA_SDK_LIB=/home/pkumars/Astra-SDK-Linux/install/lib


*** and my CMakeLists.txt looks like this.

cmake_minimum_required(VERSION 3.2)

project( AstraTest )

include_directories ("$ENV{ASTRA_SDK_INCLUDE}")

add_executable( test1 main.cpp )


hope I made my point clear. any kind of help will be highly appreciated.