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 768326 - Building GStreamer for Android fails on Windows (new since 1.8.2)
Building GStreamer for Android fails on Windows (new since 1.8.2)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.8.2
Other Windows
: Normal blocker
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 768616 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-07-03 08:09 UTC by Andy Devar
Modified: 2016-08-12 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for original gstreamer-1.0.mk in gstreamer-1.0-android-armv7-1.8.2 (2.13 KB, patch)
2016-07-16 14:50 UTC, Andy Devar
committed Details | Review

Description Andy Devar 2016-07-03 08:09:34 UTC
A command like the following is issued when building.
It is not compatible with Windows for several reasons:

- "cat" is not available on plain Windows (installing gnuwin32 might help)

- Multiline commands can't be separated by the backslash character "\". Maybe "^" could be used instead - see: http://stackoverflow.com/questions/605686/windows-how-to-specify-multiline-command-on-command-prompt

- Maybe more.

This problem seems to be new in gstreamer 1.8.2, as it did not occur in 1.8.1.



GStreamer      : [GEN] => gst-build-armeabi-v7a/gstreamer_android.c
cat C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//gstreamer_android-1.0.c.in | \
		C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//tools/windows/sed "s/@PLUGINS_DECLARATION@/ GST_PLUGIN_STATIC_DECLARE(coreelements);\n  GST_PLUGIN_STATIC_DECLARE(adder);\n  GST_PLUGIN_STATIC_DECLARE(app);\n  GST_PLUGIN_STATIC_DECLARE(audioconvert);\n  GST_PLUGIN_STATIC_DECLARE(audiorate);\n  GST_PLUGIN_STATIC_DECLARE(audioresample);\n  GST_PLUGIN_STATIC_DECLARE(audiotestsrc);\n  GST_PLUGIN_STATIC_DECLARE(gio);\n  GST_PLUGIN_STATIC_DECLARE(pango);\n  GST_PLUGIN_STATIC_DECLARE(typefindfunctions);\n  GST_PLUGIN_STATIC_DECLARE(videoconvert);\n  GST_PLUGIN_STATIC_DECLARE(videorate);\n  GST_PLUGIN_STATIC_DECLARE(videoscale);\n  GST_PLUGIN_STATIC_DECLARE(videotestsrc);\n  GST_PLUGIN_STATIC_DECLARE(volume);\n  GST_PLUGIN_STATIC_DECLARE(autodetect);\n  GST_PLUGIN_STATIC_DECLARE(videofilter);\n  GST_PLUGIN_STATIC_DECLARE(playback);\n  GST_PLUGIN_STATIC_DECLARE(subparse);\n  GST_PLUGIN_STATIC_DECLARE(ogg);\n  GST_PLUGIN_STATIC_DECLARE(theora);\n  GST_PLUGIN_STATIC_DECLARE(vorbis);\n  GST_PLUGIN_STATIC_DECLARE(opus);\n  GST_PLUGIN_STATIC_DECLARE(ivorbisdec);\n  GST_PLUGIN_STATIC_DECLARE(alaw);\n  GST_PLUGIN_STATIC_DECLARE(apetag);\n  GST_PLUGIN_STATIC_DECLARE(audioparsers);\n  GST_PLUGIN_STATIC_DECLARE(auparse);\n  GST_PLUGIN_STATIC_DECLARE(avi);\n  GST_PLUGIN_STATIC_DECLARE(dv);\n  GST_PLUGIN_STATIC_DECLARE(flac);\n  GST_PLUGIN_STATIC_DECLARE(flv);\n  GST_PLUGIN_STATIC_DECLARE(flxdec);\n  GST_PLUGIN_STATIC_DECLARE(icydemux);\n  GST_PLUGIN_STATIC_DECLARE(id3demux);\n  GST_PLUGIN_STATIC_DECLARE(isomp4);\n  GST_PLUGIN_STATIC_DECLARE(jpeg);\n  GST_PLUGIN_STATIC_DECLARE(matroska);\n  GST_PLUGIN_STATIC_DECLARE(mulaw);\n  GST_PLUGIN_STATIC_DECLARE(multipart);\n  GST_PLUGIN_STATIC_DECLARE(png);\n  GST_PLUGIN_STATIC_DECLARE(speex);\n  GST_PLUGIN_STATIC_DECLARE(taglib);\n  GST_PLUGIN_STATIC_DECLARE(vpx);\n  GST_PLUGIN_STATIC_DECLARE(wavenc);\n  GST_PLUGIN_STATIC_DECLARE(wavpack);\n  GST_PLUGIN_STATIC_DECLARE(wavparse);\n  GST_PLUGIN_STATIC_DECLARE(y4menc);\n  GST_PLUGIN_STATIC_DECLARE(adpcmdec);\n  GST_PLUGIN_STATIC_DECLARE(adpcmenc);\n  GST_PLUGIN_STATIC_DECLARE(dashdemux);\n  GST_PLUGIN_STATIC_DECLARE(dvbsuboverlay);\n  GST_PLUGIN_STATIC_DECLARE(dvdspu);\n  GST_PLUGIN_STATIC_DECLARE(hls);\n  GST_PLUGIN_STATIC_DECLARE(id3tag);\n  GST_PLUGIN_STATIC_DECLARE(kate);\n  GST_PLUGIN_STATIC_DECLARE(midi);\n  GST_PLUGIN_STATIC_DECLARE(mxf);\n  GST_PLUGIN_STATIC_DECLARE(openh264);\n  GST_PLUGIN_STATIC_DECLARE(opusparse);\n  GST_PLUGIN_STATIC_DECLARE(pcapparse);\n  GST_PLUGIN_STATIC_DECLARE(pnm);\n  GST_PLUGIN_STATIC_DECLARE(rfbsrc);\n  GST_PLUGIN_STATIC_DECLARE(schro);\n  GST_PLUGIN_STATIC_DECLARE(gstsiren);\n  GST_PLUGIN_STATIC_DECLARE(smoothstreaming);\n  GST_PLUGIN_STATIC_DECLARE(subenc);\n  GST_PLUGIN_STATIC_DECLARE(videoparsersbad);\n  GST_PLUGIN_STATIC_DECLARE(y4mdec);\n  GST_PLUGIN_STATIC_DECLARE(jpegformat);\n  GST_PLUGIN_STATIC_DECLARE(gdp);\n  GST_PLUGIN_STATIC_DECLARE(rsvg);\n  GST_PLUGIN_STATIC_DECLARE(openjpeg);\n  GST_PLUGIN_STATIC_DECLARE(spandsp);\n  GST_PLUGIN_STATIC_DECLARE(androidmedia);\n  GST_PLUGIN_STATIC_DECLARE(tcp);\n  GST_PLUGIN_STATIC_DECLARE(rtsp);\n  GST_PLUGIN_STATIC_DECLARE(rtp);\n  GST_PLUGIN_STATIC_DECLARE(rtpmanager);\n  GST_PLUGIN_STATIC_DECLARE(soup);\n  GST_PLUGIN_STATIC_DECLARE(udp);\n  GST_PLUGIN_STATIC_DECLARE(dataurisrc);\n  GST_PLUGIN_STATIC_DECLARE(sdp);\n  GST_PLUGIN_STATIC_DECLARE(srtp);\n  GST_PLUGIN_STATIC_DECLARE(rtspclientsink);\n  GST_PLUGIN_STATIC_DECLARE(opensles);\n  GST_PLUGIN_STATIC_DECLARE(opengl);\n  GST_PLUGIN_STATIC_DECLARE(mms);\n  GST_PLUGIN_STATIC_DECLARE(rtmp);\n  GST_PLUGIN_STATIC_DECLARE(asfmux);\n  GST_PLUGIN_STATIC_DECLARE(dtsdec);\n  GST_PLUGIN_STATIC_DECLARE(faad);\n  GST_PLUGIN_STATIC_DECLARE(mpegpsdemux);\n  GST_PLUGIN_STATIC_DECLARE(mpegpsmux);\n  GST_PLUGIN_STATIC_DECLARE(mpegtsdemux);\n  GST_PLUGIN_STATIC_DECLARE(mpegtsmux);\n  GST_PLUGIN_STATIC_DECLARE(voaacenc);\n  GST_PLUGIN_STATIC_DECLARE(a52dec);\n  GST_PLUGIN_STATIC_DECLARE(amrnb);\n  GST_PLUGIN_STATIC_DECLARE(amrwbdec);\n  GST_PLUGIN_STATIC_DECLARE(asf);\n  GST_PLUGIN_STATIC_DECLARE(dvdsub);\n  GST_PLUGIN_STATIC_DECLARE(dvdlpcmdec);\n  GST_PLUGIN_STATIC_DECLARE(mad);\n  GST_PLUGIN_STATIC_DECLARE(mpeg2dec);\n  GST_PLUGIN_STATIC_DECLARE(xingmux);\n  GST_PLUGIN_STATIC_DECLARE(realmedia);\n  GST_PLUGIN_STATIC_DECLARE(x264);\n  GST_PLUGIN_STATIC_DECLARE(lame);\n  GST_PLUGIN_STATIC_DECLARE(mpg123);\n  GST_PLUGIN_STATIC_DECLARE(libav);\n/g" | \
		C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//tools/windows/sed "s/@PLUGINS_REGISTRATION@/ GST_PLUGIN_STATIC_REGISTER(coreelements);\n  GST_PLUGIN_STATIC_REGISTER(adder);\n  GST_PLUGIN_STATIC_REGISTER(app);\n  GST_PLUGIN_STATIC_REGISTER(audioconvert);\n  GST_PLUGIN_STATIC_REGISTER(audiorate);\n  GST_PLUGIN_STATIC_REGISTER(audioresample);\n  GST_PLUGIN_STATIC_REGISTER(audiotestsrc);\n  GST_PLUGIN_STATIC_REGISTER(gio);\n  GST_PLUGIN_STATIC_REGISTER(pango);\n  GST_PLUGIN_STATIC_REGISTER(typefindfunctions);\n  GST_PLUGIN_STATIC_REGISTER(videoconvert);\n  GST_PLUGIN_STATIC_REGISTER(videorate);\n  GST_PLUGIN_STATIC_REGISTER(videoscale);\n  GST_PLUGIN_STATIC_REGISTER(videotestsrc);\n  GST_PLUGIN_STATIC_REGISTER(volume);\n  GST_PLUGIN_STATIC_REGISTER(autodetect);\n  GST_PLUGIN_STATIC_REGISTER(videofilter);\n  GST_PLUGIN_STATIC_REGISTER(playback);\n  GST_PLUGIN_STATIC_REGISTER(subparse);\n  GST_PLUGIN_STATIC_REGISTER(ogg);\n  GST_PLUGIN_STATIC_REGISTER(theora);\n  GST_PLUGIN_STATIC_REGISTER(vorbis);\n  GST_PLUGIN_STATIC_REGISTER(opus);\n  GST_PLUGIN_STATIC_REGISTER(ivorbisdec);\n  GST_PLUGIN_STATIC_REGISTER(alaw);\n  GST_PLUGIN_STATIC_REGISTER(apetag);\n  GST_PLUGIN_STATIC_REGISTER(audioparsers);\n  GST_PLUGIN_STATIC_REGISTER(auparse);\n  GST_PLUGIN_STATIC_REGISTER(avi);\n  GST_PLUGIN_STATIC_REGISTER(dv);\n  GST_PLUGIN_STATIC_REGISTER(flac);\n  GST_PLUGIN_STATIC_REGISTER(flv);\n  GST_PLUGIN_STATIC_REGISTER(flxdec);\n  GST_PLUGIN_STATIC_REGISTER(icydemux);\n  GST_PLUGIN_STATIC_REGISTER(id3demux);\n  GST_PLUGIN_STATIC_REGISTER(isomp4);\n  GST_PLUGIN_STATIC_REGISTER(jpeg);\n  GST_PLUGIN_STATIC_REGISTER(matroska);\n  GST_PLUGIN_STATIC_REGISTER(mulaw);\n  GST_PLUGIN_STATIC_REGISTER(multipart);\n  GST_PLUGIN_STATIC_REGISTER(png);\n  GST_PLUGIN_STATIC_REGISTER(speex);\n  GST_PLUGIN_STATIC_REGISTER(taglib);\n  GST_PLUGIN_STATIC_REGISTER(vpx);\n  GST_PLUGIN_STATIC_REGISTER(wavenc);\n  GST_PLUGIN_STATIC_REGISTER(wavpack);\n  GST_PLUGIN_STATIC_REGISTER(wavparse);\n  GST_PLUGIN_STATIC_REGISTER(y4menc);\n  GST_PLUGIN_STATIC_REGISTER(adpcmdec);\n  GST_PLUGIN_STATIC_REGISTER(adpcmenc);\n  GST_PLUGIN_STATIC_REGISTER(dashdemux);\n  GST_PLUGIN_STATIC_REGISTER(dvbsuboverlay);\n  GST_PLUGIN_STATIC_REGISTER(dvdspu);\n  GST_PLUGIN_STATIC_REGISTER(hls);\n  GST_PLUGIN_STATIC_REGISTER(id3tag);\n  GST_PLUGIN_STATIC_REGISTER(kate);\n  GST_PLUGIN_STATIC_REGISTER(midi);\n  GST_PLUGIN_STATIC_REGISTER(mxf);\n  GST_PLUGIN_STATIC_REGISTER(openh264);\n  GST_PLUGIN_STATIC_REGISTER(opusparse);\n  GST_PLUGIN_STATIC_REGISTER(pcapparse);\n  GST_PLUGIN_STATIC_REGISTER(pnm);\n  GST_PLUGIN_STATIC_REGISTER(rfbsrc);\n  GST_PLUGIN_STATIC_REGISTER(schro);\n  GST_PLUGIN_STATIC_REGISTER(gstsiren);\n  GST_PLUGIN_STATIC_REGISTER(smoothstreaming);\n  GST_PLUGIN_STATIC_REGISTER(subenc);\n  GST_PLUGIN_STATIC_REGISTER(videoparsersbad);\n  GST_PLUGIN_STATIC_REGISTER(y4mdec);\n  GST_PLUGIN_STATIC_REGISTER(jpegformat);\n  GST_PLUGIN_STATIC_REGISTER(gdp);\n  GST_PLUGIN_STATIC_REGISTER(rsvg);\n  GST_PLUGIN_STATIC_REGISTER(openjpeg);\n  GST_PLUGIN_STATIC_REGISTER(spandsp);\n  GST_PLUGIN_STATIC_REGISTER(androidmedia);\n  GST_PLUGIN_STATIC_REGISTER(tcp);\n  GST_PLUGIN_STATIC_REGISTER(rtsp);\n  GST_PLUGIN_STATIC_REGISTER(rtp);\n  GST_PLUGIN_STATIC_REGISTER(rtpmanager);\n  GST_PLUGIN_STATIC_REGISTER(soup);\n  GST_PLUGIN_STATIC_REGISTER(udp);\n  GST_PLUGIN_STATIC_REGISTER(dataurisrc);\n  GST_PLUGIN_STATIC_REGISTER(sdp);\n  GST_PLUGIN_STATIC_REGISTER(srtp);\n  GST_PLUGIN_STATIC_REGISTER(rtspclientsink);\n  GST_PLUGIN_STATIC_REGISTER(opensles);\n  GST_PLUGIN_STATIC_REGISTER(opengl);\n  GST_PLUGIN_STATIC_REGISTER(mms);\n  GST_PLUGIN_STATIC_REGISTER(rtmp);\n  GST_PLUGIN_STATIC_REGISTER(asfmux);\n  GST_PLUGIN_STATIC_REGISTER(dtsdec);\n  GST_PLUGIN_STATIC_REGISTER(faad);\n  GST_PLUGIN_STATIC_REGISTER(mpegpsdemux);\n  GST_PLUGIN_STATIC_REGISTER(mpegpsmux);\n  GST_PLUGIN_STATIC_REGISTER(mpegtsdemux);\n  GST_PLUGIN_STATIC_REGISTER(mpegtsmux);\n  GST_PLUGIN_STATIC_REGISTER(voaacenc);\n  GST_PLUGIN_STATIC_REGISTER(a52dec);\n  GST_PLUGIN_STATIC_REGISTER(amrnb);\n  GST_PLUGIN_STATIC_REGISTER(amrwbdec);\n  GST_PLUGIN_STATIC_REGISTER(asf);\n  GST_PLUGIN_STATIC_REGISTER(dvdsub);\n  GST_PLUGIN_STATIC_REGISTER(dvdlpcmdec);\n  GST_PLUGIN_STATIC_REGISTER(mad);\n  GST_PLUGIN_STATIC_REGISTER(mpeg2dec);\n  GST_PLUGIN_STATIC_REGISTER(xingmux);\n  GST_PLUGIN_STATIC_REGISTER(realmedia);\n  GST_PLUGIN_STATIC_REGISTER(x264);\n  GST_PLUGIN_STATIC_REGISTER(lame);\n  GST_PLUGIN_STATIC_REGISTER(mpg123);\n  GST_PLUGIN_STATIC_REGISTER(libav);\n/g" | \
		C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//tools/windows/sed "s/@G_IO_MODULES_LOAD@/ GST_G_IO_MODULE_LOAD(gnutls);\n/g" | \
		C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//tools/windows/sed "s/@G_IO_MODULES_DECLARE@/ GST_G_IO_MODULE_DECLARE(gnutls);\n/g" > gst-build-armeabi-v7a/gstreamer_android.c
