Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 973
    • Issues 973
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 103
    • Merge requests 103
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #1294
Closed
Open
Issue created May 21, 2020 by r3d 9u11@r3d9u11

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!

Edited May 21, 2020 by r3d 9u11
Assignee
Assign to
Time tracking