Need Help AOSP Build Error for snapdragon 8974 - android

I'm trying to build Android 5.0 source code from code-aurora for snapdragon 8074. Encountered the following error:
target SharedLib: libandroid_runtime (out/target/product/msm8974/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so)
frameworks/base/core/jni/android/graphics/Paint.cpp:809: error: undefined reference to 'android::uirenderer::Blur::convertRadiusToSigma(float)'
collect2: error: ld returned 1 exit status
make: *** [out/target/product/msm8974/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so] Error 1
#### make failed to build some targets (06:19:52 (hh:mm:ss)) ####
And I had downloaded the source code mentioned for the snapdragon8074.
I ran the following commands to build
$ source build/envsetup.sh
$ lunch msm8974-userdebug
$ make
Can anyone kindly help with the issue?
Thanks

You need to add USE_OPENGL_RENDERER := true to your BoardConfig.mk (in your case this file is under device/qcom/msm8974).
This is so because on modern builds of Android hardware accelerated graphics are pretty much mandatory. See here.
As a side note, for Code Aurora you should be using choosecombo instead of lunch (in your case choosecombo 1 msm8974 2).

Related

Missing 'libaudiopolicyservice_intermediates" when trying to compile AOSP 7.1.1 release 6?

ninja: error: 'out/target/product/victara/obj/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/export_includes', needed by 'out/target/product/victara/obj/SHARED_LIBRARIES/libaudiopolicyservice_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (04:02 (mm:ss)) ####
I got this error when compiling AOSP for victara (Moto X 2nd generation)... Anyone know how to fix ?
I'm using this local manifest: https://github.com/renanmarcs/local_manifests/blob/master/local.xml
And this is how I started to compile:
cd ~/aosp
repo sync
source build/envsetup.sh
lunch aosp_victara-userdebug
make -j2
SOLVED: I've changed "USE_CUSTOM_AUDIO_POLICY" in "BoardConfig.mk" to "0" for disable this option.
Do you have the common folder within qcom folder ?
If no then get the device/qcom/common folder from cm.
Add this line to your local_manifest.xml
Hope this helps.

pjsip 2.5.5 build error

I'm trying to build pjsip for android with NDK r13b.
Standard build like ./configure-android --with-opus=/home/user/pjsip/pjproject/opus-dev-lib works perfect. But i need several TARGET_ABI and all my tries to do it ends with configure-android error: compiler not found, please check environment settings (TARGET_ABI, etc)
Commands as
TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags --with-opus=/home/user/pjsip/pjproject/opus-dev-lib
TARGET_ABI=armeabi-v7a APP_PLATFORM=android-21 ./configure-android --use-ndk-cflags --with-opus=/home/user/pjsip/pjproject/opus-dev-lib
return the same error.
I'm search a lot of links but no result.
I know that error is in configure-android file and throwing by
if test "x${CC}" = "x" || test ! -e ${CC}; then
echo "$F error: compiler not found, please check environment
settings (TARGET_ABI, etc)"
exit 1
fi
But i have no idea how to solve it.
Thanks in advance.
So, i'm finished with build.
Using Alex Gotev build and modify config.conf, prepare-build-system and build for needed configuration and latest pjsip source.
Also i had to use latest libyuv from googlesource and NDK r10e.
UPDATED
Using android-ndk-r13 or later use NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags. At the moment it's able to build pjsip 2.6

Setup Qt environment for android development

