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 774638 - gst-devtools: Enable building with MSVC
gst-devtools: Enable building with MSVC
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Windows
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-17 19:07 UTC by Scott D Phillips
Modified: 2016-11-19 10:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH gst-devtools 1/5] Pass gint/guint pointers instead of enum pointers (2.40 KB, patch)
2016-11-17 19:08 UTC, Scott D Phillips
committed Details | Review
[PATCH gst-devtools 2/5] Fix MSVC const warnings (1.54 KB, patch)
2016-11-17 19:09 UTC, Scott D Phillips
committed Details | Review
[PATCH gst-devtools 3/5] validate: Remove #include <unistd.h> (834 bytes, patch)
2016-11-17 19:09 UTC, Scott D Phillips
committed Details | Review
[PATCH gst-devtools 4/5] pad-monitor: fix return type of get_range_func (1.23 KB, patch)
2016-11-17 19:09 UTC, Scott D Phillips
committed Details | Review
[PATCH gst-devtools 5/5] Enable building with MSVC (7.31 KB, patch)
2016-11-17 19:10 UTC, Scott D Phillips
committed Details | Review
[PATCH gst-devtools 6/6] validate: make: include common/win32.mak (13.44 KB, patch)
2016-11-18 18:34 UTC, Scott D Phillips
committed Details | Review

Description Scott D Phillips 2016-11-17 19:07:45 UTC
I don't promise everything is functioning properly with these patches, but at least it builds.
Comment 1 Scott D Phillips 2016-11-17 19:08:49 UTC
Created attachment 340171 [details] [review]
[PATCH gst-devtools 1/5] Pass gint/guint pointers instead of enum pointers
Comment 2 Scott D Phillips 2016-11-17 19:09:08 UTC
Created attachment 340172 [details] [review]
[PATCH gst-devtools 2/5] Fix MSVC const warnings
Comment 3 Scott D Phillips 2016-11-17 19:09:29 UTC
Created attachment 340173 [details] [review]
[PATCH gst-devtools 3/5] validate: Remove #include <unistd.h>
Comment 4 Scott D Phillips 2016-11-17 19:09:50 UTC
Created attachment 340174 [details] [review]
[PATCH gst-devtools 4/5] pad-monitor: fix return type of get_range_func
Comment 5 Scott D Phillips 2016-11-17 19:10:09 UTC
Created attachment 340175 [details] [review]
[PATCH gst-devtools 5/5] Enable building with MSVC
Comment 6 Thibault Saunier 2016-11-17 20:09:45 UTC
Review of attachment 340171 [details] [review]:

OK
Comment 7 Thibault Saunier 2016-11-17 20:34:20 UTC
Review of attachment 340172 [details] [review]:

::: validate/tools/gst-validate-transcoding.c
@@ -798,2 +798,2 @@
   GError *err = NULL;
-  const gchar *scenario = NULL, *configs = NULL;
+  gchar *scenario = NULL, *configs = NULL;

Not sure why gcc/clang accept that though.
Comment 8 Thibault Saunier 2016-11-17 20:34:45 UTC
Review of attachment 340173 [details] [review]:

OK
Comment 9 Thibault Saunier 2016-11-17 20:35:31 UTC
Review of attachment 340174 [details] [review]:

OK
Comment 10 Thibault Saunier 2016-11-17 20:40:16 UTC
commit 9b18bafc68753a8f5277954642ea8623d8852236
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Thu Nov 17 10:00:25 2016 -0800

    Enable building with MSVC
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638

commit 11c5a413ab0afdea16d73bf27181994fdd4a67ef
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Thu Nov 17 10:28:01 2016 -0800

    pad-monitor: fix return type of get_range_func
    
    The return type of GstPadGetRangeFunction is GstFlowReturn
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638

commit caafd6c36eab5c862810d8552ec371b2080cadef
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Thu Nov 17 10:25:37 2016 -0800

    validate: Remove #include <unistd.h>
    
    It isn't needed and isn't present in non-posix environments like windows
    with MSVC or mingw.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638

commit 6299e1228cdf248ecfe3459b5ae095f3743a8448
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Thu Nov 17 10:24:08 2016 -0800

    Fix MSVC const warnings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638

commit 4e45b76c09259b59ecab72d40407372b2931d204
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Thu Nov 17 10:19:22 2016 -0800

    Pass gint/guint pointers instead of enum pointers
    
    The underlying integer type for enums are implementation defined and may
    not be the same size as gint/guint. So implicitly casting from pointers-
    to-enum-types to pointers-to-int-types is unsafe. MSVC warns on these.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638
Comment 11 Sebastian Dröge (slomo) 2016-11-18 15:55:47 UTC
The .def file should get the "update-exports" / "check-exports" magic we have in core/base, to prevent forgetting to update them.
Comment 12 Scott D Phillips 2016-11-18 18:34:56 UTC
Created attachment 340259 [details] [review]
[PATCH gst-devtools 6/6] validate: make: include common/win32.mak
Comment 13 Sebastian Dröge (slomo) 2016-11-19 09:54:45 UTC
commit 665a2e732bb61db48012da7024024dd8bda9e5d3
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Fri Nov 18 10:06:14 2016 -0800

    validate: make: include common/win32.mak
    
    With the addition of the .def file for validate we need to make
    sure the check-export script from common gets executed so that the
    .def stays up to date.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638
Comment 14 Sebastian Dröge (slomo) 2016-11-19 10:32:38 UTC
This breaks the meson build here https://ci.gstreamer.net/job/GStreamer-master-meson/474/console:

Build targets in project: 689
ninja: error: '/var/lib/jenkins/workspace/GStreamer-master-meson/subprojects/gst-devtools/win32/common/libgstvalidate.def', needed by 'subprojects/gst-devtools/validate/gst/validate/libgstvalidate-1.0.so.0.1100.0', missing and no known rule to make it
+ rm -Rf /tmp/tmp.c5iw54Xaj7
+ GST_CHECK_XML=1
+ ninja -C build/ test
ninja: Entering directory `build/'
ninja: error: '/var/lib/jenkins/workspace/GStreamer-master-meson/subprojects/gst-devtools/win32/common/libgstvalidate.def', needed by 'subprojects/gst-devtools/validate/gst/validate/libgstvalidate-1.0.so.0.1100.0', missing and no known rule to make it
Comment 15 Sebastian Dröge (slomo) 2016-11-19 10:37:40 UTC
commit b46e80080f91b0450517d354d90ea8d814724f58
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Sat Nov 19 12:36:32 2016 +0200

    meson: Move vs_module_defs_dir to the validate subdirectory
    
    It's validate/win32/ and not just win32/
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774638