Android build/preview failing with fuse 1.0

When I try to build or preview a project on android it fails with the following error:

FAILED: /Users/tudor/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/tudor/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/tudor/Library/Android/sdk/ndk-bundle/sysroot  -DANDROID_NDK=/Users/tudor/Library/Android/sdk/ndk-bundle -DANDROID_PLATFORM=9 -DANDROID_STL=stlport_shared -DANDROID_TOOLCHAIN=clang -Dhikr_EXPORTS -I../../../../src/main/include -I"/Users/tudor/Library/Application Support/Fusetools/Packages/UnoCore/1.0.11/prebuilt/Android/include" -I/Users/tudor/Library/Android/sdk/ndk-bundle/sources/android/support/include -I"/Users/tudor/Library/Application Support/Fusetools/Packages/Fuse.Scripting.V8/1.0.2" -I"/Users/tudor/Library/Application Support/Fusetools/Packages/Fuse.Text/1.0.2/harfbuzz/include" -isystem /Users/tudor/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /Users/tudor/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /Users/tudor/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -isystem /Users/tudor/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=16 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security   -std=c++11 -Wno-unused-value -Wno-dangling-else  -Wno-invalid-offsetof -fexceptions -frtti -O0 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/hikr.dir/app/src/main/jni/Implementation/Cpp/posix_mutex.cpp.o -MF CMakeFiles/hikr.dir/app/src/main/jni/Implementation/Cpp/posix_mutex.cpp.o.d -o CMakeFiles/hikr.dir/app/src/main/jni/Implementation/Cpp/posix_mutex.cpp.o -c /Users/tudor/0.DevCenter/workspace/fuse/hikr/build/Android/Preview/app/src/main/jni/Implementation/Cpp/posix_mutex.cpp
  /Users/tudor/0.DevCenter/workspace/fuse/hikr/build/Android/Preview/app/src/main/jni/Implementation/Cpp/posix_mutex.cpp:23:13: error: use of undeclared identifier 'pthread_mutex_lock_timeout_np'
       return pthread_mutex_lock_timeout_np(mutexHandle, millisecondsTimeout) == 0;
              ^
  1 error generated.
>>> fuse --version
Fuse version 1.0.0 (build 13426)
Copyright (C) 2017 Fusetools
>>> system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.12.4 (16E195)
      Kernel Version: Darwin 16.5.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Time since boot: 3 days 7:47

I’ve attached the entire console output.

What if you create a new empty project, same error? Did this work in the previous version?

It’s the same error. I created an empty project and placed a Text tag inside the App tag.
Last time I tried fuse was like 10 months ago…but I remember that I was able to run it on my android device.
FYI, building/previewing on iOS works.

could you try to run fuse install android from the command line?

 ❯❯❯ fuse install android
Fuse 1.0.0 (build 13426)
# Starting android installer
# Done installing android

I had the NDK installed by Android Studio, updated to the latest version: Cmake, nkd-bundle.

It works if I uninstall them and let fuse install android do its work.

Hi, I’m getting the same error with the
error: use of undeclared identifier ‘pthread_mutex_lock_timeout_np’

I’m using windows 10 with fuse 1.0.0

I also had NDK and Cmake installed through android studio, saw this post and decided to let
fuse install android
do the work.

But even after doing it, I still get the same error.

It says “Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.”
But I’m not sure where to put the “–stacktrace” in the command.

any possible ideas on what the problem could be?

Same problem… Any solution?

Same here with Windows 7. ¿Any ideas?

I have tried uninstalling and reinstalling Fuse without success.

Thanks!

I’m facing same issue with Android on Mac. I have android installation prior to this. If I delete the entire Android installation and re-install with fuse will it work? did it work for anyone ? thanks

This seems to be due to an incompatibility between Fuse and the latest Android NDK. We have an internal issue on this and are working on a fix and will keep you posted!

Thanks for your patience!

Hi,

Facing same issue in mac compiling for android,

error: use of undeclared identifier 'pthread_mutex_lock_timeout_np' return pthread_mutex_lock_timeout_np(mutexHandle, millisecondsTimeout) == 0; ^ 1 error generated. /Users/[path]/build/Android/Preview/app/src/main/jni/Uno/Graphics/GLHelper.cpp:243:21: warning: self-comparison always evaluates to true [-Wtautological-compare] samples <= samples && r <= colorBits.R && g <= colorBits.G && b <= colorBits.B && a <= colorBits.A) ^ 1 warning generated. ninja: build stopped: subcommand failed.

Please fix this.

Thanks,
Unnikrishnan B.

Workaround

Run fuse install android and make sure everything is in place. Then download R14 from https://developer.android.com/ndk/downloads/older_releases.html, and extract it to your android sdk directory, and replace the current ndk-bundle with the extracted one.

Pro tip: Use uno config to see the paths Fuse are using eg. Android SDK Directory.

Workaround confirmed! Thanks :slight_smile:

Hi

it’s working for me also I deleted the build folder and compiled it again.

Workaround confirmed in Windows 7 :smiley: Thanks!

Workaround worked in Windows 10. Thanks!

The R14 Android NDK workaround fixed my error, thanks!

This issue is now resolved in latest pre-release https://www.fusetools.com/downloads/channel/qa.