unable to cross-compile for arm "Problem encountered: Unable to detect OpenCV data directory"
Hello. I'm tryin to cross-compile gstreamer with plugins for arm through gst-build. But gst-plugins-bad was excepted.
I've installed dev packages on my arm sysroot:
libopencv-dev is already the newest version (3.2.0+dfsg-6).
python3-opencv is already the newest version (3.2.0+dfsg-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
There are two existing directories on my target sysroot:
/home/user/sysroot/usr/share/OpenCV/...
/home/user/sysroot/usr/share/opencv/...
Also I've passed "prefix" to build-comamnd:
meson --cross-file ../../meson_cc.ini --prefix=/usr ..
Here is updated cc-file:
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'arm'
endian = 'little'
[build_machine]
system = 'linux'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[binaries]
c = 'arm-linux-gnueabihf-gcc'
cpp = 'arm-linux-gnueabihf-g++'
ar = 'arm-linux-gnueabihf-ar'
strip = 'arm-linux-gnueabihf-strip'
pkgconfig = 'pkg-config'
[properties]
root = '/home/user/sysroot/'
sys_root = '/home/user/sysroot/'
pkg_config_libdir = '/home/user/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig/'
c_args = ['--sysroot', '/home/user/sysroot/sysroot/']
cpp_args = ['--sysroot', '/home/user/sysroot/sysroot/']
But I've got this:
gst-plugins-bad: NO Problem encountered: Unable to detect OpenCV data directory
https://github.com/GStreamer/gst-plugins-bad/blob/master/ext/opencv/meson.build#L98
Seems like path to root of target ARM-system was ignored by code:
...
opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix')
...
r = run_command('test', '-d', opencv_prefix + '/share/opencv')
...
r = run_command('test', '-d', opencv_prefix + '/share/OpenCV')
...
- https://github.com/GStreamer/gst-plugins-bad/blob/master/ext/opencv/meson.build#L81
- https://github.com/GStreamer/gst-plugins-bad/blob/master/ext/opencv/meson.build#L86
- https://github.com/GStreamer/gst-plugins-bad/blob/master/ext/opencv/meson.build#L90
Do you have any ideas? Maybe something wrong with settings of python?
Thanks!