recipe for target 'ninja_wrapper' failed / flex core dumps - android

First time android builder here. I used to do a lot of roll your own back on FreeBSD in the day. Getting back into geekdom with android.
I am trying to build android-7.0.0_r14 for the Nexus 6 NBD90Z to run under emulation. I plan to eventually build for my actual phone and this config is pretty close. I am building on ubuntu 18.04 LTS which is newer than what the docs recommend. Maybe that is a bit adventurous.
Here is what I get when I run make.
... snip
build/core/base_rules.mk:316: warning: ignoring old commands for target
out/target/product/shamu/system/lib/soundfx/libqcomvoiceprocessing.so'
Starting build with ninja
ninja: Entering directory.'
ninja: warning: multiple rules generate out/target/product/shamu/system/etc/gps.conf. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
[ 0% 1/35600] Lex: libaidl-common <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
A core dump for flex was not produced in spite of the error message given.
out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp does not exist. That entire folder is empty. It would seem that something is not downloading/copying the aidl_language_l.cpp.
Any ideas on what I might have messed up?
I am still a little confused at the complexity of git/repo/make/ninja/soong/lunch to conduct a build. It is likely that I missed something obvious.
Thanks,
Jason C. Wells

Just replace your make by export LC_ALL=C make or put the export in your .bashrc

After I looked at this a little closer I realized the prebuilt prebuilts/misc/linux-x86/flex/flex-2.5.39 would dump core with no arguments. I created a soft link to /usr/bin/flex. Compilation seems to be proceeding.
I haven't answered why the prebuilt was dumping. My goal is to compile android, not troubleshoot the tools.

I performed Snorky's steps. I deleted my output directory for libaidl-common_intermediates. I deleted my soft link and restored the android tree version of flex. I re-ran make at the top of the local repo. The build proceeded past the error above and stopped at a new error. It appears that Snorky's answer worked.
Doh! I'm new so S.O. didn't give credit for my upvote.

Related

Trying to get BGFX to build for Android

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!

Jenkins Android build fails - can't build libwebviewchromium.so

A bit of advice or idea is needed.
I am trying to build Android 5.1.1 Lollipop with Jenkins. But it fails to build libwebviewchromium.so:
...
out/target/product/generic/obj/GYP/shared_intermediates/blink/bindings/core/v8/V8SVGNumber.cpp:55: error: undefined reference to 'blink::SVGNumberTearOff::setValue(float, blink::ExceptionState&)'
out/target/product/generic/obj/STATIC_LIBRARIES/third_party_WebKit_Source_core_webcore_generated_gyp_intermediates/SVGElementFactory.cpp:383: error: undefined reference to 'blink::SVGMetadataElement::create(blink::Document&)'
external/chromium_org/third_party/WebKit/Source/core/svg/SVGNumberTearOff.h:45: error: undefined reference to 'blink::SVGNumberTearOff::SVGNumberTearOff(WTF::PassRefPtr<blink::SVGNumber>, blink::SVGElement*, blink::PropertyIsAnimValType, blink::QualifiedName const&)'
collect2: error: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
At the same time, when I try to build it manually, it succeeds:
. build/envsetup.sh
set_stuff_for_environment
lunch zh2_qemu_eng
make clean
make -j24
I wonder how it comes that the same operation can be successful when using a console and fail when using Jenkins. Could you please share your ideas with me?
P.S. The build machine has 24GB of RAM and 15GB swap file, and a 512 GB SSD flash disk (62% available). The OS is Ubuntu 14.04LTS, 64 bit.
$ free -m
total used free shared buffers cached
Mem: 24021 22079 1942 75 4778 8768
-/+ buffers/cache: 8532 15488
Swap: 16036 345 15691
I wonder how it comes that the same operation can be successful when using a console and fail when using Jenkins.
Because Jenkins might not run with the same user (or on the same workstation, if the agent executing the job is a separate machine)
Double-check if there are any environment variable differences between:
your command-line, where you can successfully run your command (type env after your commands)
the environment variables you can see associated with your (failed) job
For instance, a LD_LIBRARY_PATH difference could explain the discrepancy between the two builds.
Make sure you have all the header files included and libraries linked at the time of compilation. Undefined Reference errors primarily arise due to these two reasons.
user jenkins has it's own ~/.bashrc, which might lack environmental variables.
temporarily enable login shell for jenkins, setup the environment, then disable it again.
when being able to manually build as user jenkins, it should also build when automated.
The problem is solved.
We copied the Jenkins/AOSP setup from another server, and something was wrong with the copy.
The cleanup of the ccache solved the problem. After performing "ccache -c" command, everything worked fine.

