getting this error while building Android ndk - android

jni/../external/libjpeg/jidctfst.S: Assembler messages:
jni/../external/libjpeg/jidctfst.S:66: Error: missing ')'
jni/../external/libjpeg/jidctfst.S:66: Error: garbage following instruction -- 'pld (r2,#0)'
jni/../external/libjpeg/jidctfst.S:259: Error: missing ')'
jni/../external/libjpeg/jidctfst.S:259: Error: garbage following instruction -- 'pld (sp,#32)'
jni/../external/libjpeg/jidctfst.S:271: Error: missing ')'
jni/../external/libjpeg/jidctfst.S:271: Error: garbage following instruction -- 'pld (ip,#32)'
make: *** [obj/local/armeabi/objs/jpeg/jidctfst.o] Error 1
can anyone help me with this to resolve this error msg?

Try changing the the parenthesis following the PLD instruction to brackets. That is, change
PLD (xx xx)
to
PLD [xx xx]

Uncomment the ANDROID_JPEG_NO_ASSEMBLER line of the Android.mk, it is like that:
# temp fix until we understand why this broke cnn.com
#ANDROID_JPEG_NO_ASSEMBLER := true
do that:
# temp fix until we understand why this broke cnn.com
ANDROID_JPEG_NO_ASSEMBLER := true

trying to compile Android on Windows with Cygwin it's a pain.
Follow the guides on XDA-Developers.com to compile android under Ubuntu Linux, its easy as in a Windows Cygwin Environment and it works fine :)

i have the same error and some solutions says change PLD from UPPERCASE to lowercase
e.g. from "PLD" to "pld" .

Related

Android NDK fails to compile Telegram project

Android NDK compile fails at
[arm64-v8a] Install : libtmessages.29.so => libs/arm64-v8a/libtmessages.29.so
[armeabi-v7a] SharedLibrary : libtmessages.29.so
jni/./ffmpeg/armv7-a/libavutil.a(mem.o): In function `av_malloc':
mem.c:(.text+0x60): undefined reference to `posix_memalign'
collect2.exe: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libtmessages.29.so] Error 1
Can anybody suggest me what's wrong with it.
I am using Android Studio 3.1.4.
NDK: android-ndk-r17c
Using Windows 7 32bit.
This happens while compiling on fresh download of Telegram source code from
git clone — recursive https://github.com/DrKLO/Telegram.git
First I thought this might be because of NDK, I tried with ndk-r16b with same error while ndk-r14b and r15b return
Android NDK: ERROR:jni/Android.mk:avutil: The LOCAL_SRC_FILES for a prebuilt library should only contain one item
G:/Softwares/android-ndk-r15c/build//../build/core/prebuilt-library.mk:28: *** missing separator. Stop.
If anybody has gone through this, please mention here what is the cause behind this and how we can do it.
Use ndk r16b.
Works fine with the latest changes at a724d96e
Found the answer here:
https://github.com/grishka/libtgvoip/issues/8#issuecomment-417647322

compile vlc-android not working - iconv not found

I am trying to compile vlc-android from source acording to this manual. AndroidCompile
I'm getting this error:
CC src/smb_utils.lo
src/smb_utils.c:32:19: fatal error: iconv.h: No such file or directory
#include <iconv.h>
^
compilation terminated.
make[1]: *** [src/smb_utils.lo] Error 1
And at the end this:
checking for iconv... no, consider installing GNU libiconv
configure: error: iconv() not found
make: *** [.zvbi] Error 1
contribs: make failed
The weird thing is that it workied fine yesterday.
Im using Linux Mint 17.2
Found the solution (workaround actually).
Problem is that android patch for iconv (contrib/src/iconv/libiconv-android-ios.patch) fails to apply. It is already applied in iconv version 1.14
Temporary workaround is to comment out patch applying for android. It is on line 26 of contrib/src/iconv/rules.mak

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

Android OpenCV shared library build error