Comment 1 Andy Devar 2016-07-03 08:38:41 UTC
The build succeeds now after doing the following:
- Installed gnuwin32 and added it to the PATH environment variable.

- Modified gstreamer.1.0.mk, original line 210:
Removed the backslash which was used as a line separator. Now, the whole command ist a single line.
Enclosed $(PRIV_C_IN) and $(SED) in double-quotes.
It now looks like this:

cat "$(PRIV_C_IN)" | "$(SED)" "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | "$(SED)" "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | "$(SED)" "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | "$(SED)" "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C)

Originally, it looked like this:

cat $(PRIV_C_IN) | \
	$(SED) "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | \
	$(SED) "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | \
	$(SED) "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | \
	$(SED) "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C)


- Modified gstreamer.1.0.mk, original line 257 the same way.
It now looks like this:

cat "$(GSTREAMER_NDK_BUILD_PATH)/GStreamer.java" | "$(SED)" "s;@INCLUDE_FONTS@;//;g" | "$(SED)" "s;@INCLUDE_CA_CERTIFICATES@;//;g" | "$(SED)" "s;@INCLUDE_COPY_FILE@;//;g" > "$(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java"


Originally, it looked like this:

cat $(GSTREAMER_NDK_BUILD_PATH)/GStreamer.java | \
	$(SED) "s;@INCLUDE_FONTS@;//;g" | \
	$(SED) "s;@INCLUDE_CA_CERTIFICATES@;//;g" | \
	$(SED) "s;@INCLUDE_COPY_FILE@;//;g" \
	> $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/GStreamer.java
