Errors when building AOSP using -make - android

I am trying to setup an environment to build android and run it on an emulator. I've gotten into AOSP very recently and currently reading a few books about it. Wanting to mess around with it myself I got the following error:
external/libcxx/include/cmath:1345:9: error: no member named 'llrint' in the global namespace; did you mean 'lrint'?
external/libcxx/include/cmath:1348:91: error: use of undeclared identifier 'llrintf'
external/libcxx/include/cmath:1349:91: error: use of undeclared identifier 'llrintl'
external/libcxx/include/cmath:1358:9: error: no member named 'llround' in the global namespace; did you mean 'lround'?
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/hash.o] Error 1
make: *** Waiting for unfinished jobs....
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/debug.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/random.o] Error 1
12 errors generated.
make: *** [out/host/darwin-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/src/algorithm.o] Error 1
In total twelve of these errors, with text in between but I haven't copied them all because they are quite the same. (all of them are: error no member named "{double L}[SOMETHING]"; did you mean: {single L}[SOMETHING])
This is the result of running: 1: source build/envsetup.sh 2: lunch 3: sudo make -j4
I am using El Capitan and have followed the official instructions. The only problem I encountered was that XCode didn't create a /developer/SDKs folder with the proper SDK in it so I manually downloaded the SDK from Github and put it in de SDKs folder (which I made). Is it possible that this is the problem?
The code that I am trying to build is un-modified android 6.0.1_r1. I tried running repo-init and repo sync again (to maybe fix the code) but with no effect.
I realise it's quite a stretch to ask, but I have no clue how to fix this. Thanks in advance.

you can try to use MacOSX10.11.sdk as your MacOSX-SDK
you can download MacOSX10.11.sdk from GitHub: https://github.com/phracker/MacOSX-SDKs
copy the MacOSX10.11.sdk to a particular path(such as ~/lib) and create a soft link to /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
$ ln -s ~/lib/MacOSX10.11.sdk /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
(I also copy the MacOSX10.11.sdk to /Developer/SDKs/)
and modify the file int android source code: build/core/combo/mac_version.mk
mac_sdk_versions_supported := 10.9 10.10 10.11
done!
try to compile the source code again!
OS: macOS Sierra 10.12
Android Source Code: android6.0.1_r1C
XCode: Version 8.2.1
JDK: java version "1.8.0_101"

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!

How to solve this error Lineage 14.1 buld for morotola moto c

I tried building LOS14.1 from sources using this tutorial, but I encountered a problem. When the build starts, the following error appears:
device/motorola/namath/wpa_supplicant_8_lib/Android.mk:22: build BASIC wpa_supplicant
find: '/home/serveruser/hdd1/archive/motoc_lineage_14.1/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates': No such file or directory
build/core/base_rules.mk:183: *** vendor/motorola/namath: MODULE.TARGET.STATIC_LIBRARIES.libstagefright_color_conversion already defined by frameworks/av/media/libstagefright/colorconversion.
build/core/ninja.mk:166: recipe for target '/home/serveruser/hdd1/archive/motoc_lineage_14.1/out/build-lineage_namath.ninja' failed
make: *** [/home/serveruser/hdd1/archive/motoc_lineage_14.1/out/build-lineage_namath.ninja] Error 1
I already tried stuff like export LC_ALL=C, but it didn't help...
I used the wrong device branch (GitHub). =)

cm12 build for one plus failed

I am trying to build cm12 for One Plus. But I get the following error and the build process stops. I checked CM12 build failed for oneplus one also. Can anyone please help? I used
1). build/envsetup.sh
2)brunch bacon
make[1]: Entering directory '/home/xyz/Codes/CM12/kernel/oneplus/msm8974'
make: *** No rule to make target '/home/xyz/Codes/CM12/out/host/linux-x86/bin/dtbToolCM', needed by '/home/xyz/Codes/CM12/out/target/product/bacon/dt.img'. Stop.
Got the answer from XDA. Need to get device/qcom/common by cloning https://github.com/CyanogenMod/android_device_qcom_common .
This link helped me
Link To XDA answer

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 while Building Android Source on Ubuntu12.04 in VMware

I have built the android develop environment and downloaded the android4.1-cts source code from the android develop website.But there is an error while building the source code as follows:
host Java:ddmlib-tests (out/host/common/obj/JAVA_LIBRARIES/ddmlib- tests_intermediates/classes)
host Java: swtmenubar (out/host/common/obj/JAVA_LIBRARIES/swtmenubar_intermediates/classes)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Vector.<init>(Vector.java:111)
at java.util.Vector.<init>(Vector.java:124)
at org.antlr.analysis.DFA.createTransitionTableEntryForState(DFA.java:551)
at org.antlr.analysis.DFA.createStateTables(DFA.java:440)
at org.antlr.codegen.CodeGenerator.genLookaheadDecision(CodeGenerator.java:645)
at org.antlr.grammar.v3.CodeGenTreeWalker.block(CodeGenTreeWalker.java:2876)
at org.antlr.grammar.v3.CodeGenTreeWalker.rule(CodeGenTreeWalker.java:2382)
at org.antlr.grammar.v3.CodeGenTreeWalker.rules(CodeGenTreeWalker.java:1537)
at org.antlr.grammar.v3.CodeGenTreeWalker.grammarSpec(CodeGenTreeWalker.java:1441)
at org.antlr.grammar.v3.CodeGenTreeWalker.grammar_(CodeGenTreeWalker.java:461)
at org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:421)
at org.antlr.Tool.generateRecognizer(Tool.java:655)
at org.antlr.Tool.process(Tool.java:468)
at org.antlr.Tool.main(Tool.java:93)
make: *** [out/host/common/obj/JAVA_LIBRARIES/smali_intermediates/smaliLexer.java] Error 1
make: *** Waiting for unfinished jobs....
I have found some solutions, such as changing java -Xms16m -Xmx1024m, but it does not work either.
What can I do?
Thanks!
You are having memory issues. Try make -j1 to build the code
I have found the solution: find the external/smali/smali/android.mk
change add -Xm1024m to $(GEN): PRIVATE_CUSTOM_TOOL = java -jar $(ANTLR_JAR) -fo $(dir $#) $<.

Categories

Resources