Skip to content
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

Compile error for ximgproc module (was #95) #103

Open
aurotripathy opened this issue Mar 17, 2016 · 9 comments
Open

Compile error for ximgproc module (was #95) #103

aurotripathy opened this issue Mar 17, 2016 · 9 comments
Labels

Comments

@aurotripathy
Copy link

Hi All,
Sorry to reopen this. It was #95 (which was closed).
I've read the comments (in #95) carefully but have not been successful with "luarocks install cv" yet.
Environment is Mac OS, 10.11.1 (El Capitan).
My steps,

brew update
brew reinstall opencv3 --with-contrib #took a while
  ---rebuilt torch but not dependencies---
OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0_1/share/OpenCV luarocks install cv

Same build error as #95

[ 91%] Building CXX object CMakeFiles/ximgproc.dir/src/ximgproc.cpp.o
In file included from /tmp/luarocks_cv-scm-1-2367/torch-opencv/src/ximgproc.cpp:1:
/tmp/luarocks_cv-scm-1-2367/torch-opencv/include/ximgproc.hpp:49:12: error: no type named 'SelectiveSearchSegmentationStrategy' in namespace 'cv::ximgproc::segmentation'; did you mean
      'SelectiveSearchSegmentationStrategyPtr'?
    inline cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategy * operator->() { return static_cast<cv::ximgproc::segmentation::SelectiveSearchSegmentationStrategy *>(ptr); }
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           SelectiveSearchSegmentationStrategyPtr
/tmp/luarocks_cv-scm-1-2367/torch-opencv/include/ximgproc.hpp:46:8: note: 'SelectiveSearchSegmentationStrategyPtr' declared here
struct SelectiveSearchSegmentationStrategyPtr {
       ^
/tmp/luarocks_cv-scm-1-2367/torch-opencv/include/ximgproc.hpp:50:12: error: no type named 'SelectiveSearchSegmentationStrategy' in namespace 'cv::ximgproc::segmentation'; did you mean
      'SelectiveSearchSegmentationStrategyPtr'?

@shrubb
Copy link
Contributor

shrubb commented Mar 21, 2016

Hi, and sorry for late answer. Thanks for reporting.

This has become a common problem for OS X users, I've finally found out that Homebrew installs a version of contrib from Dec 18, 2015, while that SelectiveSearchSegmentationStrategy is from 2016. I'll now disable the bindings for it, then please try OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0_1/share/OpenCV luarocks install cv again.

shrubb added a commit that referenced this issue Mar 21, 2016
@shrubb
Copy link
Contributor

shrubb commented Mar 21, 2016

To do:

Check at compile time that

CV_VERSION_MAJOR == 3 && CV_VERSION_MINOR >= 1 && strequal(CV_VERSION_STATUS, "-dev")

(I don't yet know how to compare strings at that point), and insert such new features if and only if the above is true.

@shrubb
Copy link
Contributor

shrubb commented Mar 23, 2016

@aurotripathy
Does it compile now?

@aurotripathy
Copy link
Author

@shrubb, Thank you for taking a look and trying to resolve this.
Here's what I did.

rm -rf torch-opencv
git clone https://github.com/VisionLabs/torch-opencv.git
source ~/.profile
OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0_1/share/OpenCV luarocks install cv

Same error.

If I remove ximgproc from the makery (from CMakeLists.txt, as someone else had suggested), the build is good.

Do I have to start form the top and reinstall opencv3?
(i,e., do this step as well, brew reinstall opencv3 --with-contrib )

shrubb added a commit that referenced this issue Mar 25, 2016
@shrubb
Copy link
Contributor

shrubb commented Mar 25, 2016

@aurotripathy
Oh, I forgot a couple of lines in that fix... I'm very sorry to have no OS X PC to test on.
It should (hopefully...) work now.

@aurotripathy
Copy link
Author

Thanks. I see your handicap (no OS X).
Same error.
I repeated the step I did before.

rm -rf torch-opencv
git clone https://github.com/VisionLabs/torch-opencv.git
source ~/.profile
OpenCV_DIR=/usr/local/Cellar/opencv3/3.1.0_1/share/OpenCV luarocks install cv

shrubb added a commit that referenced this issue Mar 25, 2016
@shrubb
Copy link
Contributor

shrubb commented Mar 25, 2016

@aurotripathy
OK, so if that doesn't work after the above commit, I should probably consider quitting programming...

@aurotripathy
Copy link
Author

Don't quit yet. Looks like all you need is a OS X platform.
I installed the latest opencv3, version 3.1.0_2.
The error is the same as above.
I have a workaround. I'm not blocked.

@shrubb
Copy link
Contributor

shrubb commented Mar 25, 2016

:(
Sorry again. I'll test it again as soon as I find an OS X PC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants