GNOME Bugzilla – Bug 720020
Missing quotes in gst-error.m4
Last modified: 2013-12-08 16:15:54 UTC
There are missing quotes in m4/gst-error.m4 that cause a broken configure script to be written: if test "X$flag_ok" = Xyes ; then ERROR_CXXFLAGS="$ERROR_CXXFLAGS true else $f" true fi This bug is then sent to the Makefile and causes a compile error. The configure script should read: if test "X$flag_ok" = Xyes ; then ERROR_CXXFLAGS="$ERROR_CXXFLAGS" true else "$f" true fi To achieve this m4/gst-error.m4 needs to be modified with the attached patch. Let me know if any further information is needed.
Adding patching because it didn't go through the first time diff --git a/m4/gst-error.m4 b/m4/gst-error.m4 index e12a04c..9bcd7f4 100644 --- a/m4/gst-error.m4 +++ b/m4/gst-error.m4 @@ -169,7 +169,7 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do - AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f") + AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS","$f") done fi fi @@ -254,7 +254,7 @@ AC_DEFUN([AG_GST_SET_ERROR_OBJCFLAGS], 'no%E_MACRO_REDEFINED' \ 'no%E_LOOP_NOT_ENTERED_AT_TOP' do - AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f") + AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS","$f") done fi fi
Thanks for debugging this. Could you make a patch in git format-patch format and attach it as file please? (i.e. make a git commit locally and then run "git format-patch -1") Could you also provide some information about the setup/environment in which you were running into this?
Created attachment 263704 [details] [review] Add missing quotes for ERROR_CXXFLAGS and ERROR_OBJCFLAGS
(In reply to comment #2) > Thanks for debugging this. > > Could you make a patch in git format-patch format and attach it as file please? > (i.e. make a git commit locally and then run "git format-patch -1") > > Could you also provide some information about the setup/environment in which > you were running into this? I'm cross compiling on Debian 64-bit for Windows
This doesn't look quite right to me, neither your patch nor the existing code.
Created attachment 263721 [details] [review] gst-error.m4: fix build breakage in configure when cross-compiling to windows When checking ERROR_CXXFLAGS and ERROR_OBJCFLAGS, make sure the comma isn't interpreted as introducing the next argument to AS_{CXX,OBJC}_COMPILER_FLAG. Based on patch by Kyle Schwarz <zeranoe@gmail.com> ----- Does this fix the build issue for you as well? If yes, what's the output of grep ^ERROR_ Makefile after running configure?
That fixed the issue locally, configure now reads: if test "X$flag_ok" = Xyes ; then ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f" true else true fi
That looks fine, thanks for testing, I'll push that then. And I think I was wrong about the existing code not looking right, it should be fine: the checks for those specific warning codes will only be supported if -errwarn=%all is supported, so they would just be appended to that, which is presumably ok.