Comment 2 Nicolas Dufresne (ndufresne) 2016-07-03 12:55:52 UTC
You said this is a regression, while I believe this script was always supposed to be run inside the mingw shell, as per the isntructions in README ? gwin32 is probably a good replacement though.
Comment 3 Andy Devar 2016-07-03 16:34:08 UTC
Sorry, should have pointed out that the script gstreamer-1.0.mk is called by Android.mk which is part of gstreamer android tutorial-5.
To build, I call ndk-build.cmd, which is part of Android NDK.  

I downloaded gstreamer from here:

https://gstreamer.freedesktop.org/data/pkg/android/1.8.2/gstreamer-1.0-android-armv7-1.8.2.tar.bz2

If you compare gstreamer-1.0.mk in version 1.8.2 to version 1.8.1, you find that the "cat" has been added in 1.8.2 - the 1.8.1 version does not contain any "cat" calls.
Comment 4 Sebastian Dröge (slomo) 2016-07-04 07:43:00 UTC
This is indeed a regression between 1.8.1 and 1.8.2. We call cat now instead of just sed. Should be easy to fix though, looking into that now.
Comment 5 Sebastian Dröge (slomo) 2016-07-04 08:21:48 UTC
This should solve it: https://cgit.freedesktop.org/gstreamer/cerbero/commit/?id=68624925eaab3b665beea215c690df8a41b74cd5

