Hello I have latest ubuntu 16.0.4,I am following this tutorial for compiling android source code source code for android but I am getting this error
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj32/lib/libart.so' failed
make: *** [out/host/linux-x86/obj32/lib/libart.so] Error 1
I refered this link but not luck
I have attached the screenshot where I am getting stuck
Related
I have successfully till TARGET_ABI https://trac.pjsip.org/repos/wiki/Getting-Started/Android.
When I tried to build sample Application, I am having following errors.
/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android
/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:165: recipe for target 'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed
make[1]: ** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1
make[1]: Leaving directory '/Documents/PjsipSample/pjproject-2.9/pjsip-apps/src/swig/java'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 1
I am not able to build *.so files.
Swig Version : 3.0.12
Ndk: r13
Ubuntu: 18.04
Can anyone help me with this?
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:
I have compiled my android source code with following steps,
Added device tree for rpi2 in device folder
then compiled with following command
source build/envsetup.sh
lunch (selected rpi2 in the list displayed)
make -j4
but I am getting the following error when I compile it
target Strip: libwebviewchromium (out/target/product/generic/obj/lib/libwebviewchromium.so)
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-strip:out/target/product/generic/symbols/system/lib/libwebviewchromium.so: File format not recognized
make: *** [out/target/product/generic/obj/lib/libwebviewchromium.so] Error 1
Kindly help.
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?
Sorry I may added it as another topic but I get a different error. Now I have the dependencies installed from the repository. I'm trying to build for Android.
I use Mingw32
now I get the following error:
[armeabi-v7a] SharedLibrary : libOgreSampleBrowser.so
C:/ogre/AndroidDependencies/lib/armeabi-v7a/libFreeImage.a(libraw_datastream.c
.o):libraw_datastream.cpp:function LibRaw_bigfile_datastream::get_char(): erro
undefined reference to '__srget'
collect2.exe: error: ld returned 1 exit status
make.exe[3]: *** [obj/local/armeabi-v7a/libOgreSampleBrowser.so] Error 1
Samples\Browser\CMakeFiles\SampleBrowserDummy.dir\build.make:84: recipe for ta
et 'lib/libSampleBrowserDummy.so' failed
mingw32-make[2]: *** [lib/libSampleBrowserDummy.so] Error 2
CMakeFiles\Makefile2:3749: recipe for target 'Samples/Browser/CMakeFiles/Sampl
rowserDummy.dir/all' failed
mingw32-make[1]: *** [Samples/Browser/CMakeFiles/SampleBrowserDummy.dir/all] E
or 2
Makefile:136: recipe for target 'all' failed
I encountered the same error...
Google removed __srget starting from NDKr10c (check their official site in other fixed bugs).
Download r10b and below and it should work.