I'm trying to build OpenPose from the source code, but however I get this error message. Please help me.
Here is the log from CMake-GUI:
Building with CUDA.
CUDA detected: 9.1
Added CUDA NVCC flags for: sm_61
cuDNN not found
Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindProtobuf.cmake:543 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:431 (find_package)
Here are the last few lines from CMakeErrorLog
Linking C executable cmTC_54d83
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_54d83.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_54d83.dir/CheckFunctionExists.c.o -o $
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_54d83.dir/build.make:97: recipe for target 'cmTC_54d83' failed
make[1]: *** [cmTC_54d83] Error 1
make[1]: Leaving directory '/home/idl/PycharmProjects/openpose/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_54d83/fast' failed
make: *** [cmTC_54d83/fast] Error 2
I have installed the required dependencies- CUDA, CuDNN, CAFFE, CV2...
Related
I am not able to configure cmake.
The issue is as described below about I am unable to make most of it:
CMake error at /snap/cmake/936/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake230 (message):Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/snap/cmake/936/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake594 (_FPHSA_FAILURE_MESSAGE)
/snap/cmake/936/share/cmake-3.21/Modules/FindXII.camke:457 (find_package_handle_Standard_args)
extern/glfx/CMakeLists.txt:27 (find package)
Below is the error log (CmakeErrorLog):
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_81640/fast && /usr/bin/make -f CMakeFiles/cmTC_81640.dir/build.make CMakeFiles/cmTC_81640.dir/build
make[1]: Entering directory '/home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_81640.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_81640.dir/src.c.o -c /home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_81640
/snap/cmake/936/bin/cmake -E cmake_link_script CMakeFiles/cmTC_81640.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_81640.dir/src.c.o -o cmTC_81640
/usr/bin/ld: CMakeFiles/cmTC_81640.dir/src.c.o: in function `main':
src.c:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x5e): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text+0x6f): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_81640.dir/build.make:99: cmTC_81640] Error 1
make[1]: Leaving directory '/home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_81640/fast] Error 2
Source file was:
#include <pthread.h>
static void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_f6423/fast && /usr/bin/make -f CMakeFiles/cmTC_f6423.dir/build.make CMakeFiles/cmTC_f6423.dir/build
make[1]: Entering directory '/home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f6423.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_f6423.dir/CheckFunctionExists.c.o -c /snap/cmake/936/share/cmake-3.21/Modules/CheckFunctionExists.c
Linking C executable cmTC_f6423
/snap/cmake/936/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f6423.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_f6423.dir/CheckFunctionExists.c.o -o cmTC_f6423 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_f6423.dir/build.make:99: cmTC_f6423] Error 1
make[1]: Leaving directory '/home/hariton/Box2D/Box2D/Testbed/Build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_f6423/fast] Error 2
The output log is too big and I cannot post it (maybe can post parts of it).
I am positive that I have all needed libraries installed. The issue must lie with the cmake implementation.
What is did is the following
Basically I was at the CMake master file and I wanted to run it at the testbed folder of box2d.
Can anyone help me out please?
If more information is needed let me know
Eventually was able to configure cmake without error
Initially the problem was because the following library was not installed: x11-dev
Then another error came up, as noted in the above comment.
After installing the following xorg-dev libglu1-mesa-dev the configuration was completed without any errors.
Thank you both for the help!
I'm trying to install plexe-sumo with cmake. I followed the tutorial at plexe.car2x.org and here's the results:
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_BINARY_DIR: /home/cc/src/plexe-sumo/build-release
-- CMAKE_SOURCE_DIR: /home/cc/src/plexe-sumo
--
-- Platform:
-- Host: Linux4.15.0-34-genericx86_64
-- CMake: 3.12.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
--
-- Found Proj: /usr/lib/x86_64-linux-gnu/libproj.so
CMake Error at /usr/local/share/cmake-3.12/Modules/UseSWIG.cmake:627 (add_custom_target):
add_custom_target cannot create target "libsumo_swig_compilation" because
another target with the same name already exists. The existing target is a
custom target created in source directory
"/home/cc/src/plexe-sumo/src/libsumo". See documentation for policy
CMP0002 for more details.
Call Stack (most recent call first):
src/libsumo/CMakeLists.txt:39 (SWIG_ADD_LIBRARY)
-- Enabled features: Linux-4.15.0-34-generic Proj GUI GDAL OSG GL2PS SWIG
-- Configuring incomplete, errors occurred!
There is no file named 'libsumo_swig_compilation' under "/home/cc/src/plexe-sumo/src/libsumo".
Then I checked the error log file, but the errors shown are about pthread saying 'undefined reference to pthread_creat' and 'cannot find -lpthreads'. Actually my pthread library is installed at 'libc6: /lib/x86_64-linux-gnu/libpthread.so.0'.
So I was wondering what's the exact problem here and how to solve it. I'm using a virtual machine with ubuntu 16. I appreciate your help!
Following is the error log file:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_050d5/fast"
/usr/bin/make -f CMakeFiles/cmTC_050d5.dir/build.make CMakeFiles/cmTC_050d5.dir/build
make[1]: Entering directory '/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_050d5.dir/CheckSymbolExists.c.o
/usr/bin/cc -Wall -pedantic -Wextra -o CMakeFiles/cmTC_050d5.dir/CheckSymbolExists.c.o -c /home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:11: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
return ((int*)(&pthread_create))[argc];
^
Linking C executable cmTC_050d5
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_050d5.dir/link.txt --verbose=1
/usr/bin/cc -Wall -pedantic -Wextra -rdynamic CMakeFiles/cmTC_050d5.dir/CheckSymbolExists.c.o -o cmTC_050d5
CMakeFiles/cmTC_050d5.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_050d5.dir/build.make:86: recipe for target 'cmTC_050d5' failed
make[1]: *** [cmTC_050d5] Error 1
make[1]: Leaving directory '/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_050d5/fast' failed
make: *** [cmTC_050d5/fast] Error 2
File /home/cc/src/plexe-sumo/build-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/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_9f654/fast"
/usr/bin/make -f CMakeFiles/cmTC_9f654.dir/build.make CMakeFiles/cmTC_9f654.dir/build
make[1]: Entering directory '/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9f654.dir/CheckFunctionExists.c.o
/usr/bin/cc -Wall -pedantic -Wextra -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_9f654.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake-3.12/Modules/CheckFunctionExists.c
Linking C executable cmTC_9f654
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9f654.dir/link.txt --verbose=1
/usr/bin/cc -Wall -pedantic -Wextra -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_9f654.dir/CheckFunctionExists.c.o -o cmTC_9f654 -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9f654.dir/build.make:86: recipe for target 'cmTC_9f654' failed
make[1]: *** [cmTC_9f654] Error 1
make[1]: Leaving directory '/home/cc/src/plexe-sumo/build-release/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_9f654/fast' failed
make: *** [cmTC_9f654/fast] Error 2
My assumption is that this is really a behavior which only the new cmake shows. You could try to rename all references to libsumo in the java part of the CMakeLists.txt or simply use the CMakeLists of the main line sumo here: https://github.com/eclipse/sumo/blob/master/src/libsumo/CMakeLists.txt
I cant get working my blas library with cmake. I have arch-linxux, both blas and cmake are installed with pacman. Cant understand where is problem :-(. I made cmake to print out the output of macro CHECK_FORTRAN_FUNCTION_EXISTS, because it fails there. Maybe I dont have proper configuration of ld?
My simple testing CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project(Test C Fortran)
find_package(BLAS)
Error part from output:
-- Looking for Fortran sgemm
-- Change Dir: /home/jiri/test_lapack/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_486fc/fast"
/usr/bin/make -f CMakeFiles/cmTC_486fc.dir/build.make CMakeFiles/cmTC_486fc.dir/build
make[1]: Entering directory '/home/jiri/test_lapack/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_486fc.dir/testFortranCompiler.f.o
/usr/bin/gfortran -c /home/jiri/test_lapack/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_486fc.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_486fc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_486fc.dir/link.txt --verbose=1
/usr/bin/gfortran CMakeFiles/cmTC_486fc.dir/testFortranCompiler.f.o -o cmTC_486fc /usr/local/lib64/libblas.a
/usr/bin/ld: /usr/local/lib64/libblas.a(sgemm.f.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib64/libblas.a(xerbla.f.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_486fc.dir/build.make:99: cmTC_486fc] Error 1
make[1]: Leaving directory '/home/jiri/test_lapack/CMakeFiles/CMakeTmp'
make: *** [Makefile:126: cmTC_486fc/fast] Error 2
-- Looking for Fortran sgemm - not found
So I was trying to install libssh base on instruction from https://github.com/substack/libssh/blob/master/INSTALL
Then when I was trying to build using cmake I have run into problems. I have cmake module on my linux server "cmake/3.7.2-1"
When I have executed command
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
I got following errors:
CMake Error at /afs/.../RHEL6-x86_64/cmake/3.7.2-1/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler ".../4.9.1/Linux_x86_64_compiled/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /local/efrimaz/libSSH/v0-6/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_e97bb/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_e97bb.dir/build.make
CMakeFiles/cmTC_e97bb.dir/build
gmake[1]: Entering directory
`/local/efrimaz/libSSH/v0-6/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_e97bb.dir/testCXXCompiler.cxx.o
/.../4.9.1/Linux_x86_64_compiled/bin/gcc -o
CMakeFiles/cmTC_e97bb.dir/testCXXCompiler.cxx.o -c
/local/efrimaz/libSSH/v0-6/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_e97bb
/afs/.../cmake/3.7.2-1/bin/cmake
-E cmake_link_script CMakeFiles/cmTC_e97bb.dir/link.txt --verbose=1
/.../4.9.1/Linux_x86_64_compiled/bin/gcc
CMakeFiles/cmTC_e97bb.dir/testCXXCompiler.cxx.o -o cmTC_e97bb -rdynamic
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_e97bb] Error 1
gmake[1]: Leaving directory
`/local/efrimaz/libSSH/v0-6/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_e97bb/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
examples/CMakeLists.txt:1 (project)
-- Configuring incomplete, errors occurred!
Google didnt help. Any adivse appreciate.
I want to compile a C program. When I run cmake
build]$ cmake ../
-- The C compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec3431547622/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3431547622.dir/build.make
CMakeFiles/cmTryCompileExec3431547622.dir/build
make[1]: Entering directory
'/home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object
CMakeFiles/cmTryCompileExec3431547622.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec3431547622.dir/testCCompiler.c.o
-c /home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp/testCCompiler.c
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: error while loading shared
libraries: libisl.so.13: cannot open shared object file: No such file or
directory
CMakeFiles/cmTryCompileExec3431547622.dir/build.make:57: recipe for target
'CMakeFiles/cmTryCompileExec3431547622.dir/testCCompiler.c.o' failed
make[1]: *** [CMakeFiles/cmTryCompileExec3431547622.dir/testCCompiler.c.o]
Error 1
make[1]: Leaving directory
'/home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec3431547622/fast' failed
make: *** [cmTryCompileExec3431547622/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/home/vahid/dev/Indexer/build/CMakeFiles/CMakeOutput.log".
See also "/home/vahid/dev/Indexer/build/CMakeFiles/CMakeError.log".
why did this error occur? How can I fix it?
why this error occured?
According to this error message:
/usr/bin/cc -o CMakeFiles/cmTryCompileExec3431547622.dir/testCCompiler.c.o -c /home/vahid/dev/Indexer/build/CMakeFiles/CMakeTmp/testCCompiler.c
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1: error while loading shared libraries: libisl.so.13: cannot open shared object file: No such file or directory
It looks like your compiler does not work.
how i can fix it?
Reinstall toolchain should be the simplest way to fix it.
How to do that depends on your operating system, if you are using Linux distribution like Debian, you can use something like apt-get install build-essential to install it; if you are using Fedora or CentOS, you could use yum group install c-development.