You can apply that directly to the 1.8.2 binaries for testing if you like.
Comment 6 Andy Devar 2016-07-09 21:31:14 UTC
Unfortunately, this patch does not fully resolve the problem for me.
I still get the following error:
The command "C:" is either misspelled or could not be found.


Value of variable SED:
C:/Source/gstreamer-1.0-android-armv7-1.8.2//share/gst-android/ndk-build//tools/windows/sed

To resolve this, I replaced all occurrences of $(SED) by "$(SED)" for that the SED command path is embraced in double quotes.
Comment 7 Nicolas Dufresne (ndufresne) 2016-07-10 15:53:57 UTC
Usually in make you can put the double quotes when affecting, and not care later. I might remember wrong, Looks good otherwise. Will you provide a patch?
Comment 8 Sebastian Dröge (slomo) 2016-07-11 06:37:01 UTC
Or should the content of the SED variable maybe contain the " on Windows? Not sure why this would be a new problem though
Comment 9 Andy Devar 2016-07-16 13:19:15 UTC
>
>Not sure why this would be a new problem though
>

This is a new problem:
In older versions of gstreamer-1.0.mk, multiple separate calls of sed were used to perform the replacements, e.g.:

	@$(HOST_ECHO) "GStreamer      : [GEN] => $(PRIV_C)"
	@$(call host-mkdir,$(PRIV_B_DIR))
	@$(call host-cp,$(PRIV_C_IN),$(PRIV_C))
	@$(SED) -i "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" $(PRIV_C)
	@$(SED) -i "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" $(PRIV_C)
	@$(SED) -i "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" $(PRIV_C)
	@$(SED) -i "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" $(PRIV_C)


