After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747711 - opencv: make cascades relocatable on win32
opencv: make cascades relocatable on win32
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-11 19:18 UTC by LRN
Modified: 2018-11-03 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
W32: Make OpenCV cascades relocatable (4.95 KB, patch)
2015-04-11 19:18 UTC, LRN
none Details | Review

Description LRN 2015-04-11 19:18:17 UTC
Default cascade paths are hardcoded as:

OPENCV_PREFIX + PATH_TO_CASCADE

where OPENCV_PREFIX is obtained by pkg-conifg from opencv.pc

First problem is that w32 pkg-config by default gets a DOS version
of OPENCV_PREFIX, so the resulting cascade path is:
A) Absolute
B) DOS

This can be fixed by passing --dont-define-prefix to pkg-config
(a trick well-known to anyone who builds anything with MinGW/MSYS),
which makes it output prefix that starts with '/' (usually '/mingw').

So now cascade path is:
A) Absolute
B) POSIX

Which fixes nothing, since Windows does not understand POSIX paths.

However, in this case some code and path wizardry can fix the situation
(see the patch attached).
Comment 1 LRN 2015-04-11 19:18:22 UTC
Created attachment 301379 [details] [review]
W32: Make OpenCV cascades relocatable

Check the profile file path. If it starts with '/', compare its
betinning to the configure-time OpenCV prefix and, if they match,
replace ith with the runtime OpenCV prefix.

This code assumes that OPENCV_PREFIX is in non-mangled form
(i.e. "/mingw", not "c:\\somewhere\\mingw"). The easiest way to
accomplish this is to change configure.ac to give --dont-define-prefix
option to pkg-config when it tries to find opencv prefix. However,
that change is distribution-specific and not included in this commit.
Comment 2 Nirbheek Chauhan 2016-12-31 20:09:16 UTC
I think we should do this on the Autoconf side since for instance, this is not needed when building with the Meson build system at all since it invokes pkg-config directly instead of through the shell. That makes all the paths be Windows-native ("C:\\blah\\foo\\prefix").

I'll look into this.
Comment 3 GStreamer system administrator 2018-11-03 13:34:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/239.