When I build as static library, the source code builds well in Android JellyBean 4.1.2 using the mm command. But when I try to build the opencv folder under android/external/opencv as static library, with the following changes in android/external/opencv/Android.mk
+ LOCAL_SHARED_LIBRARIES+= libdl
and
- include $(BUILD_STATIC_LIBRARY)
+ include $(BUILD_SHARED_LIBRARY)
- LOCAL_STATIC_LIBRARIES := libcxcore libcv libcvaux libcvml libcvhighgui
+ LOCAL_SHARED_LIBRARIES := libcxcore libcv libcvaux libcvml libcvhighgui
I get the following error:
android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: internal error in thumb_branch_common, at /tmp/android-8532/src/build/../binutils/binutils-2.21/gold/arm.cc:4148
collect2: ld returned 1 exit status
make: *** [out/target/product/mydevice/obj/SHARED_LIBRARIES/libcxcore_intermediates/LINKED/libcxcore.so] Error 1
Any idea on how to fix this error?
Thanks in advance.
Regards,
Jai
,,, arm-linux-androideabi/bin/ld: internal error in thumb_branch_common,
at /tmp/android-8532/src/build/../binutils/binutils-2.21/gold/arm.cc:4148
collect2: ld returned 1 exit status
Any idea on how to fix this error?
In Binutils, file arm.cc, Line 4148 there was an Internal Error (in Binutils).
Try newer Binutils (or older) or fix the Bug and submit the Patch.
You can also switch to a different Toolchain (using a different Binutils) and
try that. Sometimes Compiler switches will alter the operation enough to avoid
the Bug.
There is a CHANCE that simply altering the order of the Function in the Source File
of the Code you are compiling (NOT gold/arm.cc, that is where the Compiler Bug is,
change YOUR Source) and that Binutils will read the newly ordered Code differently
and thus avoid the Binutils Bug.
It is also possible that the Code you are linking (the .o Files) was corrupted
either on Disk or by a Bug in the Compiler, or that it is for the wrong endian
(etc.) and that is not being detected.
PS: Thumb-2 Code (in the Compiler's Toolchain) is not Bug free (as you noticed).
See here for some People working on a fix:
http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/gold&id=b72f3238ad32ab420306a0226d8c2e57c52ddf45
... and this is what they came up with:
http://sourceware.org/bugzilla/attachment.cgi?id=6284&action=diff

Compiling LuaJit 2 for Android on mac. Assembler errors : lj_vm.s:5: Error: unknown pseudo-op: `.private_extern'

Please advise about building android LuaJit on mac or tips on resolving pseudo-op: '.private_extern' assembler errors in general.
I am on Mac and following instruction to complie LuaJit2 in doc/install or http://luajit.org/install.html#android :
The only change I made is to change linux-x86 to darwin-x86 to get NDK cross-compiler. I also added TARGET_SYS=Linux (I tried with and without) per installation notes: “Whenever the host OS and the target OS differ, you need to specify TARGET_SYS or you'll get assembler or linker errors…”
So my build script looks like this:
NDK=$ANDROID_NDK
NDKABI=8
NDKVER=$NDK/toolchains/arm-linux-androideabi-4.4.3
NDKP=$NDKVER/prebuilt/darwin-x86/bin/arm-linux-androideabi-
NDKF="--sysroot $NDK/platforms/android-$NDKABI/arch-arm"
make HOST_CC="gcc -m32" CROSS=$NDKP TARGET_SYS=Linux TARGET_FLAGS="$NDKF"
My $ANDROID_NDK points to r8b NDK. But I also tried r8 and r7, and I tried gcc 4.6 with r8b. In all cases I get similar errors.
==== Building LuaJIT 2.0.0-beta9 ====
make -C src
ASM lj_vm.o
lj_vm.s: Assembler messages:
lj_vm.s:5: Error: unknown pseudo-op: `.private_extern'
lj_vm.s:8: Error: unknown pseudo-op: `.private_extern'
lj_vm.s:25: Error: unknown pseudo-op: `.private_extern'
…
I'm not sure but I think when you tried to build first time without TARGET_SYS=Linux you forgot clean *.o files in src/host directory after unsuccessful build.
For this reason you have seen a lot of errors like: Error: unknown pseudo-op: '.private_extern'
To clean all generated and builded files run make clean
I was able to build LuaJIT 2.0.0-beta10 with no problems. The problem posted was when building beta9 or lower: looks like they patched whatever issue it was.

Categories

Resources