I got an error message similar to this when doing some WebRTC NDK development on Android:
2019-02-04 13:20:35.987 10214-10246/com.my.package E/rtc: #
# Fatal error in mypath/src/main/jni/src_code.cpp, line 124
# last system error: 11
# Check failed: !jni()->ExceptionCheck()
# error during Class.function_call
#
Given that the exception is buried under some layer of abstraction (WebRTC), the line that would be particular helpful here is last system error: 11. However, trying to find a description of this error has been a little tricky. After doing some Googling, I couldn't seem to find anything. Perhaps I'm looking in the wrong place for a more meaningful description of this error? Would appreciate any help! Thanks!
whatever you've tried to do ...the terminal says:
$ perror 11
OS error code 11: Resource temporarily unavailable
src_code.cpp, line 124 would be required to interpret it in a meaningful way.
most likely some trying to access some resource, which had not been opened.
Related
I have built a custom ROM that I'm testing on Android Cuttlefish, but when I go to boot the device on the command line using the launch_cvd command, I get the following errors:
[assemble_cvd ... fetcher_config.cpp:212] Could not find file ending in kernel
[assemble_cvd ... fetcher_config.cpp 212] Could not find file ending in initramfs.img
run_cvd returned 23
Subprocess 39641 exited with error code: 23
The main issue seems to lie in the 'error 23' that is returned by run_cvd.
I have tried Google searching and browsing popular forums where Android is built and debugged (XDA Forums, Reddit, StackOverflow, the Android Building Google Group, YouTube, and the web in general). I have also posted on Reddit and will post on the Android Building Google Group. Additionally, I have looked through the source code for Cuttlefish on Google's Git repo to find why the program is outputting the error to no avail.
Lastly, I read through the logfiles of Cuttlefish to see the errors outputted by Cuttlefish. The kernel.log file seems to show the kernel booted successfully (despite the command line saying that it couldn't find the kernel file), I would imagine the same is true of initramfs.img, but I have no way of confirming that initramfs.img was successfully found by launch_cvd. The logcat file is empty (likely because the Cuttlefish failed to boot) and launcher.log simply reproduces the output on the command line (which contain the four errors I listed above).
Could anyone help me troubleshoot this issue? Your help would be greatly appreciated!
Do ps -A | grep crosvm to see if crosvm is running already.
If it is do stop_cvd || true or kill crosvm process with process PID.
We're trying to get BGFX to build for Android, following the guide here: https://github.com/Nodrev/bgfx-android-activity as recommended on the BGFX main site.
However, this repository was last updated 3+ years ago, and since then there have been major revisions to the Android NDK structure, meaning all of the library paths are all wrong. We've managed to make some progress, but keep getting stuck on the same error.
What we've tried so far:
Using various NDK versions from 17 to 25. NDK 21 seems to be the one before the big change in NDK structure but we consistently get an error at some point during the build with each NDK: 'alloca.h' file not found
Using NDK 25, we got various other errors due to incorrect paths, managed to get past those, but this just led us back to the above error.
Posting a message on the BGFX discussion board, no response.
We found a message here that appears to describe the problem we're having but the second solution does not work, with error:
error: use of undeclared identifier 'GL_PARAMETER_BUFFER_ARB' ...GL_CHECK(glBindBuffer(GL_PARAMETER_BUFFER_ARB, 0) );
and the first solution doesn't contain enough information to try to replicate it.
The main issue we're having is that it seems there is a variable sysroot which tells the build process where to look for headers and libraries, this points to --sysroot=$(ANDROID_NDK_ROOT)/platforms/android-32/arch-arm in the build script, which does not exist. Setting it to a platform that does exist, e.g. --sysroot=$(ANDROID_SDK_ROOT)/platforms/android-32/ got us as far as the alloc.h error above.
alloca.h is found in \AppData\Local\Android\Sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include so we tried setting sysroot to $(ANDROID_NDK_X86)/sysroot/usr/
which led to the error:
\AppData\Local\Android\Sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64/sysroot/usr//include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
asm/types.h is found in a few places:
ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include\aarch64-linux-android\asm ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include\arm-linux-androideabi\asm ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\include\i686-linux-android\asm
but changing sysroot to point to e.g. --sysroot=$(ANDROID_NDK_ARM)/sysroot/usr/include/arm-linux-androidabi gets us back to the alloca.h error again.
This is the error in full:
process_begin: CreateProcess(NULL, uname, ...) failed.
makefile:6: pipe: No error
C:/ProgramData/chocolatey/lib/make/tools/install/bin/make.exe -R -C .build/projects/gmake-android-arm config=debug
make[1]: Entering directory '.../bgfx/.build/projects/gmake-android-arm'
"==== Building bx (debug) ===="
allocator.cpp
In file included from ../../../../bx/src/allocator.cpp:6:
In file included from ../../../../bx/include/bx/allocator.h:9:
../../../../bx/include/bx/bx.h:9:10: fatal error: 'alloca.h' file not found
#include <alloca.h> // alloca
^~~~~~~~~~
1 error generated.
make[2]: *** [bx.make:441: ../../android-arm/obj/Debug/bx/bx/src/allocator.o] Error 1
make[1]: *** [Makefile:17: bx] Error 2
make[1]: Leaving directory '.../bgfx/.build/projects/gmake-android-arm'
make: *** [makefile:69: android-arm-debug] Error 2
We've run out of ideas at this point, would greatly appreciate some help!
I'm trying to build AOSP for non - supported device (surnia - Moto E2 2015 LTE).
I solved lots of problems earlier but now I have one that I can't avoid. I saw a lot of people had that problem, but their was just warning...
What can I do? Or could you help me finding surnia device tree (but for stock AOSP)?
[100% 441/441] writing build rules ...
FAILED:
build/make/core/Makefile:28: error: overriding commands for target `out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so', previously defined at build/make/core/base_rules.mk:480
19:07:53 ckati failed with: exit status 1
#### failed to build some targets (01:22 (mm:ss)) ####
add this flag "BUILD_BROKEN_DUP_RULES := true" in your BoardConfig.mk this work for me
I've recently encountered a similar error. It's because of a duplicate entry in PRODUCT_COPY_FILES which both are trying to copy some file to the same destination out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so. This will cause en error.
For me, the duplicate entry was in the following file:
<AOSP_ROOT>/vendor/google_devices/<DEVICE_CODENAME>/<DEVICE_CODENAME>-vendor-blobs.mk
For you, I think you should be looking for surnia-vendor-blobs.mk. Open this file and find the PRODUCT_COPY_FILES entry that has the destination out/target/product/surnia/system/vendor/lib/libHevcSwDecoder.so, then you can remove it to resolve the error.
This is a workaround, unfortunately I couldn't figout out what's the root problem.
by the way, Welcome Peter to Stack Overflow!
I encountered the following error when I tried to build Android 7 (QAEP from codeaurora.org):
ninja: error:
'out/target/product/msm8916_64/obj_arm/SHARED_LIBRARIES/
libqct_resampler_intermediates/export_includes', needed by
'out/target/product/msm8916_64/obj_arm/SHARED_LIBRARIES/
libaudioresampler_intermediates/import_in',
missing and no known rule to make it
make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1
I did a quick find for *qct* and *audioresampler*. The first one returned only a few source files from the vendor wlan driver, but no library (e.g. libqct directory). And the second returned nothing at all.
What does this error mean? Are there missing modules, that are referenced but not included in the manifest?
Any help is appreciated.
I wanted to try out PocketSphinxAndroidDemo. I thought I meticulously followed the tutorial on how to get it running here: https://sites.google.com/site/opiatefuchs/home/pocketsphinxandroiddemo
But I must be missing something. I get the following error when I do a run as as an android application from eclipse:
jni/pocketsphinx_wrap.c:760:26: fatal error: pocketsphinx.h: No such file or directory
compilation terminated.
make: * [obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.c] Error 1
I'm leaning towards maybe I did the ndk-build wrong - but it all seemed to work properly in the cygwin terminal.
I'm hoping someone can point me in the right direction. Thanks.
I've reviewed this previous post and it does not seem to contain an answer for me:
http://sourceforge.net/p/cmusphinx/discussion/help/thread/8369b305/