tce-load -i compiletc cmake gtk3-dev gst-plugins-base-dev ffmpeg-dev python-numpy jasper-dev openexr-dev
cd opencv-3.3.0
mkdir build
cd build
sudo cp /tmp/tcloop/gcc_libs-dev/usr/local/lib/libgomp.spec /usr/lib
cmake -LAH -DCMAKE_C_FLAGS_RELEASE="-flto -fuse-linker-plugin -mtune=generic -Os -pipe" -DCMAKE_CXX_FLAGS_RELEASE="-flto -fuse-linker-plugin -mtune=generic -Os -pipe" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=release -DWITH_OPENMP=ON -DWITH_VA=ON -DWITH_OPENGL=ON -DWITH_OPENCL=ON -DCMAKE_VERBOSE_MAKEFILE=TRUE ../
There is no problem in case of custom OpenCL implementation is Khronos OpenCL 1.2 compatible (conformant). "Dynamic" OpenCL library loading is used by default.
To switch on your custom OpenCL run CMake (in the clean build dir) with these variables passed via command-line:
disable OpenCL auto detection: WITH_OPENCL=OFF
HAVE_OPENCL=ON
HAVE_OPENCL_STATIC=ON
OPENCL_LIBRARIES=/path/libOpenCL.so
OPENCL_INCLUDE_DIRS=/path/include
-- OpenCL:
-- Include path: /usr/local/include/CL
-- Link libraries: /usr/local/lib/libOpenCL.so
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
..but this fails looking in the wrong place for cl.h
[-fno-exceptions fails]
make -j5 [10m 34.06s]
sudo make install
-- General configuration for OpenCV 3.3.0 =====================================
-- Version control: unknown
--
-- Platform:
-- Timestamp: 2017-09-22T19:25:15Z
-- Host: Linux 4.8.17-tinycore64 x86_64
-- CMake: 3.8.0
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/local/bin/make
-- Configuration: release
--
-- CPU/HW features:
-- Baseline: SSE SSE2 SSE3
-- requested: SSE3
-- Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
-- requested: SSE4_1 SSE4_2 AVX FP16 AVX2
-- SSE4_1 (2 files): + SSSE3 SSE4_1
-- SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
-- FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
-- AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
-- AVX2 (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++11: YES
-- C++ Compiler: /usr/local/bin/c++ (ver 6.2.0)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -flto -fuse-linker-plugin -mtune=generic -Os -pipe -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/local/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fopenmp -flto -fuse-linker-plugin -mtune=generic -Os -pipe -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -msse -msse2 -msse3 -fvisibility=hidden -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- ccache: NO
-- Precompiled headers: YES
-- Extra dependencies: -lva -lva-drm gtk-3 gdk-3 pangocairo-1.0 pango-1.0 atk-1.0 cairo-gobject cairo gdk_pixbuf-2.0 gio-2.0 gthread-2.0 /usr/local/lib/libwebp.so /usr/local/lib/libpng.so /usr/lib/libz.so /usr/local/lib/libtiff.so /usr/local/lib/libjasper.so /usr/local/lib/libjpeg.so /usr/local/lib/libImath.so /usr/local/lib/libIlmImf.so /usr/local/lib/libIex.so /usr/local/lib/libHalf.so /usr/local/lib/libIlmThread.so gstbase-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 gstvideo-1.0 gstapp-1.0 gstriff-1.0 gstpbutils-1.0 avcodec avformat avutil swscale dl m pthread rt
-- 3rdparty dependencies:
--
-- OpenCV modules:
-- To be built: core flann imgproc ml objdetect photo video dnn imgcodecs shape videoio highgui superres ts features2d calib3d stitching videostab python2
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 viz
--
-- GUI:
-- QT: NO
-- GTK+ 3.x: YES (ver 3.22.11)
-- GThread : YES (ver 2.50.3)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: /usr/lib/libz.so (ver 1.2.8)
-- JPEG: /usr/local/lib/libjpeg.so (ver )
-- WEBP: /usr/local/lib/libwebp.so (ver encoder: 0x020e)
-- PNG: /usr/local/lib/libpng.so (ver 1.6.29)
-- TIFF: /usr/local/lib/libtiff.so (ver 42 - 4.0.3)
-- JPEG 2000: /usr/local/lib/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/local/lib/libImath.so /usr/local/lib/libIlmImf.so /usr/local/lib/libIex.so /usr/local/lib/libHalf.so /usr/local/lib/libIlmThread.so (ver 2.2.0)
-- GDAL: NO
-- GDCM: NO
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: YES
-- avcodec: YES (ver 56.60.100)
-- avformat: YES (ver 56.40.101)
-- avutil: YES (ver 54.31.100)
-- swscale: YES (ver 3.1.101)
-- avresample: NO
-- GStreamer:
-- base: YES (ver 1.8.3)
-- video: YES (ver 1.8.3)
-- app: YES (ver 1.8.3)
-- riff: YES (ver 1.8.3)
-- pbutils: YES (ver 1.8.3)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- OpenNI2: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- Aravis SDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: NO/YES
-- XIMEA: NO
-- Xine: NO
-- Intel Media SDK: NO
-- gPhoto2: NO
--
-- Parallel framework: OpenMP
--
-- Trace: YES (with Intel ITT)
--
-- Other third-party libraries:
-- Use Intel IPP: 2017.0.2 [2017.0.2]
-- at: /usr/src/opencv-3.3.0/build/3rdparty/ippicv/ippicv_lnx
-- Use Intel IPP IW: prebuilt binaries (2017.0.2)
-- Use Intel IPP Async: NO
-- Use VA: YES
-- Use Intel VA-API/OpenCL: NO
-- Use Lapack: NO
-- Use Eigen: NO
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use OpenVX: NO
-- Use custom HAL: NO
--
-- OpenCL:
-- Include path: /usr/src/opencv-3.3.0/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: /usr/local/bin/python2.7 (ver 2.7.12)
-- Libraries: /usr/local/lib/libpython2.7.so (ver 2.7.12)
-- numpy: /usr/local/lib/python2.7/site-packages/numpy/core/include (ver 1.10.1)
-- packages path: lib/python2.7/site-packages
--
-- Python 3:
-- Interpreter: NO
--
-- Python (for build): /usr/local/bin/python2.7
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab: Matlab not found or implicitly disabled
--
-- Documentation:
-- Doxygen: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
--
-- Install path: /usr/local
--
-- cvconfig.h is in: /usr/src/opencv-3.3.0/build
-- -----------------------------------------------------------------