I've heard a lot about Qt so I wanted to give it a try. Unfortunately I ran into a problem at the start..
First of all I set up the environment according to the offical qt guide: http://doc.qt.io/qt-5/androidgs.html
When I trying to build the "cellphone" example which is found on the Welcome page, I'm getting this error which helps me nearly nothing:
:-1: error: [qrc_cellphone.cpp] Error 1
This is the compile output:
20:23:41: Running steps for project cellphone...
20:23:41: Configuration unchanged, skipping qmake step.
20:23:41: Starting: "/usr/bin/make"
/opt/Qt/5.6/android_armv7/bin/rcc -name cellphone ../cellphone/cellphone.qrc -o qrc_cellphone.cpp
RCC: Error in '../cellphone/cellphone.qrc': Cannot find file '../../3rdparty/three.js'
Makefile:509: recipe for target 'qrc_cellphone.cpp' failed
make: *** [qrc_cellphone.cpp] Error 1
20:23:42: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project cellphone (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Make"
20:23:42: Elapsed time: 00:00.
When I trying to create and build Qt Quick application I'm getting these two errors:
:-1: error: cannot find -lGL
:-1: error: collect2: error: ld returned 1 exit status
For this one the compile output:
20:26:01: Running steps for project QtQuickTest...
20:26:01: Configuration unchanged, skipping qmake step.
20:26:01: Starting: "/usr/bin/make"
g++ -Wl,-z,origin -Wl,-rpath,\$ORIGIN -Wl,-rpath,/opt/Qt/5.6/gcc_64/lib -o QtQuickTest main.o qrc_qml.o -L/opt/Qt/5.6/gcc_64/lib -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
Makefile:198: recipe for target 'QtQuickTest' failed
collect2: error: ld returned 1 exit status
make: *** [QtQuickTest] Error 1
20:26:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project QtQuickTest (kit: Desktop Qt 5.6.0 GCC 64bit)
When executing step "Make"
20:26:01: Elapsed time: 00:00.
My os is kubuntu if it matters. What did I miss?
Thanks in advance!
Edit after user12345's answer:
Now at least the Quick project works for desktop. But I'm getting this error message when I'm trying to build for android:
BUILD FAILED
/home/nandor/Programs/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:
/home/nandor/Programs/android-sdk-linux/tools/ant/build.xml:694: null returned: 1
Total time: 0 seconds
Building the android package failed!
-- For more information, run this command with --verbose.
16:28:36: The process "/opt/Qt/5.6/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project QtQuickTest (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.0))
When executing step "Build Android APK"
However the cellphone built in example still giving the same error message. I don't know where should I get or find that ../../3rdparty/three.js file and why this isn't included in the project. Anyway I guess it's not related to the main question I guess however I'm happy if you can answer. :)
Edit 2:
These are the 648-650 lines in the build.xml:
<do-only-if-manifest-hasCode
elseText="hasCode = false. Skipping aidl/renderscript/R.java">
<echo level="info">Handling aidl files...</echo>
And 694:
proguardFile="${out.absolute.dir}/proguard.txt">
I feel we need to go step by step and try to resolve the errors that you are observing. I see that you are using the Qt 5.6.0, I will suggest you to update your Mesa Package on your Ubuntu machine by executing the below command:
sudo apt-get install libgl1-mesa-dev
This should resolve the sort of errors like below that you are observing:
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
The process "/usr/bin/make" exited with code 2.
After that try to clean and rebuild the desktop version, and see what you find.
Coming to your Android Build error:
My Guess will be that you might have set build settings of your android kit wrongly. I will suggest you to change the Android build SDK to android-23 as shown in the attached picture below:

Issue compiling Android 6.0 using Jack Server

I never had a problem compiling the AOSP version until 5.x. Now I'm trying to compile Android 6.0, which switched toolchain and uses Jack (Java Android Compiler Kit) but the compilation aborts.
The error seems to be related with a problem in compiling C object files, so the ld linker at some point starts producing file is empty errors such as the following one:
host SharedLib: libart (out/host/linux-x86/obj/lib/libart.so)
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld: error: out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/check_jni.o: file is empty
When I check these files their size is 0 bytes. I tried the process two times before writing this, but every time the make process stops with the follosing error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [out/host/linux-x86/obj/lib/libart.so] Error 1
Have you experienced something like this and found a solution?

Building AOSP 5.1.51 with Ubuntu 14.04

Im trying to build AOSP 5.1.51, I machine meets requirements
Following the instructions but the make -j4 never build succesfully.
Recently trying to lunch aosp_mips-eng terminates with
target C++: v8_tools_gyp_v8_base_gyp <= external/chromium_org/v8/src/mips/lithium-mips.cc
In file included from external/chromium_org/v8/src/mips/lithium-codegen-mips.h:11:0, from external/chromium_org/v8/src/mips/lithium-codegen-mips.cc:36:
external/chromium_org/v8/src/mips/lithium-mips.h: In member function 'bool v8::internal::LCodeGen::GeneratePrologue()':
external/chromium_org/v8/src/mips/lithium-mips.h:2718:7: internal compiler error: Segmentation fault
class LChunkBuilder FINAL : public LChunkBuilderBase {
^
Please submit a full bug report, with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/userAndroid/Builds/AOSP/target/product/generic_mips/obj/STATIC_LIBRARIES/v8_tools_gyp_v8_base_gyp_intermediates/v8/src/mips/lithium-codegen-mips.o] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (21:29 (mm:ss)) ####
And it ends there :(
After so many tries, I ended up removing the entire source repo, fetch everything and build. Now everything works way better than before. I have not read everything to see if its the introduction of jackor things are better with the latest branch of android source.
If you are struggling with your build, this could be the way to go.

Categories

Resources