cmake - Installing OSVR on Linux - Setting binary directory -
i trying install osvr-core on debian 9.1 system. installed prerequisites , followed this tutorial. stuck @ making project. created build-directory , tried running
cmake -dcmake_prefix_path="/usr/local/stow/libfunctionality" ~/src/osvr-core
but error, binary directory should different source directory. source directory (with make-files) should ~/src/osvr-core , since in ~/src/osvr-core/build, thought enough.
how (and where) change location of binary directory? tried command line option -d cmake_binary_dir= "path/to/osvr-core/build did not work. read online, should not set binary directory manually, created/calculated.
this cmakeerror.log file:
determining if pthread_create exist failed following output: change dir: /home/lenala/src/osvr-core/cmakefiles/cmaketmp run build command:"/usr/bin/make" "cmtc_42e59/fast" /usr/bin/make -f cmakefiles/cmtc_42e59.dir/build.make cmakefiles/cmtc_42e59.dir/build make[1]: entering directory '/home/lenala/src/osvr-core/cmakefiles/cmaketmp' building c object cmakefiles/cmtc_42e59.dir/checksymbolexists.c.o /usr/bin/cc -o cmakefiles/cmtc_42e59.dir/checksymbolexists.c.o -c /home/lenala/src/osvr-core/cmakefiles/cmaketmp/checksymbolexists.c linking c executable cmtc_42e59 /usr/bin/cmake -e cmake_link_script cmakefiles/cmtc_42e59.dir/link.txt --verbose=1 /usr/bin/cc cmakefiles/cmtc_42e59.dir/checksymbolexists.c.o -o cmtc_42e59 -rdynamic cmakefiles/cmtc_42e59.dir/checksymbolexists.c.o: in function `main': checksymbolexists.c:(.text+0x1b): undefined reference `pthread_create' collect2: error: ld returned 1 exit status cmakefiles/cmtc_42e59.dir/build.make:97: recipe target 'cmtc_42e59' failed make[1]: *** [cmtc_42e59] error 1 make[1]: leaving directory '/home/lenala/src/osvr-core/cmakefiles/cmaketmp' makefile:126: recipe target 'cmtc_42e59/fast' failed make: *** [cmtc_42e59/fast] error 2 file /home/lenala/src/osvr-core/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 function pthread_create exists in pthreads failed following output: change dir: /home/lenala/src/osvr-core/cmakefiles/cmaketmp run build command:"/usr/bin/make" "cmtc_f2984/fast" /usr/bin/make -f cmakefiles/cmtc_f2984.dir/build.make cmakefiles/cmtc_f2984.dir/build make[1]: entering directory '/home/lenala/src/osvr-core/cmakefiles/cmaketmp' building c object cmakefiles/cmtc_f2984.dir/checkfunctionexists.c.o /usr/bin/cc -dcheck_function_exists=pthread_create -o cmakefiles/cmtc_f2984.dir/checkfunctionexists.c.o -c /usr/share/cmake-3.7/modules/checkfunctionexists.c linking c executable cmtc_f2984 /usr/bin/cmake -e cmake_link_script cmakefiles/cmtc_f2984.dir/link.txt --verbose=1 /usr/bin/cc -dcheck_function_exists=pthread_create cmakefiles/cmtc_f2984.dir/checkfunctionexists.c.o -o cmtc_f2984 -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status cmakefiles/cmtc_f2984.dir/build.make:97: recipe target 'cmtc_f2984' failed make[1]: *** [cmtc_f2984] error 1 make[1]: leaving directory '/home/lenala/src/osvr-core/cmakefiles/cmaketmp' makefile:126: recipe target 'cmtc_f2984/fast' failed make: *** [cmtc_f2984/fast] error 2
have used
cmake .. -djsoncpp_with_cmake_package=on -djsoncpp_lib_build_shared=off -dcmake_cxx_flags=-fpic
since that's tutorial says use build project , cmakalist.txt handle paths.
Comments
Post a Comment