failing build opencv and opencv_contrib on Jetson TX2

asked 2018-07-11 22:10:45 -0500

I'm trying to install OpenKAI on TX2, and install opencv like this : `git clone https://github.com/opencv/opencv.git

git clone https://github.com/opencv/opencv_cont...

cd ~/opencv

mkdir build

cd build

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..

make -j3

sudo make install`

But I failed 'make -j3' with output and error shown like this: Error log: 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/apsync/GitHub/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 -Wmissing-declarations -Wmissing-prototypes' ===== BUILD LOG ===== Change Dir: /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c9a06/fast" /usr/bin/make -f CMakeFiles/cmTC_c9a06.dir/build.make CMakeFiles/cmTC_c9a06.dir/build make[1]: Entering directory '/home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_c9a06.dir/src.cxx.o /usr/bin/c++ -O3 -DNDEBUG -fPIE -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -o CMakeFiles/cmTC_c9a06.dir/src.cxx.o -c /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp/src.cxx cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking CXX executable cmTC_c9a06 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c9a06.dir/link.txt --verbose=1 /usr/bin/c++ -O3 -DNDEBUG CMakeFiles/cmTC_c9a06.dir/src.cxx.o -o cmTC_c9a06 make[1]: Leaving directory '/home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed: Regex: 'command line option .* is valid for .* but not for C++' Output line: 'cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++' Compilation failed: source file: '/home/apsync/GitHub/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 -Wmissing-declarations -Wstrict-prototypes' ===== BUILD LOG ===== Change Dir: /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c1a26/fast" /usr/bin/make -f CMakeFiles/cmTC_c1a26.dir/build.make CMakeFiles/cmTC_c1a26.dir/build make[1]: Entering directory '/home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_c1a26.dir/src.cxx.o /usr/bin/c++ -O3 -DNDEBUG -fPIE -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wstrict-prototypes -o CMakeFiles/cmTC_c1a26.dir/src.cxx.o -c /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp/src.cxx cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ /home/apsync/GitHub/opencv/build/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma [-Wunknown-pragmas] #pragma ^ Linking CXX executable cmTC_c1a26 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c1a26.dir/link.txt --verbose=1 /usr/bin/c++ -O3 -DNDEBUG CMakeFiles/cmTC_c1a26.dir ... (more)

edit retag flag offensive close merge delete