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 361720 - grammar project: error generating gstmarshal.c and gstmarshal.h
grammar project: error generating gstmarshal.c and gstmarshal.h
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
Other Windows
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2006-10-12 15:05 UTC by Marcus Granado
Modified: 2006-10-15 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---

updated msvsc8 grammar project (6.70 KB, text/plain)
2006-10-14 22:33 UTC, Marcus Granado

Description Marcus Granado 2006-10-12 15:05:02 UTC
At least when using MSVC 8 to compile gstreamer 0.10.10: (i'm not sure if something along this lines happens in the unix environment)

1. if glib-genmarshal.exe is not available in the %path%, the GRAMMAR project incorrectly generates gstmarshal.c and gstmarshal.h, containing a handful of bogus lines. 

2. After that, even if glib-gemarshal.exe is now available in the %path%,
both gstmarshal.c and gstmarshal.h MUST be MANUALLY deleted for the GRAMMAR project be able to update their contents. If they are not manually deleted, the GRAMMAR project will not update their bogus contents and therefore gstreamer will not be compiled successfully.
Comment 1 Tim-Philipp Müller 2006-10-13 16:10:09 UTC
Any chance you could make a patch that solves/prevents this?

Issue (2) sounds normal to me (after all, why should the build system assume the generated files are bogus?).
Comment 2 Marcus Granado 2006-10-13 18:12:45 UTC
the code below corrects this bad behaviour. if glib-genmarshal is not available in the path, it doesn't try do use it, and shows a friendly error message hinting the user on how to correct the problem. using it, both issues 1 and 2 do not occur anymore. 

please cut and paste it to the custom build step of grammar/gstmarshal.list
(right-click its properties, then custombuidstep|general, then replace the content of the 'command line' field).

---- cut here

glib-genmarshal > NUL 2> NUL
if %errorlevel% == 9009 goto NOGLIBGENMARSHAL 
rem resets errorlevel to 0 because it is 1 now:
dir > NUL

if exist ..\..\gst\gstmarshal.c goto HEADER
echo #include "glib-object.h" > gstmarshal.c.tmp
echo #include "gstmarshal.h" >> gstmarshal.c.tmp
glib-genmarshal --body --prefix=gst_marshal ..\..\gst\gstmarshal.list >> gstmarshal.c.tmp
move gstmarshal.c.tmp ..\..\gst\gstmarshal.c
if exist ..\..\gst\gstmarshal.h goto END
echo #include "gst/gstconfig.h" > gstmarshal.h.tmp
glib-genmarshal --header --prefix=gst_marshal ..\..\gst\gstmarshal.list >> gstmarshal.h.tmp
move gstmarshal.h.tmp ..\..\gst\gstmarshal.h
goto END

echo ERROR %errorlevel%


Comment 3 Tim-Philipp Müller 2006-10-14 11:50:19 UTC
Cool, thanks, but could you turn this into a proper patch please?

If you have a CVS checkout you can create one with:

   cvs -u diff win32/vs8/grammar.vcproj > grammar.vcproj.diff

Alternatively, if making a patch is too much hassle, could you attach the entire new modified file? (Most of us develop on linux and don't have an MSVS8 setup at hand).
Comment 4 Marcus Granado 2006-10-14 22:33:27 UTC
Created attachment 74731 [details]
updated msvsc8 grammar project

I'm attaching my modified msvs8 grammar project file.
the lines 137 and 146 are the relevant ones containing the modification to suppress this bug.
Comment 5 Tim-Philipp Müller 2006-10-15 12:48:42 UTC
Thanks for the patch, committed to CVS HEAD:

 2006-10-15  Tim-Philipp Müller  <tim at centricular dot net>

       Patch by: Marcus Granado  <mrc dot gran at gmail com>

       * win32/vs8/grammar.vcproj:
         Error out with a warning if glib-genmarshal.exe is not in path,
         instead of creating bogus gstmarshal.[ch] files. Fixes #361720.

(I suspect the grammar files for vs6/vs7 could use similar fixes, but the existing rules weren't exactly the same as the one in vs8 so I decided not to touch it).