GNOME Bugzilla – Bug 744034
fdsrc: MinGW Compilation error: unknown conversion type character 'l' in format
Last modified: 2015-02-12 14:56:42 UTC
Created attachment 296184 [details] [review] Patch I just tried to compile gstreamer core with MSYS2/MinGW (http://sourceforge.net/projects/msys2/) and got a build error in gstfdsrc.c This is essentially the same as what is described here: http://sourceforge.net/p/mingw/bugs/1315/ The Glib doc says that "that scanf() may not support 64-bit integers, even if G_GINT64_FORMAT is defined" and suggests "using g_ascii_strtoull() instead" https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#G-GUINT64-FORMAT:CAPS https://developer.gnome.org/glib/unstable/glib-String-Utility-Functions.html#g-ascii-strtoull I attach a patch with which I was able to build gstreamer core, but note that it is not tested yet.
fdsrc is disabled for __MINGW32__ in gstelements.c. If I enable it, the basic launch line given in the source seems to work, but I'm not yet familiar enough with GStreamer to test the uri query
(In reply to Frédéric Wang from comment #0) > I just tried to compile gstreamer core with MSYS2/MinGW Correction: I'm actually using mingw-w64 (a fork of mingw) but the issue with scanf still holds: https://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/
Thanks for the patch, I've pushed it to master with some small changes (kept string constants in code, which is nicer to read; fleshed out error handling a bit more; renamed endptr variable to end so the error handling fits all in one line :) commit d7dd0825747abbbda22e8466dd6ba78fa85c0dbe Author: Frédéric Wang <fred.wang@free.fr> Date: Thu Feb 12 14:50:15 2015 +0000 fdsrc: use g_ascii_strtoull() to convert size string in uri sscanf() doesn't handle G_GUINT64_FORMAT well on mingw64 it appears, leading to compiler warnings. https://bugzilla.gnome.org/show_bug.cgi?id=744034