Android 4 ICS (AOSP) build error on Ubuntu 10.04 - android

I am trying to build Android 4.0.1_r1 on Ubuntu 10.04 64bit. I have followed all the steps as mentioned in the official build document before I initiated "make -j2" for a "full engineering" lunch type.
After 2 hours of compilation , I got this error :-
host Java: doclava (out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes)
Exception in thread "main" java.lang.RuntimeException: cts/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java: trouble reading
at com.android.dx.util.FileUtils.readFile(FileUtils.java:87)
at util.build.BuildDalvikSuite.parseTestMethod(BuildDalvikSuite.java:588)
at util.build.BuildDalvikSuite.handleTests(BuildDalvikSuite.java:303)
at util.build.BuildDalvikSuite.compose(BuildDalvikSuite.java:159)
at util.build.BuildDalvikSuite.main(BuildDalvikSuite.java:131)
Caused by: java.io.FileNotFoundException: cts/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:120)
at com.android.dx.util.FileUtils.readFile(FileUtils.java:75)
... 4 more
make: * [out/host/linux-x86/obj/EXECUTABLES/vm-tests-tf_intermediates/tests] Error 1
make: * Waiting for unfinished jobs....
Note: external/doclava/src/com/google/doclava/Stubs.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
After this above error , the build stops.
Modifications I did before the build are as follows :-
From /devices folder I removed Google , Samsung and Ti folder so that they are not included in the build.
In the /build/target/product/core.mk I removed the following apps - Browser, HTMLViewer, Contacts
Although I am a complete beginner in Android source development, I'm having this hunch that the modifications may not be the actual cause of the build failure and root cause lies somewhere else. I need some advice on this.

Related

recipe for target 'ninja_wrapper' failed / flex core dumps

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.

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.

Building Android 7 from sources: export_includes and import_includes related error

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.

Can't build streamer tutorial for android on mac

Can't build streamer tutorial_3 for android on mac
I,ve got all environment variables needed.
My eclipse can't to resolve some symbols, but to some of them i can get by pushing F3. It's very strange for me.
Here is the command line output:
23:04:06 **** Build of configuration Default for project Tutorial3 ****
/Users/antonivanuskin/android-develop/android-ndk-r10/ndk-build all
GStreamer : [GEN] => gst-build-armeabi/gstreamer_android.c
GStreamer : [COMPILE] => gst-build-armeabi/gstreamer_android.c
GStreamer : [LINK] => gst-build-armeabi/libgstreamer_android.so
lto1: fatal error: bytecode stream generated with LTO version 2.2 instead of the expected 3.0
compilation terminated.
lto-wrapper: /Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm- linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc returned 1 exit status
/Users/antonivanuskin/android-develop/android-ndk-r10/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [buildsharedlibrary_armeabi] Error 1
23:04:10 Build Finished (took 3s.740ms)*
I use ndk-10r and gst-1.4.0.
I know that there is no interfaces/xoverlay in new streamer.
EDIT
I've built ok, but steel got underlines of many glib-types and GST-macross. Here is a screenshot:
what is interesting that i have no underlined headers, for example: i've include pthread.h but have got underlined pthread_t and phtread_key_t....
i think that i have not install some general libraries on my mac, something like libc or what ever...may it couse this problem? The problem is that i can't run my app from eclipse. and for more: i use DS-5 CE IDE
This is most likely because we build the android 1.4.x cerbero packages with the r9d NDK.
You might want to use the r9d NDK until we provide binaries built with a more recent NDK (started some builds to see if everything goes through fine).

Error when building Android Studio Example

I'm running Ubuntu 12.04 LTS and get the following error when building the example Android Studio example:
Gradle: Execution failed for task ':MyApplication:mergeDebugResources'.
Error: Failed to run command:
/home/dean/android-studio/sdk/build-tools/android-4.3.1/aapt s -i /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/exploded-bundles/ComAndroidSupportAppcompatV71800.aar/res/drawable-xhdpi/abc_ic_search.png -o /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/res/all/debug/drawable-xhdpi/abc_ic_search.png
Error Code:
132
It looks like I'm missing some resource.
There seems to be an issue with aapt on some 32 bit systems. It throws an error 132 on app:processDebugResources which is when aapt is 'crunching' png files ready for inclusion in the apk package. You can see more details at https://code.google.com/p/android/issues/detail?id=75110
This agrees with your reported error - "aapt -s" is the command to crunch a single image file (in your case abc_ic_search.png).
Some people have reported that 'fixing' the offending png files (e.g. by opening in Gimp and saving) sorts the problem so that would be worth trying at least. There's clearly a deeper problem with aapt but that may get you going for now.
Also can you just say if you are indeed running on a 32 bit processor, and if so which one? You can use lscpu to find out.

Categories

Resources