D-Alex / ropencv

ffi ruby wrapper for opencv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in installing ropencv gem

ssahu opened this issue · comments

gem install ropencv
Building native extensions. This could take a while...
ERROR: Error installing ropencv:
ERROR: Failed to build gem native extension.

/Users/sarthak/.rbenv/versions/2.1.2/bin/ruby extconf.rb

-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28")
-- checking for module 'opencv'
-- found opencv, version 2.4.8.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext

make "DESTDIR=" clean

make "DESTDIR="
[ 25%] Generating types.cc, operations.cc, conversions.cc
Rbind: A const with the name cv::Mat::MAGIC_VAL already exists
Rbind: A const with the name cv::Mat::AUTO_STEP already exists
Rbind: A const with the name cv::Mat::CONTINUOUS_FLAG already exists
Rbind: A const with the name cv::Mat::SUBMATRIX_FLAG already exists
Rbind: A const with the name CV_ITERATIVE already exists
Rbind: A const with the name CV_EPNP already exists
Rbind: A const with the name CV_P3P already exists
Rbind: A const with the name CV_WND_PROP_FULLSCREEN already exists
Rbind: A const with the name CV_WND_PROP_AUTOSIZE already exists
Rbind: A const with the name CV_WND_PROP_OPENGL already exists
Rbind: A const with the name CV_WINDOW_NORMAL already exists
Rbind: A const with the name CV_WINDOW_AUTOSIZE already exists
Rbind: A const with the name CV_WINDOW_OPENGL already exists
Rbind: A const with the name CV_WINDOW_FULLSCREEN already exists
Rbind: A const with the name CV_WINDOW_FREERATIO already exists
Rbind: A const with the name CV_WINDOW_KEEPRATIO already exists
Scanning dependencies of target rbind_opencv
[ 50%] Building CXX object src/CMakeFiles/rbind_opencv.dir/types.cc.o
[ 75%] Building CXX object src/CMakeFiles/rbind_opencv.dir/operations.cc.o
[100%] Building CXX object src/CMakeFiles/rbind_opencv.dir/conversions.cc.o
Linking CXX shared library librbind_opencv.dylib
[100%] Built target rbind_opencv

make "DESTDIR=" install
[100%] Built target rbind_opencv
Install the project...
-- Install configuration: ""
-- Installing: /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext/src/../../lib/librbind_opencv.dylib
-- Installing: /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext/src/../../include/types.h
-- Installing: /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext/src/../../include/operations.h
-- Installing: /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext/src/../../include/conversions.hpp
CMake Error at src/cmake_install.cmake:76 (FILE):
file INSTALL cannot find
"/Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18/ext/src/extern.rbind".
Call Stack (most recent call first):
cmake_install.cmake:32 (INCLUDE)

make: *** [install] Error 1

make install failed, exit code 2

Gem files will remain installed in /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/ropencv-0.0.18 for inspection.
Results logged to /Users/sarthak/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-14/2.1.0-static/ropencv-0.0.18/gem_make.out

I have tried opencv 2.4.8.2, 2.4.7.1, 2.4.9 and it fails for all of them. Also I was on cmake 3.1.3, but moved to cmake 2.8.12.2 - still the same issue. Any idea how to resolve it?

I recently updated rbind & ropencv and there was a small period of time where rbind was not compatible to ropencv. Therefore, can you try to install it again and report if you still encountering problems (which OS are you running?).

you are right, it works now! thanks a lot.