Ask Your Question
0

OpenCV 3.1 cmake error during configuration

asked 2017-07-19 08:14:46 -0500

Ice_T02 gravatar image

updated 2017-07-19 09:29:32 -0500

Hy,

configuring OpenCV 3.1 for an Tegra TX1 Ubuntu 16.04 with CUDA 8.0 lead me to the following error:

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDA_LIBRARY (ADVANCED)
    linked by target "example_gpu_alpha_comp" in directory /home/aa/Desktop/OPENCV_INSTALL/opencv/samples/gpu
    linked by target "example_gpu_bgfg_segm" in directory /home/aa/Desktop/OPENCV_INSTALL/opencv/samples/gpu
    linked by target "example_gpu_cascadeclassifier" in directory /home/aa/Desktop/OPENCV_INSTALL/opencv/samples/gpu
   ... and so on

For the installation process I am following this guide. Anyway all errors are related to "example_gpu_SomeExampleName". I googled it up and found out that people having similar problems since CUDA only comes with x64 libraries. How to work around this issue? Is it possible to configure OpenCv 3.1 for Ubuntu only in x64 mode? Any help would be appreciated.

EDIT 1: added CMakeError.log & CMakeOutput.log

CMakeOutput.log

The system is: Linux - 4.4.0-31-generic - x86_64
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is GNU, found in "/home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/2.8.12.2/CompilerIdCXX/a.out"

Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags: 

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/2.8.12.2/CompilerIdC/a.out"

Determining if the CXX compiler works passed with the following output:
Change Dir: /home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec3282914228/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3282914228.dir/build.make CMakeFiles/cmTryCompileExec3282914228.dir/build
make[1]: Entering directory `/home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec3282914228.dir/testCXXCompiler.cxx.o
/usr/bin/c++     -o CMakeFiles/cmTryCompileExec3282914228.dir/testCXXCompiler.cxx.o -c /home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTryCompileExec3282914228
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3282914228.dir/link.txt --verbose=1
/usr/bin/c++        CMakeFiles/cmTryCompileExec3282914228.dir/testCXXCompiler.cxx.o  -o cmTryCompileExec3282914228 -rdynamic 
make[1]: Leaving directory `/home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp'


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec2523076562/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2523076562.dir/build.make CMakeFiles/cmTryCompileExec2523076562.dir/build
make[1]: Entering directory `/home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/aa/Desktop/OPENCV_INSTALL/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec2523076562.dir/CMakeCXXCompilerABI.cpp.o
/usr/bin/c++     -o CMakeFiles/cmTryCompileExec2523076562.dir ...
(more)
edit retag flag offensive close merge delete

Comments

Ok forum is too slow today.can you delete one of your post thanks

LBerger gravatar imageLBerger ( 2017-07-19 08:30:21 -0500 )edit

-.- sorry ...

Ice_T02 gravatar imageIce_T02 ( 2017-07-19 08:54:47 -0500 )edit

nvm, it's not entirely your fault. ppl have to wait in a moderation queue, and get impatient.

the cmake output is usually helpful here, can you add it to the question ?

berak gravatar imageberak ( 2017-07-19 08:57:53 -0500 )edit

I kill your link errorlog and outlog post your errorlog and outlog in in your question

LBerger gravatar imageLBerger ( 2017-07-19 09:22:52 -0500 )edit

:( RIP ErrorLOG :D ... well i know from windows you can select the compiler to exclusivly x64 environment ... but how to change this for ubunut? I have to say i am pretty new to the ubuntu and cmake command line as well...

Ice_T02 gravatar imageIce_T02 ( 2017-07-19 09:34:13 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-19 10:47:10 -0500

Ice_T02 gravatar image

Okay, i have found a solution ... The issue is that "libcuda.so" is not found.

Adding the following command to cmake configuration solves the issue:

-DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs \
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-19 08:14:46 -0500

Seen: 463 times

Last updated: Jul 19 '17