Error compiling iptables using cygwin on android - android

I am using my iptables source from https://code.google.com/p/iptables4n1/ because source from netfilter.org has issues compiling using cygwin.
When I run the ndk-build from my cmd(Am using windows) the build process runs smoothly until it throws an error. Below is the cmd output of the error.
C:/Users/Chike/Desktop/DevSec/android-ndk-r9b/toolchains/arm-linux-androideabi-4
.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../
arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/iptables/iptables-sta
ndalone.o: in function main:jni/iptables-standalone.c:62: error: undefined refer
ence to 'init_extensions'
collect2: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/iptables] Error 1
Anyone with solution?

Related

Error while compiling android source code android-6.0.1_r7

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

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:

Android Stand alone compiler getting openssl error

I tried to compile sofia-sip native library using Android NDK.
getting this error always:
/home/umn/android/android-ndk-r7c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld:
cannot find -lssl collect2: ld returned 1 exit status

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?

Need Help AOSP Build Error for snapdragon 8974

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).

Categories

Resources