-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCV 3 build update and other minor fixes #1261
Conversation
@@ -331,6 +330,7 @@ NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) | |||
MATLAB_CXXFLAGS := $(CXXFLAGS) -Wno-uninitialized | |||
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) | |||
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) \ | |||
-Wl,--start-group `pkg-config opencv --libs` -Wl,--end-group \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang doesn't do --start-group
and --end-group
so linking this way breaks OS X.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok this looks good, but needs a rebase for clean merge. Thanks @kmatzen! |
…nclude glog at some point. Including caffe/common.hpp. (2) I often misconfigure some layer and softmax breaks when the dimensionality is too small for the input layers. Check and fail fast. (3) CV_LOAD_IMAGE_COLOR is deprecated and has been removed in OpenCV 3.0. Replaced with cv::IMREAD_COLOR.
It is not good to select all of them. This not work for installation that not have all modules compiled. |
@bhack, When you build OpenCV, it autogenerates opencv.pc for pkg-config and OpenCVConfig.cmake for cmake to match the subset of modules that you decided to build. So if you choose not to build a module, then it will not appear in these files, and when you try to import all modules, only the built modules will be included. |
[fix] build with OpenCV 3 and other minor fixes
@kmatzen I need to check this again because probably there is some issue in opencv master branch with the behaviour you have described on some modules. |
Did this pass the CI? The tests can't be built with OpenCV 2.7. |
2.4.9. |
[fix] build with OpenCV 3 and other minor fixes
Changes are pretty similar to #1247 except I just omit the OpenCV module names from the CMakeLists.txt so that it selects all of them and I also use the opencv2/opencv.hpp header rather than each individual module header so that I don't have to test whether or not to include the imgcodecs.hpp header.
This change also adds a test in the softmax loss layer to check for a dimensionality mismatch and includes a header in cudnn.hpp to make sure glog is available.