archit120 / JuliaOpenCVBindingTest

A simple example of Julia and OpenCV binding using CxxWrap.jl
1 stars 0 forks source link

Building #1

Closed timholy closed 4 years ago

timholy commented 4 years ago

I'm giving this package a spin. Here's what I did:

but I got these errors:

tim@diva:/tmp/OpenCV/JuliaOpenCVBindingTest$ cmake -DCMAKE_PREFIX_PATH={CxxWrap Prefix Path} .
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:7 (find_package):
  By not providing "FindJlCxx.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "JlCxx", but
  CMake did not find one.

  Could not find a package configuration file provided by "JlCxx" with any of
  the following names:

    JlCxxConfig.cmake
    jlcxx-config.cmake

  Add the installation prefix of "JlCxx" to CMAKE_PREFIX_PATH or set
  "JlCxx_DIR" to a directory containing one of the above files.  If "JlCxx"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Warning (dev) at CMakeLists.txt:8 (get_target_property):
  Policy CMP0045 is not set: Error on non-existent target in
  get_target_property.  Run "cmake --help-policy CMP0045" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  get_target_property() called with non-existent target
  "JlCxx::cxxwrap_julia".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found JlCxx at 
CMake Error at CMakeLists.txt:16 (FIND_PACKAGE):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/tmp/OpenCV/JuliaOpenCVBindingTest/CMakeFiles/CMakeOutput.log".

I assume there's some additional configuration I need to do?

In the long run we'll need to get this working under BinaryBuilder and distributed using the artifact system.

archit120 commented 4 years ago

Setting this up right now is a little complicated.

First you need to clone and build https://github.com/JuliaInterop/libcxxwrap-julia Then add libcxxwrap_julia jll: https://github.com/barche/libcxxwrap_julia_jll.jl.git and set up an override file in ~/.julia/artifacts/Overrides.toml to point to your own libcxxwrap-julia build directory.

[3eaa8342-bff7-56a5-9981-c04077f7cee7]
libcxxwrap_julia = "/home/bjanssens/src/build/libcxxwrap-julia"

Then add the latest version of CxxWrap from master. Finally while building configure it as cmake -DCMAKE_PREFIX_PATH=libcxxwrap-julia build directory .

This is a bit over complicated for now but was needed to be on the latest version of CxxWrap. I added some feature that required changing to the latest version and didn't change the README

timholy commented 4 years ago

Thanks! Backing up, now I'm stuck on https://github.com/JuliaInterop/libcxxwrap-julia/issues/45

archit120 commented 4 years ago

Closing as this is a dependency issue.