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 720020 - Missing quotes in gst-error.m4
Missing quotes in gst-error.m4
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: common
git master
Other All
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-06 23:29 UTC by Kyle
Modified: 2013-12-08 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add missing quotes for ERROR_CXXFLAGS and ERROR_OBJCFLAGS (1.13 KB, patch)
2013-12-06 23:45 UTC, Kyle
reviewed Details | Review
gst-error.m4: fix build breakage in configure when cross-compiling to windows (1.46 KB, patch)
2013-12-07 19:20 UTC, Tim-Philipp Müller
committed Details | Review

Description Kyle 2013-12-06 23:29:15 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.
Comment 1 Kyle 2013-12-06 23:30:20 UTC
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
Comment 2 Tim-Philipp Müller 2013-12-06 23:35:42 UTC
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?
Comment 3 Kyle 2013-12-06 23:45:03 UTC
Created attachment 263704 [details] [review]
Add missing quotes for ERROR_CXXFLAGS and ERROR_OBJCFLAGS
Comment 4 Kyle 2013-12-06 23:46:27 UTC
(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
Comment 5 Tim-Philipp Müller 2013-12-07 19:18:10 UTC
This doesn't look quite right to me, neither your patch nor the existing code.
Comment 6 Tim-Philipp Müller 2013-12-07 19:20:20 UTC
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?
Comment 7 Kyle 2013-12-07 21:07:43 UTC
That fixed the issue locally, configure now reads:
  if test "X$flag_ok" = Xyes ; then
    ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"
    true
  else

    true
  fi
Comment 8 Tim-Philipp Müller 2013-12-07 21:23:52 UTC
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.