Ask Your Question

timur's profile - activity

2020-03-31 09:09:24 -0600 received badge  Popular Question (source)
2018-04-19 10:30:08 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

Some of the cmake switches pointing to TBB were missing: DTBB_ENV_INCLUDE=/usr/include -DTBB_ENV_LIB=/usr/lib/x86_64-li

2018-04-19 09:41:53 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

Thanks a lot for you help, greatly appreciated :)

2018-04-19 08:37:14 -0600 marked best answer OpenCV 3.x does not compile for Ubuntu 16

We have tried to compile OpenCV 3.4 on Ubuntu but with no success.

The compilation fails on cmake. We keep fixing the errors, but it just keeps throwing up more and more errors. We have made sure we have installed the dependencies required.

Can someone please provide a place we can get a compiling version of OpenCV 3.x for Ubuntu?

Out cmake options:

---------------------------------
ubuntu@machine:~/app/opencv/build$ cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=ON -D WITH_OPENCL=OFF -D WITH_IPP=OFF -D WITH_TBB=ON -D BUILD_TBB=ON -D WITH_EIGEN=OFF -D WITH_V4L=OFF -D WITH_VTK=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D WITH_FFMPEG=ON -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib/modules ..
---------------------------------

There are lots of errors and when we fix one, it throws another after another.... a bottomless well of errors.

Can someone please provide us with a compiled version?

Thanks in advance.

Tim & team

ADDED: Compilation errors

(1) I get compilation switch errors for

‘-Wmissing-prototypes’   
‘-Wstrict-prototypes’ .  




--------------------------
Build output check failed: Regex: 'command line option .* is valid for .* but not for C++' Output line: 'cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++' Compilation failed: source file: '/home/ubuntu/app/opencv/build/CMakeFiles/CMakeTmp/src.cxx'

check option: ' -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -W
 gravatar imagetimur (51 mins ago)edit
-----------------------------------

(2) Also errors:

"valid for C++/ObjC++ but not for C"
for switches    
‘-Wsign-promo’ 
‘-Wsuggest-override’ 
‘-Wno-delete-non-virtual-dtor’ 
‘-fvisibility-inlines-hidden’

(3) Also errors:

 'cc1plus: warning: unrecognized command line option  
for  
‘-Wno-unnamed-type-template-args’'     
‘-Wno-implicit-fallthrough’  
‘-Wno-unused-private-field’  
‘-Wno-tautological-undefined-compare’  
‘-Wno-shorten-64-to-32’  
‘-Wno-enum-compare-switch’  
‘-Wno-inconsistent-missing-override’   
‘-Wno-unused-private-field’

(4) Also "not recognising INT8, INT16, INT32 "error which arises from 3rd party module 3rdparty/libtiff/CMakeLists.txt (line 166)

#Nonstandard int types  
if(NOT MSVC)  
  check_type_size(INT8 int8)  
  set(HAVE_INT8 ${INT8})    
  check_type_size(INT16 int16)  
  set(HAVE_INT16 ${INT16})  
  check_type_size(INT32 int32)  
  set(HAVE_INT32 ${INT32})  
endif()

--------------------- Error -------------------------------------------

Determining size of INT8 failed with the following output:  
Change Dir: /home/ubuntu/app/opencv/build/CMakeFiles/CMakeTmp  

Run Build Command:"/usr/bin/make" "cmTC_ef0b7/fast"  
/usr/bin/make -f CMakeFiles/cmTC_ef0b7.dir/build.make CMakeFiles/cmTC_ef0b7.dir/build  
make[1]: Entering directory '/home/ubuntu/app/opencv/build/CMakeFiles/CMakeTmp'  
Building C object CMakeFiles/cmTC_ef0b7.dir/int8.c.o  
/usr/bin/cc    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address - 
Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden  -O3 -DNDEBUG -fPIE   -o CMakeFiles/cmTC_ef0b7.dir/int8.c.o   -c /home/ubuntu/app/opencv/build/CMakeFiles/CheckTypeSize/int8.c  
/home/ubuntu/app/opencv/build/CMakeFiles/CheckTypeSize/int8.c:17:22: error: ‘INT8’ undeclared here (not in a function)  
 #define SIZE (sizeof(INT8))

CMAKE OUTPUT


ubuntu@ip-172-31-19-76:~/app/opencv/build cd ..;rm -rf build; mkdir build; cd build/ubuntu@ip-172-31-19-76:~/app/opencv/build cmake -D BUILD_TIFF=ON -D WITH_CUDA=OFF -D ENABLE_AVX=OFF -D WITH_OPENGL=ON -D WITH_OPENCL=OFF -D WITH_IPP ...
(more)
2018-04-19 08:32:14 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Okay, managed to get it working now. it was one of the dependencies that I was missing.

2018-04-19 08:19:04 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Thanks. I'll take a look at this now.

2018-04-19 07:18:28 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

The issues are clearly outlined in this log file also. I have summarised them at the top of my post. I have got rid of

2018-04-19 06:48:08 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Hi @berak, I have added the 'cmake' output to the end of my post. Very difficult to format very long text. Unfortunatel

2018-04-19 06:42:19 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Hi @berak, I have added the 'cmake' output to the end of my post. Very difficult to format very long text.

2018-04-19 06:41:21 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:35:25 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:29:08 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:26:04 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:16:28 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:15:05 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 06:14:13 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 05:54:23 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Hi @StevenPuttmans, I have upgraded the gcc/g++ compilers to version 6.3.0 20170519 and am now compiling with the "g++

2018-04-19 05:36:27 -0600 commented question OpenCV 3.x does not compile for Ubuntu 16

Hi @berak, I have added a detailed summary of the cmake errors on the original question above.

2018-04-19 05:34:59 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 05:29:59 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 05:27:29 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 05:26:41 -0600 received badge  Editor (source)
2018-04-19 05:26:41 -0600 edited question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil

2018-04-19 05:11:22 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

I have done both: (1) Upgraded gcc/g++ to gcc/g++ version 6.3.0, and compiled with "-std=c++11" flag (2) checked out '3

2018-04-19 05:10:37 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

Also: "valid for C++/ObjC++ but not for C" errors for ‘-Wsign-promo’ ‘-Wsuggest-override’ ‘-Wno-delete-non-virtual-d

2018-04-19 05:10:10 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

Also errors: 'cc1plus: warning: unrecognized command line option for ‘-Wno-unnamed-type-template-args’' ‘-Wno-unnamed-

2018-04-19 05:07:26 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

Also: "valid for C++/ObjC++ but not for C" errors for ‘-Wsign-promo’ ‘-Wsuggest-override’ ‘-Wno-delete-non-virtual-d

2018-04-19 05:04:33 -0600 commented answer OpenCV 3.x does not compile for Ubuntu 16

I have done both: (1) Upgraded gcc/g++ to gcc/g++ version 6.3.0, and compiled with "-std=c++11" flag (2) checked out '3

2018-04-18 09:22:40 -0600 asked a question OpenCV 3.x does not compile for Ubuntu 16

OpenCV 3.x does not compile for Ubuntu 16 We have tried to compile OpenCV 3.4 on Ubuntu but with no success. The compil