In the 1.8.2 version of gstreamer-1.0.mk, a sequence of piped sed calls is used to perform the replacements:

	@$(HOST_ECHO) "GStreamer      : [GEN] => $(PRIV_C)"
	@$(call host-mkdir,$(PRIV_B_DIR))
	cat $(PRIV_C_IN) | \
		$(SED) "s/@PLUGINS_DECLARATION@/$(PRIV_P_D)/g" | \
		$(SED) "s/@PLUGINS_REGISTRATION@/$(PRIV_P_R)/g" | \
		$(SED) "s/@G_IO_MODULES_LOAD@/$(PRIV_G_L)/g" | \
		$(SED) "s/@G_IO_MODULES_DECLARE@/$(PRIV_G_R)/g" > $(PRIV_C)

On Windows OS, the latter only works if at least one of the following conditions is true:
- $(SED) is enclosed in double-quotes:
"C:/path/to/sed" | "C:/path/to/sed"
I think that this would be the better option, as it probably would also work if the sed path contained spaces.
- The path contained in $(SED) has windows specific path separators only (backslash instead of forward slash)
C:\path\to\sed | C:\path\to\sed




>
> Or should the content of the SED variable maybe contain the " on Windows?
>
I had also tried this, but it didn't work for some reason.
I'll try it again. If it works, I'll create a patch.
Comment 10 Andy Devar 2016-07-16 13:36:05 UTC
The reason why this worked in older versions is that the following command is valid:
C:/path/to/sed

