Ultimaker / libArcus

Communication library between internal components for Ultimaker software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unknown CMake command "add_sip_python_module"

shakenov-chinga opened this issue · comments

Hi,
I'm using cubieboard (Debian Jessie) for OctoPrint server. I was able to successfully install OctoPrint, and it uses CuraEngine 15.04. Link lead me to CuraEngine git page, where I also successfully installed protobuf and now I need to install libArcus. The error in title appears on cmake .. command. Here is text from CMakeError.log
`Determining if the pthread_create exist failed with the following output:
Change Dir: /home/cubie/libArcus/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec3797558145/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3797558145.dir/build.make CMakeFiles/cmTryCompileExec3797558145.dir/build
make[1]: Entering directory '/home/cubie/libArcus/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/cubie/libArcus/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3797558145.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec3797558145.dir/CheckSymbolExists.c.o -c /home/cubie/libArcus/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec3797558145
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3797558145.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec3797558145.dir/CheckSymbolExists.c.o -o cmTryCompileExec3797558145 -rdynamic
CMakeFiles/cmTryCompileExec3797558145.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0xe): undefined reference to pthread_create'
CheckSymbolExists.c:(.text+0x12): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec3797558145.dir/build.make:88: recipe for target 'cmTryCompileExec3797558145' failed
make[1]: Leaving directory '/home/cubie/libArcus/build/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec3797558145/fast' failed
make[1]: *** [cmTryCompileExec3797558145] Error 1
make: *** [cmTryCompileExec3797558145/fast] Error 2

File /home/cubie/libArcus/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/cubie/libArcus/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec1170917334/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1170917334.dir/build.make CMakeFiles/cmTryCompileExec1170917334.dir/build
make[1]: Entering directory '/home/cubie/libArcus/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/cubie/libArcus/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec1170917334.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec1170917334.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.0/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec1170917334
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1170917334.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec1170917334.dir/CheckFunctionExists.c.o -o cmTryCompileExec1170917334 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec1170917334.dir/build.make:88: recipe for target 'cmTryCompileExec1170917334' failed
make[1]: Leaving directory '/home/cubie/libArcus/build/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec1170917334/fast' failed
make[1]: *** [cmTryCompileExec1170917334] Error 1
make: *** [cmTryCompileExec1170917334/fast] Error 2`
I'm not very good at linux. Help, please!

Hello @shakenov-chinga , probably you are missing one of the packages for compiling. At the beginning Cmake checks required packages and if some of them missing it will fail. Looks like you do not have pthread_create, please check Cmake and required packages. Be sure that they are installed.

The problem is not something that CMake can fix for you. It's your compiler. Arcus requires a compiler that supports pthreads, but CMake is saying that your compiler doesn't support it.

GCC should support it on Linux. I suggest you install and run cmake-gui (the Debian package). In the file menu you can delete the cache. Do that, and configure, and then select GCC as compiler. Maybe you need to really point to c++ and cc as your CMAKE_CXX_COMPILER and CMAKE_C_COMPILER.

Closing this as a non issue