Quantcast

OpenCV Compiling error with Cuda 5.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenCV Compiling error with Cuda 5.0

opencv-users mailing list
Hi!,

I want to use OpenCV-2.4.11 on my laptop on OpenSUSE-13.2 and i have tried
to compile it. As third part library i have taken ffmpeg-2.6.1 because
newer versions causing some troubles.  Because my laptop has an integrated
gpu from Intel and an NVIDIA Geforce 940M gpu i have to use bumblebee and
all that nice stuff to get full access to all the power reserves my laptop
has.

I have compiled opencv with the needed options WITH_CUDA=ON for example. I
always get these error while compilation at 15%

"
Linking CXX executable ../../bin/opencv_perf_core
../../lib/libopencv_core.so.2.4.11: undefined reference to
`__cudaRegisterLinkedBinary_52_tmpxft_00002e9c_00000000_7_matrix_operations_cpp1_ii_332650c4'

"

I have tried different things to clear that but it just causes to another
errors.
One for example  is this described here
http://stackoverflow.com/questions/22115197/dynamic-parallelism-undefined-reference-to-cudaregisterlinkedbinary-linking

and i tried to add for example this flag.

-rdc=true -c

but it just leads to more errors.

I hope anybody knows this issue.

Ingeborg

---------------------------------my cmake
data------------------------------------------------------

"Detected version of GNU GCC: 48 (408)

Found OpenEXR: /usr/lib64/libIlmImf.so

checking for module 'gstreamer-video-1.0'

package 'gstreamer-video-1.0' not found

checking for module 'gstreamer-app-1.0'

package 'gstreamer-app-1.0' not found

checking for module 'gstreamer-riff-1.0'

package 'gstreamer-riff-1.0' not found

checking for module 'gstreamer-pbutils-1.0'

package 'gstreamer-pbutils-1.0' not found

checking for module 'gstreamer-video-0.10'

package 'gstreamer-video-0.10' not found

checking for module 'gstreamer-app-0.10'

package 'gstreamer-app-0.10' not found

checking for module 'gstreamer-riff-0.10'

package 'gstreamer-riff-0.10' not found

checking for module 'gstreamer-pbutils-0.10'

package 'gstreamer-pbutils-0.10' not found

Looking for linux/videodev.h

Looking for linux/videodev.h - not found

Looking for linux/videodev2.h

Looking for linux/videodev2.h - found

Looking for sys/videoio.h

Looking for sys/videoio.h - not found

Looking for libavformat/avformat.h

Looking for libavformat/avformat.h - found

Looking for ffmpeg/avformat.h

Looking for ffmpeg/avformat.h - not found

CUDA detected: 7.5

CUDA NVCC target flags: -gencode;arch=compute_50,code=sm_50

Found Sphinx 1.2.3: /usr/bin/sphinx-build

Found apache ant 1.9.4: /usr/bin/ant

Assume that non-module dependency is available: cudart (for module
opencv_core)

Assume that non-module dependency is available: nppc (for module
opencv_core)

Assume that non-module dependency is available: nppi (for module
opencv_core)

Assume that non-module dependency is available: npps (for module
opencv_core)


General configuration for OpenCV 2.4.11
=====================================

Version control: unknown


Platform:

Host: Linux 3.16.7-24-desktop x86_64

CMake: 3.0.2

CMake generator: Unix Makefiles

CMake build tool: /usr/bin/gmake

Configuration: Release


C/C++:

Built as dynamic libs?: YES

C++ Compiler: /usr/bin/c++ (ver 4.8.3)

C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type
-Werror=address -Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow
-Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor
-fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer
-msse -msse2 -msse3 -ffunction-sections -fopenmp -O3 -DNDEBUG -DNDEBUG

C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type
-Werror=address -Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow
-Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor
-fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer
-msse -msse2 -msse3 -ffunction-sections -fopenmp -g -O0 -DDEBUG -D_DEBUG

C Compiler: /usr/bin/cc

C flags (Release): -fsigned-char -W -Wall -Werror=return-type
-Werror=address -Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef
-Winit-self -Wpointer-arith -Wshadow -Wno-narrowing
-fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer
-msse -msse2 -msse3 -ffunction-sections -fopenmp -O3 -DNDEBUG -DNDEBUG

C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address
-Werror=sequence-point -Wformat -Werror=format-security
-Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef
-Winit-self -Wpointer-arith -Wshadow -Wno-narrowing
-fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer
-msse -msse2 -msse3 -ffunction-sections -fopenmp -g -O0 -DDEBUG -D_DEBUG

Linker flags (Release):

Linker flags (Debug):

Precompiled headers: YES


OpenCV modules:

To be built: core flann imgproc highgui features2d calib3d ml video legacy
objdetect photo gpu ocl nonfree contrib java python stitching superres ts
videostab

Disabled: world

Disabled by dependency: -

Unavailable: androidcamera dynamicuda viz


GUI:

QT 5.x: YES (ver 5.4.2)

QT OpenGL support: YES (Qt5::OpenGL 5.4.2)

OpenGL support: YES (/usr/lib64/libGLU.so /usr/lib64/libGL.so
/usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libX11.so
/usr/lib64/libXext.so)

VTK support: NO


Media I/O:

ZLib: /usr/lib64/libz.so (ver 1.2.8)

JPEG: /usr/lib64/libjpeg.so (ver )

PNG: /usr/lib64/libpng.so (ver 1.6.13)

TIFF: /usr/lib64/libtiff.so (ver 42 - 4.0.4)

JPEG 2000: /usr/lib64/libjasper.so (ver 1.900.1)

OpenEXR: /usr/lib64/libImath.so /usr/lib64/libIlmImf.so
/usr/lib64/libIex.so /usr/lib64/libHalf.so /usr/lib64/libIlmThread.so (ver
2.1.0)


Video I/O:

DC1394 1.x: NO

DC1394 2.x: YES (ver 2.2.2)

FFMPEG: YES

codec: YES (ver 56.26.100)

format: YES (ver 56.25.101)

util: YES (ver 54.20.100)

swscale: YES (ver 3.1.101)

gentoo-style: YES

GStreamer: NO

OpenNI: NO

OpenNI PrimeSensor Modules: NO

PvAPI: NO

GigEVisionSDK: NO

UniCap: YES (ver 0.9.12)

UniCap ucil: YES (ver 0.9.10)

V4L/V4L2: Using libv4l1 (ver 1.2.1) / libv4l2 (ver 1.2.1)

XIMEA: NO

Xine: YES (ver 1.2.6)


Other third-party libraries:

Use IPP: NO

Use Eigen: YES (ver 3.2.2)

Use TBB: NO

Use OpenMP: YES

Use GCD NO

Use Concurrency NO

Use C=: NO

Use Cuda: YES (ver 7.5)

Use OpenCL: YES


NVIDIA CUDA

Use CUFFT: YES

Use CUBLAS: YES

USE NVCUVID: YES

NVIDIA GPU arch: 50

NVIDIA PTX archs:

Use fast math: YES


OpenCL:

Version: dynamic

Include path: /home/peter/programs/opencv-2.4.11/3rdparty/include/opencl/1.2

Use AMD FFT: NO

Use AMD BLAS: NO


Python:

Interpreter: /usr/bin/python2 (ver 2.7.8)

Libraries: /usr/lib64/libpython2.7.so (ver 2.7.8)

numpy: /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.9.0)

packages path: lib/python2.7/site-packages


Java:

ant: /usr/bin/ant (ver 1.9.4)

JNI: /usr/lib64/jvm/java/include /usr/lib64/jvm/java/include/linux
/usr/lib64/jvm/java/include

Java tests: YES


Documentation:

Build Documentation: YES

Sphinx: /usr/bin/sphinx-build (ver 1.2.3)

PdfLaTeX compiler: /usr/bin/pdflatex

Doxygen: YES (/usr/bin/doxygen)


Tests and samples:

Tests: YES

Performance tests: YES

C/C++ Examples: YES


Install path: /usr/local


cvconfig.h is in: /home/peter/programs/opencv-2.4.11/build

-----------------------------------------------------------------"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenCV Compiling error with Cuda 5.0

keghn
 I believe cuda, or a gpu running software is not really in any version of Opencv except OpenCv 3.0.

Bumble bee is used in computers that have Intel and Nvidia GPU at the same time. Because, int the past,
 Linux Operating System could not handle it, But 3rd source bumble bee could, some what.
 I have the intel and cuda sett up on my laptop.
 But now, I stopped using it in Mint 17 Linux, A Ubuntu 14 clone, Debian class OS. The Mint OS can
deal with it, Like windows OS can. But i still had to use install Cuda and Ubuntu software to make it work right.

 So then, you must have installed Cuda 5.0 because the latest is 7.5.

 Did the install of work of Cuda. And did you get the cuda hello world program to work.

 For trouble shooting purposes, do not use cmake or Qt, or any other codeblock, or any other stuff. Want to get rid
of all the moving parts that can go wrong, simplicity.

 Open a terminal and type GPP compile command:

nvcc program.cu -lm -o program -lopencv_core -lopencv_highgui -lopencv_gpu

 And:

nvcc program.cu -lm -o program -lopencv_core -lopencv_highgui -lopencv_gpu -rdc=true -c

 Use a simplest openCV Cuda program.
 See what happens.

 Cmake is used for installing Cuda and Opencv and also compiling a single little program. I avoid cmake
if given a choice.







Loading...