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 791854 - gst-android: Unable to build examples using Windows host with 32-bit NDK's
gst-android: Unable to build examples using Windows host with 32-bit NDK's
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
1.12.4
Other other
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 792504 793234 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-12-21 17:40 UTC by Denis Shienkov
Modified: 2018-02-08 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-android: Remove uneeded static plugin path (1.57 KB, patch)
2017-12-21 19:18 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
gst-android: Add an .exe suffix to gold on windows (1.54 KB, patch)
2017-12-21 19:18 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
gst-android: Move comment before the rule (1.68 KB, patch)
2017-12-21 19:18 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review
gst-android: Use $(hide) instead of @ (6.43 KB, patch)
2017-12-21 19:18 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Denis Shienkov 2017-12-21 17:40:25 UTC
I use:

* Windows 10 x64 as a host.
* Android NDK for windows 16b x86 (32 bit).
* Android SDK for windows v25.2.5.
* Python 2.7.

I have downloaded the Gstreamer's pre-builded SDK for android: 

https://gstreamer.freedesktop.org/data/pkg/android/1.12.4/

I have downloaded the Gstreamer tutorials from:

https://github.com/GStreamer/gst-docs.git 

Next, need to remove the line #210

"	@# android-studio doesn't seem to like line continuation characters when executing shell commands"

from the file:

..\gstreamer-1.0-android-universal-1.12.4\armv7\share\gst-android\ndk-build\gstreamer-1.0.mk


Now, I try to build the gst-docs\examples\tutorials\android-tutorial-1 
from the Windows's command line (cmd.exe):

$ set PATH=c:\Android\android-ndk-r14b;c:\Android\android-sdk-r24.3.4\tools;c:\Python27;%PATH%
$ set GSTREAMER_ROOT_ANDROID=c:\gstreamer\1.0

$ android update project -p . -s --target android-17
$ ndk-build TARGET_ARCH_ABI=armeabi-v7a

then I got the following error:

"
e:\tests\gst-docs\examples\tutorials\android-tutorial-1>ndk-build TARGET_ARCH_ABI=armeabi-v7a
"GStreamer      : [GEN] => gst-build-armeabi-v7a/gstreamer_android.c"
"GStreamer      : [COMPILE] => gst-build-armeabi-v7a/gstreamer_android.c"
process_begin: CreateProcess(NULL, c:/Android/android-ndk-r14b/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe --sysroot=c:/Android/android-ndk-r14b/build//../platforms/android-17/arch-arm -gcc-toolchain c:/Android/android-ndk-r14b/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv7-none-linux-androideabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -c gst-build-armeabi-v7a/gstreamer_android.c -Wall -Werror -o gst-build-armeabi-v7a/gstreamer_android.o -Ic:/gstreamer/1.0/armv7/include/gstreamer-1.0 -Ic:/gstreamer/1.0/armv7/include/glib-2.0 -Ic:/gstreamer/1.0/armv7/lib/glib-2.0/include -Ic:/gstreamer/1.0/armv7/include, ...) failed.
make (e=2): Не удается найти указанный файл.
make: *** [gst-build-armeabi-v7a/gstreamer_android.o] Error 2
"

It can't fins the clang.exe by a path:

c:/Android/android-ndk-r16b/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

In my case this clang.exe is in:

c:\Android\android-ndk-r16b\toolchains\llvm\prebuilt\windows\bin\clang.exe

UPD: Same issue reproduces also with NDK 14b. 

UPD2: But with the NDK 15c there are other issue...
Comment 1 Nicolas Dufresne (ndufresne) 2017-12-21 19:18:43 UTC
Created attachment 365851 [details] [review]
gst-android: Remove uneeded static plugin path

We have the same plugin API for static and non-static now.
Comment 2 Nicolas Dufresne (ndufresne) 2017-12-21 19:18:47 UTC
Created attachment 365852 [details] [review]
gst-android: Add an .exe suffix to gold on windows
Comment 3 Nicolas Dufresne (ndufresne) 2017-12-21 19:18:51 UTC
Created attachment 365853 [details] [review]
gst-android: Move comment before the rule

The @# break when running on Windows
Comment 4 Nicolas Dufresne (ndufresne) 2017-12-21 19:18:55 UTC
Created attachment 365854 [details] [review]
gst-android: Use $(hide) instead of @

This makes V=1 works, helping a lot when we need to debug our makefiles.
Comment 5 Nicolas Dufresne (ndufresne) 2017-12-21 19:19:46 UTC
These should fix it, it's all based on the patch you provided on IRC.
Comment 6 Denis Shienkov 2017-12-22 05:35:53 UTC
> These should fix it, it's all based on the patch you provided on IRC.

Yes, many thanks. But that, on IRC, related to 64-bit NDK, and this patches fixes that. 

But current issue related to the 32-bit NDK.. and to wrong path to clang. ;)
Comment 7 Denis Shienkov 2017-12-22 05:37:43 UTC
Review of attachment 365853 [details] [review]:

