Ask Your Question
0

Building current 3.0 dev branch Ubuntu 14.04

asked 2014-07-31 08:08:28 -0600

updated 2014-08-04 03:42:58 -0600

I tried building OpenCV 3.0 current master branch on Ubuntu 14.04 which still yields a problem after fixing this pull request which gave a CMAKE error. All CMAKE errors are gone now. However during the make a new error comes up.

cmake -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_INSTALL_PREFIX=/usr/local 
-D WITH_CUBLAS=ON -D WITH_CUFFT=ON -D WITH_EIGEN=ON -D WITH_OPENGL=ON 
-D WITH_QT=ON -D WITH_TBB=ON -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON 
-D BUILD_TESTS=ON -D CUDA_ARCH_BIN="3.0" ../opencv_3.0/

And after making this error occurs.

/home/spu/opencv_3.0/modules/cudabgsegm/test/test_bgsegm.cpp:46:36: fatal error: opencv2/cudalegacy.hpp: No such file or directory
 #  include "opencv2/cudalegacy.hpp"
                                    ^
compilation terminated.

This is kind of weird since the original legacy.hpp was replaced by cudalegacy.hpp. This seems to work for most files but still generates an error here. The file exists, so have no clue on what to try now. If we fix this I shall submit a PR.

UPDATE:

There is also a now pending fix for the cudabgsm module here. Applying that fix also.

Only error that remains now at 88% of the built is the following

In file included from /data/builds/opencv3.0/modules/cudev/include/opencv2/cudev/warp/warp.hpp:49:0,
                 from /data/builds/opencv3.0/modules/python/pyopencv_generated_include.h:1,
                 from /data/builds/opencv3.0/modules/python/src2/cv2.cpp:12:
/data/builds/opencv3.0/modules/cudev/include/opencv2/cudev/warp/../common.hpp:49:26: fatal error: cuda_runtime.h: No such file or directory
 #include <cuda_runtime.h>
                          ^
compilation terminated.

It seems that OpenCV is at a certain moment not able to find my cuda runtime environment, however several other cuda cores build perfectly...

UPDATE 2:

A bash output of the building process can be found here. Still weird that building works for several cuda kernels but then fails with a message that it doesn't find the cuda runtime...

UPDATE 3:

Tried adding compiler flags to the make option linking explicitly my CUDA install

sudo make CFLAGS='-I /usr/local/cuda/include -L /usr/local/cuda/bin'

But still same problems. Anyone?

UPDATE4:

I have implemented the suggested fix, seems there is still an error.

/usr/bin/ld: ../../lib/libopencv_ts.a(ts_gtest.cpp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
../../lib/libopencv_ts.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/cv2.so] Error 1
make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
make: *** [all] Error 2

Is this specific to my system?

edit retag flag offensive close merge delete

Comments

1

I submitted a fix for the issue PR.

Vladislav Vinogradov gravatar imageVladislav Vinogradov ( 2014-08-04 03:15:33 -0600 )edit

Thank you for the effort! Will see if it gets my system going!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-04 03:21:37 -0600 )edit

@Vladislav Vinogradov : Seems this is not fixed yet, see updated question after adapting the files suggested in your pull request on the latest 3.0 branch (cloned just now)

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-04 03:44:31 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-04 02:17:51 -0600

updated 2014-08-04 04:02:35 -0600

Current solution is to built with -D BUILD_opencv_python=OFF for the moment. The developers know there is a bug in the building of the python wrappers. They will look into it.

More info can be found here.

EDIT: Since fix hasn't solve all of my problems, I will keep this unsolved for now.

edit flag offensive delete link more

Comments

Old topic. Time to mark it solved since problems are gone now.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-16 06:05:17 -0600 )edit

Question Tools

Stats

Asked: 2014-07-31 08:08:28 -0600

Seen: 1,716 times

Last updated: Aug 04 '14