# Revision history [back]

### Building current 3.0 dev branch Ubuntu 14.04

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.

### Building current 3.0 dev branch Ubuntu 14.04

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:

First error gone, by applying literally every fix in the mentioned pull request. Now error about not finding cuda_runtime.h

Building NVCC (Device) object modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_mog2.cu.o
In file included from /home/spu/opencv_3.0/modules/cudev/include/opencv2/cudev/functional/detail/color_cvt.hpp:49:0,
from /home/spu/opencv_3.0/modules/python/pyopencv_generated_include.h:1,
from /home/spu/opencv_3.0/modules/python/src2/cv2.cpp:12:
/home/spu/opencv_3.0/modules/cudev/include/opencv2/cudev/functional/detail/../../common.hpp:49:26: fatal error: cuda_runtime.h: No such file or directory
#include <cuda_runtime.h>
^
compilation terminated.


### Building current 3.0 dev branch Ubuntu 14.04

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:

First error gone, by applying literally every

There is also a now pending fix in for the mentioned pull request. Now error about not finding cuda_runtime.h

Building NVCC (Device) object modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_mog2.cu.o
In file included from /home/spu/opencv_3.0/modules/cudev/include/opencv2/cudev/functional/detail/color_cvt.hpp:49:0,
from /home/spu/opencv_3.0/modules/python/pyopencv_generated_include.h:1,
from /home/spu/opencv_3.0/modules/python/src2/cv2.cpp:12:
/home/spu/opencv_3.0/modules/cudev/include/opencv2/cudev/functional/detail/../../common.hpp:49:26: fatal error: cuda_runtime.h: No such file or directory
#include <cuda_runtime.h>
^
compilation terminated.

cudabgsm module here. Applying that fix also.

### Building current 3.0 dev branch Ubuntu 14.04

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

/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>


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

### Building current 3.0 dev branch Ubuntu 14.04

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

/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>


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...

### Building current 3.0 dev branch Ubuntu 14.04

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...

### Building current 3.0 dev branch Ubuntu 14.04

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?

### Building current 3.0 dev branch Ubuntu 14.04

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
`