As I remember, there are was two places with @#.
Comment 8 Nicolas Dufresne (ndufresne) 2017-12-22 12:26:01 UTC
(In reply to Denis Shienkov from comment #7)
> Review of attachment 365853 [details] [review] [review]:
> 
> As I remember, there are was two places with @#.

You are right, it slipped into the last patch, I'll fix, thanks.
Comment 9 Nicolas Dufresne (ndufresne) 2018-01-14 21:46:04 UTC
*** Bug 792504 has been marked as a duplicate of this bug. ***
Comment 10 Nicolas Dufresne (ndufresne) 2018-01-26 21:03:38 UTC
I've fixed the wrongly placed hunked before pushing. Thanks for reporting.

Attachment 365851 [details] pushed as d9914b6 - gst-android: Remove uneeded static plugin path
Attachment 365852 [details] pushed as 072feae - gst-android: Add an .exe suffix to gold on windows
Attachment 365853 [details] pushed as 233aefd - gst-android: Move comment before the rule
Attachment 365854 [details] pushed as 63f0aa8 - gst-android: Use $(hide) instead of @
Comment 11 Sebastian Dröge (slomo) 2018-02-07 08:38:01 UTC
*** Bug 793234 has been marked as a duplicate of this bug. ***
Comment 12 Sebastian Dröge (slomo) 2018-02-07 08:38:20 UTC
Nicolas, can you backport this also to 1.12? Thanks :)
Comment 13 Nicolas Dufresne (ndufresne) 2018-02-07 10:42:07 UTC
I'll try it out, added to my to-do now.
Comment 14 Matthew Waters (ystreet00) 2018-02-08 02:50:28 UTC
Note that d9914b60e86af229aa78eedf2ab605b30ac0fc96 needs to be reverted otherwise we cannot find any plugins.  The default path referenced by GSTREAMER_STATIC_PLUGINS_PATH was still valid.  Previously that path was $prefix/lib/gstreamer-1.0/static and was correctly changed in https://cgit.freedesktop.org/gstreamer/cerbero/commit/data/ndk-build/gstreamer-1.0.mk?id=daa9187848c6d0aaba0b40e64e4efba597300db7 to the correct path.
Comment 15 Matthew Waters (ystreet00) 2018-02-08 02:55:55 UTC
commit 65ee02b1033f7444a4ab93e6dec0dfb1a676be43
Author: Matthew Waters <matthew@centricular.com>
Date:   Thu Feb 8 13:44:16 2018 +1100

    Revert "gst-android: Remove uneeded static plugin path"
    
    This reverts commit d9914b60e86af229aa78eedf2ab605b30ac0fc96.
    
    The static plugins are still in $prefix/lib/gstreamer-1.0 so a -L path
    is still needed to reference them to be able to find them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791854
Comment 16 Nicolas Dufresne (ndufresne) 2018-02-08 15:43:56 UTC
Oops, thanks, I'll skip from the backport. That's the reason I didn't backport, I didn't have time to run a tutorial with current state.
Comment 17 Nicolas Dufresne (ndufresne) 2018-02-08 20:38:03 UTC
I didn't progress much on this today, apparently the bootstrap is now broken on Fedora 27. automake fails to build, some perl macro does not work:

Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./automake-1.15/bin/automake line 3936.
Comment 18 Nicolas Dufresne (ndufresne) 2018-02-08 22:19:40 UTC
Ok, Matthew had fixed it in master, it's a bug fixed in automake 1.15.1 caused by a warning that became an error in Perl. So all done now, if there is any other issue let me know.

commit 711fb4970e8a8cac64c09ec8d882673a64d14416
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Thu Dec 21 14:15:30 2017 -0500

    gst-android: Use $(hide) instead of @
    
    This makes V=1 works, helping a lot when we need to debug our makefiles.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791854

commit fc8c5cd16038706beea5db251aea2d0b1fd88998
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Thu Dec 21 14:07:07 2017 -0500

    gst-android: Move comment before the rule
    
    The @# break when running on Windows
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791854

commit cf278ef8291048cc07f36b30d8cdae06e1963005
Author: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date:   Thu Dec 21 14:03:16 2017 -0500

    gst-android: Add an .exe suffix to gold on windows
    
    https://bugzilla.gnome.org/show_bug.cgi?id=791854