OpenVibe 2.0 Build fails on LPTHREADS
Posted: Thu Nov 09, 2017 9:07 am
Hello all,
I tried searching for this problem everywhere online, and all i could find was that i need to install the lptrhead library, which I superfluously did (it was already installed)
I am running on Ubuntu 16.04.1 without plymouth (videocard issues) and Gnome desktop I followed the instructions and installed dependencies first.. everything was ok but at the end of the build it failed. I tried removing the build and tried again after update and upgrade... same exact error. Am I missing something obvious or is something wrong with either my ubuntu or with the build?
CMakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja" "cmTC_dbe9b"
[1/2] Building C object CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o
[2/2] Linking C executable cmTC_dbe9b
FAILED: : && /usr/bin/cc CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o -o cmTC_dbe9b && :
CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
File /home/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/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/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja" "cmTC_ecd45"
[1/2] Building C object CMakeFiles/cmTC_ecd45.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_ecd45
FAILED: : && /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_ecd45.dir/CheckFunctionExists.c.o -o cmTC_ecd45 -lpthreads && :
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Cheers
I tried searching for this problem everywhere online, and all i could find was that i need to install the lptrhead library, which I superfluously did (it was already installed)
I am running on Ubuntu 16.04.1 without plymouth (videocard issues) and Gnome desktop I followed the instructions and installed dependencies first.. everything was ok but at the end of the build it failed. I tried removing the build and tried again after update and upgrade... same exact error. Am I missing something obvious or is something wrong with either my ubuntu or with the build?
CMakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja" "cmTC_dbe9b"
[1/2] Building C object CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o
[2/2] Linking C executable cmTC_dbe9b
FAILED: : && /usr/bin/cc CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o -o cmTC_dbe9b && :
CMakeFiles/cmTC_dbe9b.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
File /home/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/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/coristus/Downloads/openvibe-2.0.0-src/build/sdk-Release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja" "cmTC_ecd45"
[1/2] Building C object CMakeFiles/cmTC_ecd45.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_ecd45
FAILED: : && /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_ecd45.dir/CheckFunctionExists.c.o -o cmTC_ecd45 -lpthreads && :
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Cheers