Opencv_contrib: make error about INTER_LINEAR_EXACT

Created on 18 Dec 2017  Â·  8Comments  Â·  Source: opencv/opencv_contrib

/home/eason/Documents/opencv_contrib-master/modules/img_hash/src/block_mean_hash.cpp:42:75: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
cv::resize(input, resizeImg_, cv::Size(imgWidth,imgHeight), 0, 0, INTER_LINEAR_EXACT);
^~~~~~
make[2]: * [modules/img_hash/CMakeFiles/opencv_img_hash.dir/src/block_mean_hash.cpp.o] Error 1
make[1]:
[modules/img_hash/CMakeFiles/opencv_img_hash.dir/all] Error 2
make[1]: *
* Waiting for unfinished jobs....

I have this error during make.

duplicate invalid

Most helpful comment

cmake -DENABLE_PRECOMPILED_HEADERS=OFF ...

All 8 comments

Keep opencv/opencv_contrib code synchronized. Different versions may not work.

@alalek

Building with opencv-3.4.3 and opencv_contrib-3.4.3 (so matching versions) I am also getting the error posted above. Specifically:

...
[ 13%] Built target opencv_perf_core_pch_dephelp
[ 13%] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o
In file included from /home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts.hpp:706:0,
                 from /home/user/src/opencv-3.4.3/modules/core/test/test_precomp.hpp:7,
                 from /home/user/src/opencv-3.4.3/build/modules/core/opencv_test_core_pch_dephelp.cxx:1:

/home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts/ocl_test.hpp: In member function ‘void cvtest::ocl::{anonymous}::Interpolation::PrintTo(std::ostream*) const’:
/home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts/ocl_test.hpp:377:78: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
 CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA, INTER_LINEAR_EXACT)
                                                                              ^
/home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts/ts_perf.hpp:112:34: note: in definition of macro ‘CV_ENUM’
             const int vals[] = { __VA_ARGS__ };                                         \
                                  ^
/home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts/ocl_test.hpp: In static member function ‘static testing::internal::ParamGenerator<cvtest::ocl::{anonymous}::Interpolation> cvtest::ocl::{anonymous}::Interpolation::all()’:
/home/user/src/opencv-3.4.3/modules/ts/include/opencv2/ts/ocl_test.hpp:377:78: error: ‘INTER_LINEAR_EXACT’ was not declared in this scope
 CV_ENUM(Interpolation, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_AREA, INTER_LINEAR_EXACT)

Ubuntu 16.04
gcc 5.4.0

I am trying to build with CUDA support, but that doesn't seem to be related.

Any help/suggestions greatly appreciated!

pch_dephelp

Try to disable precompiled headers.

@alalek - Thanks for your response!

I am not experienced with compiling in terminal... Could you please tell
how best to disable precompiled headers?

On Fri, 12 Oct 2018, 00:18 Alexander Alekhin, notifications@github.com
wrote:

pch_dephelp

Try to disable precompiled headers.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/opencv/opencv_contrib/issues/1486#issuecomment-429138181,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMOhpZcTavfB0_uPm8729NpWauQGqh-kks5uj8OZgaJpZM4RFE1I
.

cmake -DENABLE_PRECOMPILED_HEADERS=OFF ...

@alalek Thank you, that did get me passed the problem. The previous error was found at 13% progress. This time I got to 28% complete before the next error.

Is there a guide anywhere with tips on compiling? Common mistakes and errors etc.?

Here is the new error:

collect2: error: ld returned 1 exit status
modules/viz/CMakeFiles/opencv_test_viz.dir/build.make:234: recipe for target 'bin/opencv_test_viz' failed
make[2]: *** [bin/opencv_test_viz] Error 1
CMakeFiles/Makefile2:4611: recipe for target 'modules/viz/CMakeFiles/opencv_test_viz.dir/all' failed
make[1]: *** [modules/viz/CMakeFiles/opencv_test_viz.dir/all] Error 2

I ran make -j8 so the message isn't perhaps as helpful as it could be.

Should I open a new issue?

There is OpenCV CI with complete logs for supported (more or less) configurations.

VTK CMake scripts has conflict with CUDA CMake scripts.
Workaround: cmake -DBUILD_opencv_viz=OFF ...

Use make VERBOSE=1 for receive more useful messages.

This is bug tracker. So posting these workarounds here are useless activity.
Build / usage questions should go to Users OpenCV Q/A forum: http://answers.opencv.org

@alalek - really appreciate your guidance, thank you!

Was this page helpful?
0 / 5 - 0 ratings