iOS Build failure for CodenameOne

I've built the iOS version of my app about a month or so ago. Then added a few extra messages to the UI, tested with the Android version and now when I rebuild the iOS version it seems to fail. The error log is at: https://s3.amazonaws.com/codenameone-build-response/621a8710-2900-45a3-afdb-e3a30bdb1265-1504680431641-error.txt
At the bottom of this, the only actual failure I see is:
** ARCHIVE FAILED **
The following build commands failed:
CompileC build/Build/Intermediates/ArchiveIntermediates/MyApplication/IntermediateBuildFilesPath/MyApplication.build/Release-iphoneos/MyApplication.build/Objects-normal/arm64/com_codename1_io_websocket_WebSocketNativeImplImpl.o MyApplication-src/com_codename1_io_websocket_WebSocketNativeImplImpl.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Failed xcodebuild step
I have updated the CN1Libs a few days ago. Not really sure what about this is actually failing to build.
Notice that the file com_codename1_io_websocket_WebSocketNativeImplImpl.m is mentioned in the final lines which means that's the file that failed. If you search the file for mentions of com_codename1_io_websocket_WebSocketNativeImplImpl.m you will find:
src/com_codename1_io_websocket_WebSocketNativeImplImpl.m -o /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build7085253492970683151xxx/dist/build/Build/Intermediates/ArchiveIntermediates/MyApplication/IntermediateBuildFilesPath/MyApplication.build/Release-iphoneos/MyApplication.build/Objects-normal/arm64/com_codename1_io_websocket_WebSocketNativeImplImpl.o
/var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/T/build7085253492970683151xxx/dist/MyApplication-src/com_codename1_io_websocket_WebSocketNativeImplImpl.m:23:9: fatal error: 'com_codename1_io_websocket_WebSocket.h' file not found
#import "com_codename1_io_websocket_WebSocket.h"
^
1 error generated.
This might be a bit confusing but it generally means you added the cn1lib for websockets and didn't use it. That's a problem as our VM strips out unused code but the websockets cn1lib needs to include the callback interface which is now stripped away.

Installing compile samples 4.0 failed nvidia

While installing NVidia Android CodeWorks I have received an error at the very end of the installation process saying :
installing compile samples 4.0 failed nvidia
Return Code: 2Compile Samples failed. Please check the /home/user/NVPACK//_installer/compile.log. You can send it to TegraDeveloperPack-Users#nvidia.com if you can not resolve it.
Does anyone know how to solve this problem please
So that other people having the same problem might go on something for I have not found an optimal solution to this problem.
I have managed to solve it by simply copying my version of jdk (which is jdk1.8.0_101) to the specified Nvidia Codeworks folder and renaming to the one missing in the log (...\Nvidia\Codeworks_installer\compile.log - \Nvidia\Codeworks\jdk1.8.0_77" does not exist.) In my case it compiled successfully, however it must be noted that this is not a good solution. Messing around with the environment valuables might be a reasonable place to start otherwise.
If your log file shows:
Error: JAVA_HOME is not defined correctly.
make: *** [antbuild_Basic_debug] Error 1
We cannot execute /usr/bin/java
Makefile.Basic.mk:92: recipe for target 'antbuild_Basic_debug' failed
you can fix it by creating a soft link like this:
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java

Kernel Configuration - Nexus Platform join failed

I am doing kernel configuration for ICS. I needed to enable Posix message queue as it is required in one of our applications. But enabling this option resulted in error. The make was successfull. But the image could not be loaded. The dmesg was:-
disagrees about version of symbol module_layout.
init: untracked pid 2038 exited.
logcat :-
mknod : '/dev/nexus_proxy' failed
NEXUS_Platform_Join [CONSTRUCTOR] failed.
Looks like you rebuilt only the kernel.
You need to build any kernel-modules (*.ko files) and
update them onto the filesystem.
Here is a detailed discussion on the disagrees about version of symbol error.

Categories

Resources