GNOME Bugzilla – Bug 791854
gst-android: Unable to build examples using Windows host with 32-bit NDK's
Last modified: 2018-02-08 22:19:40 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...
Created attachment 365851 [details] [review] gst-android: Remove uneeded static plugin path We have the same plugin API for static and non-static now.
Created attachment 365852 [details] [review] gst-android: Add an .exe suffix to gold on windows
Created attachment 365853 [details] [review] gst-android: Move comment before the rule The @# break when running on Windows
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.
These should fix it, it's all based on the patch you provided on IRC.
> 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. ;)
Review of attachment 365853 [details] [review]: As I remember, there are was two places with @#.
(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.
*** Bug 792504 has been marked as a duplicate of this bug. ***
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 @
*** Bug 793234 has been marked as a duplicate of this bug. ***
Nicolas, can you backport this also to 1.12? Thanks :)
I'll try it out, added to my to-do now.
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.
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
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.
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.
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