But the follwing isn't:
C:/path/to/sed | C:/path/to/sed

The following are also valid:
"C:/path/to/sed" | "C:/path/to/sed"
C:\path\to\sed" | C:\path\to\sed
Comment 11 Andy Devar 2016-07-16 14:50:53 UTC
Created attachment 331629 [details] [review]
Patch for original gstreamer-1.0.mk in gstreamer-1.0-android-armv7-1.8.2

>
> Or should the content of the SED variable maybe contain the " on Windows?
>
This doesn't work - probably because some other script included by gstreamer-1.0.mk requires that $(SED) does not contain the quotes.

Therefore, I have created a new variable named SED_LOCAL, which contains the quoted sed path on windows. On other OSes, it contains the non-quoted sed path - I assume that on other OSes those should must not be present. Someone should check that before committing my changes.

I've then replaced all occurrences of $(SED) in gstreamer-1.0.mk  with $(SED_LOCAL).


My patch also contains the changes provided by Sebastian Dröge:
https://bugzilla.gnome.org/show_bug.cgi?id=768326#c5
(i.e. removal of cat command).


In addition to that, I've included the following patch:
https://bugzilla.gnome.org/show_bug.cgi?id=768616#c2

Note that the attached patch is based on the original gstreamer-1.0.mk file contained in https://gstreamer.freedesktop.org/data/pkg/android/1.8.2/gstreamer-1.0-android-armv7-1.8.2.tar.bz2
Comment 12 Sebastian Dröge (slomo) 2016-07-25 07:10:08 UTC
(In reply to Andy Devar from comment #11)
> Created attachment 331629 [details] [review] [review]
> Patch for original gstreamer-1.0.mk in gstreamer-1.0-android-armv7-1.8.2
> 
> >
> > Or should the content of the SED variable maybe contain the " on Windows?
> >
> This doesn't work - probably because some other script included by
> gstreamer-1.0.mk requires that $(SED) does not contain the quotes.

Which other scripts and why/how do they require that?

> Therefore, I have created a new variable named SED_LOCAL, which contains the
> quoted sed path on windows. On other OSes, it contains the non-quoted sed
> path - I assume that on other OSes those should must not be present. Someone
> should check that before committing my changes.
> 
> I've then replaced all occurrences of $(SED) in gstreamer-1.0.mk  with
> $(SED_LOCAL).

Seems like a reasonable approach if there's nothing else we can do :)
Comment 13 Sebastian Dröge (slomo) 2016-07-25 07:10:56 UTC
Comment on attachment 331629 [details] [review]
Patch for original gstreamer-1.0.mk in gstreamer-1.0-android-armv7-1.8.2

Can you try to make a patch against the latest version in GIT?


Also why did you change the '=' assignments to ':='?
Comment 14 Sebastian Dröge (slomo) 2016-07-25 07:13:59 UTC
*** Bug 768616 has been marked as a duplicate of this bug. ***
Comment 15 Sebastian Dröge (slomo) 2016-08-01 07:05:05 UTC
Andy, do you want to update your patch?
Comment 16 Sebastian Dröge (slomo) 2016-08-12 14:18:15 UTC
Comment on attachment 331629 [details] [review]
Patch for original gstreamer-1.0.mk in gstreamer-1.0-android-armv7-1.8.2

commit 3b545253e6f16990954ff2f002777e6a068fff16
Author: Andy Devar <andy.devar@gmail.com>
Date:   Fri Aug 12 16:16:24 2016 +0200

    android: Fix Android build on Windows
    
    Windows a) requires quotes around commands if you | them and b) remembers
    empty quotes in Makefiles and confuses the shell with them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768326