GNOME Bugzilla – Bug 361720
grammar project: error generating gstmarshal.c and gstmarshal.h
Last modified: 2006-10-15 12:48:42 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.
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?).
indeed. 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 :HEADER 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 :NOGLIBGENMARSHAL echo ERROR %errorlevel% echo ### YOU DO NOT HAVE GLIB-GENMARSHAL.EXE IN YOUR PATH. echo ### INSTALL GLIB-DEV AND/OR MAKE SURE IT IS IN YOUR PATH! :END
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).
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.
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).