Has anyone else had this error? This is using ubuntu's packaged libopencv (version 2.4.9.1+dfsg-1.5ubuntu1) on Ubuntu 16.04:
$ sudo apt-get install -y libopencv-dev
$ cmake .. -DCOMPUTECPP_PACKAGE_ROOT_DIR=$HOME/ComputeCpp
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.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
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.2", minimum required is "3.2")
-- PYTHON_EXECUTABLE = /usr/bin/python3
-- Try C++11 flag = [-std=c++11]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Success
-- Found CXX11: -std=c++11
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "1.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- host compiler - gcc 5.4.0 (note pre 5.1 gcc ABI enabled)
-- ComputeCpp package - Found (/home/cec/ComputeCpp)
-- compute++ - Found (/home/cec/ComputeCpp)
-- computecpp_info - Found (/home/cec/ComputeCpp)
-- libComputeCpp.so - Found
-- ComputeCpp includes - Found (/home/cec/ComputeCpp)
-- Package version - CE 0.1.1
-- compute++ flags - -O2 -mllvm -inline-threshold=1000 -sycl -intelspirmetadata -emit-llvm
-- platform - your system can support ComputeCpp
-- /usr/bin/python3 cc-gen.py generated tests.
-- Found GTest: /usr/local/lib/libgtest.a
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cec/src/visioncpp/build
$ make
Scanning dependencies of target example_greyscale_integration_header
[ 1%] Building ComputeCpp integration header file /home/cec/src/visioncpp/build/greyscale.cpp.sycl
[ 1%] Built target example_greyscale_integration_header
Scanning dependencies of target example_greyscale
[ 2%] Building CXX object CMakeFiles/example_greyscale.dir/examples/greyscale.cpp.o
In file included from /home/cec/src/visioncpp/include/framework/evaluator/evaluator.hpp:295:0,
from /home/cec/src/visioncpp/include/framework/framework.hpp:42,
from /home/cec/src/visioncpp/include/visioncpp.hpp:38,
from /home/cec/src/visioncpp/examples/greyscale.cpp:31:
/home/cec/src/visioncpp/include/framework/evaluator/eval_assign/eval_assign.hpp: In instantiation of ‘static void visioncpp::internal::Evaluator<0ul, Output_Index, Offset, LC, LR, visioncpp::internal::Assign<LHS, RHS, Cols, Rows, LfType, LVL>, Loc, Params ...>::eval(Loc&, const visioncpp::internal::tools::tuple::Tuple<Params ...>&) [with long unsigned int Output_Index = 4ul; long unsigned int Offset = 2ul; long unsigned int LC = 8ul; long unsigned int LR = 8ul; LHS = visioncpp::internal::LeafNode<visioncpp::internal::PlaceHolder<2ul, 0ul, 640ul, 480ul, 0ul>, 0ul>; RHS = visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::PlaceHolder<2ul, 1ul, 640ul, 480ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>; long unsigned int Cols = 640ul; long unsigned int Rows = 480ul; long unsigned int LfType = 2ul; long unsigned int LVL = 4ul; Loc = visioncpp::internal::Coordinate<8ul, 8ul, cl::sycl::nd_item<2> >; Params = {cl::sycl::accessor<visioncpp::pixel::Storage<unsigned char, 1ul>, 2, (cl::sycl::access::mode)3u, (cl::sycl::access::target)1u>, cl::sycl::accessor<visioncpp::pixel::Storage<unsigned char, 3ul>, 2, (cl::sycl::access::mode)0u, (cl::sycl::access::target)1u>}]’:
/home/cec/src/visioncpp/include/framework/evaluator/evaluator.hpp:290:29: required from ‘void visioncpp::internal::eval(Loc&, const visioncpp::internal::tools::tuple::Tuple<Params ...>&) [with long unsigned int Offset = 2ul; long unsigned int LC = 8ul; long unsigned int LR = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::PlaceHolder<2ul, 0ul, 640ul, 480ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::PlaceHolder<2ul, 1ul, 640ul, 480ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; Loc = visioncpp::internal::Coordinate<8ul, 8ul, cl::sycl::nd_item<2> >; Params = {cl::sycl::accessor<visioncpp::pixel::Storage<unsigned char, 1ul>, 2, (cl::sycl::access::mode)3u, (cl::sycl::access::target)1u>, cl::sycl::accessor<visioncpp::pixel::Storage<unsigned char, 3ul>, 2, (cl::sycl::access::mode)0u, (cl::sycl::access::target)1u>}]’
/home/cec/src/visioncpp/include/framework/device/sycl/sycl_device.hpp:91:61: required from ‘visioncpp::internal::Device_<(visioncpp::backend)0, dv>::execute(Expr&) const::<lambda(cl::sycl::handler&)>::<lambda(cl::sycl::nd_item<typename Expr::Type:: Dim>)> [with long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int CGT = 640ul; long unsigned int RGT = 480ul; long unsigned int CLT = 8ul; long unsigned int RLT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; visioncpp::device dv = (visioncpp::device)0; typename Expr::Type = visioncpp::internal::VisionMemory<false, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>]’
/home/cec/src/visioncpp/include/framework/device/sycl/sycl_device.hpp:92:62: required from ‘struct visioncpp::internal::Device_<(visioncpp::backend)0, dv>::execute(Expr&) const::<lambda(cl::sycl::handler&)> [with long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int CGT = 640ul; long unsigned int RGT = 480ul; long unsigned int CLT = 8ul; long unsigned int RLT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; visioncpp::device dv = (visioncpp::device)0]::<lambda(class cl::sycl::nd_item<2>)>’
/home/cec/src/visioncpp/include/framework/device/sycl/sycl_device.hpp:80:7: required from ‘visioncpp::internal::Device_<(visioncpp::backend)0, dv>::execute(Expr&) const::<lambda(cl::sycl::handler&)> [with long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int CGT = 640ul; long unsigned int RGT = 480ul; long unsigned int CLT = 8ul; long unsigned int RLT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; visioncpp::device dv = (visioncpp::device)0]’
/home/cec/src/visioncpp/include/framework/device/sycl/sycl_device.hpp:68:59: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/home/cec/src/visioncpp/include/framework/executor/policy/fuse.hpp:62:5: required from ‘static void visioncpp::internal::FuseExpr<LC, LR, LCT, LRT, Expr, DeviceT>::fuse(Expr&, const DeviceT&) [with long unsigned int LCIn = 8ul; long unsigned int LRIn = 8ul; long unsigned int LCT = 8ul; long unsigned int LRT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; DeviceT = visioncpp::internal::Device_<(visioncpp::backend)0, (visioncpp::device)0>]’
/home/cec/src/visioncpp/include/framework/executor/policy/fuse.hpp:90:50: required from ‘void visioncpp::internal::fuse(Expr, const DeviceT&) [with long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int LCT = 8ul; long unsigned int LRT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; DeviceT = visioncpp::internal::Device_<(visioncpp::backend)0, (visioncpp::device)0>]’
/home/cec/src/visioncpp/include/framework/executor/executor.hpp:92:27: required from ‘static void visioncpp::internal::Executor<true, LC, LR, LCT, LRT, Expr, DeviceT>::execute(Expr, const DeviceT&) [with long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int LCT = 8ul; long unsigned int LRT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; DeviceT = visioncpp::internal::Device_<(visioncpp::backend)0, (visioncpp::device)0>]’
/home/cec/src/visioncpp/include/framework/executor/executor.hpp:134:67: required from ‘static void visioncpp::internal::SubExprExecute<false, ExecPolicy, LC, LR, LCT, LRT, Expr, DeviceT>::execute(Expr&, const DeviceT&) [with bool ExecPolicy = true; long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int LCT = 8ul; long unsigned int LRT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; DeviceT = visioncpp::internal::Device_<(visioncpp::backend)0, (visioncpp::device)0>]’
/home/cec/src/visioncpp/include/framework/executor/executor.hpp:157:65: required from ‘void visioncpp::execute(Expr&, const DeviceT&) [with bool ExecPolicy = true; long unsigned int LC = 8ul; long unsigned int LR = 8ul; long unsigned int LCT = 8ul; long unsigned int LRT = 8ul; Expr = visioncpp::internal::Assign<visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 1ul>, 1ul, 0ul, 0ul>, 0ul>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_GREYToCVBGR, float>, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_RGBToGREY, visioncpp::pixel::Storage<float, 3ul> >, visioncpp::internal::RUnOP<visioncpp::internal::PixelUnaryOp<visioncpp::OP_CVBGRToRGB, visioncpp::pixel::Storage<unsigned char, 3ul> >, visioncpp::internal::LeafNode<visioncpp::internal::VisionMemory<true, 1ul, 2ul, unsigned char, 640ul, 480ul, visioncpp::pixel::Storage<unsigned char, 3ul>, 3ul, 0ul, 0ul>, 0ul>, 640ul, 480ul, 2ul, 1ul>, 640ul, 480ul, 2ul, 2ul>, 640ul, 480ul, 2ul, 3ul>, 640ul, 480ul, 2ul, 4ul>; DeviceT = visioncpp::internal::Device_<(visioncpp::backend)0, (visioncpp::device)0>]’
/home/cec/src/visioncpp/examples/greyscale.cpp:102:70: required from here
/home/cec/src/visioncpp/include/framework/evaluator/eval_assign/eval_assign.hpp:77:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < LC; i += cOffset.cLRng)
^
/home/cec/src/visioncpp/include/framework/evaluator/eval_assign/eval_assign.hpp:79:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < LR; j += cOffset.rLRng)
^
[ 3%] Linking CXX executable bin/example/example_greyscale
CMakeFiles/example_greyscale.dir/examples/greyscale.cpp.o: In function `main':
greyscale.cpp:(.text.startup+0x95): undefined reference to `cv::VideoCapture::open(std::string const&)'
greyscale.cpp:(.text.startup+0x149a): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
greyscale.cpp:(.text.startup+0x14f0): undefined reference to `cv::imshow(std::string const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/example_greyscale.dir/build.make:126: recipe for target 'bin/example/example_greyscale' failed
make[2]: *** [bin/example/example_greyscale] Error 1
CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/example_greyscale.dir/all' failed
make[1]: *** [CMakeFiles/example_greyscale.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2