compile vlc-android not working - iconv not found - android

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

Related

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?

Android NDK Cross Compile sys/signal.h: No such file or directory

I am compiling gdcm with cross compile but it gives following error for
sys/signal.h: No such file or directory ( NDK does not have that I know it)
but is there any alternative I can resolve that error for Cross compilation of library.
In file included from /home/kirtan.patel/Desktop/GDCMMob/Build/Utilities/socketxx/socket++/config.h:135:0,
from /home/kirtan.patel/Desktop/GDCMMob/GDCMSource/Utilities/socketxx/socket++/sockstream.h:22,
from /home/kirtan.patel/Desktop/GDCMMob/GDCMSource/Utilities/socketxx/socket++/sockstream.cpp:49:
/home/kirtan.patel/Desktop/GDCMMob/GDCMSource/Utilities/socketxx/socket++/local.h:40:24: fatal error: sys/signal.h: No such file or directory
#include <sys/signal.h>
^
compilation terminated.
make[2]: *** [Utilities/socketxx/socket++/CMakeFiles/socketxx.dir/sockstream.cpp.o] Error 1
make[1]: *** [Utilities/socketxx/socket++/CMakeFiles/socketxx.dir/all] Error 2
sys/signal.h is only available in latest Android NDK and under platforms above and equal to 21 (/android-ndk-r10e/platforms/android-21/arch-arm/usr/include/sys/signal.h).
I had this issue while building RTKLib and fixed this using latest Toolchain.
Thanks,
Himanshu

'elf.h' file not found error when compiling Android kernel for Nexus 7 on Mac OS X

When compiling Android kernel for Nexus 7 on Mountain Lion 10.8.4 I ran into fatal error: 'elf.h' file not found issue:
/Volumes/Android/WORKING_DIRECTORY/device/asus/grouper/tegra/
[derek#retina-mbp]$ make
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
scripts/mod/mk_elfconfig.c:4:10: fatal error: 'elf.h' file not found
#include <elf.h>
^
1 error generated.
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
Does anyone know how to fix this so that the kernel compilation can continue?
I'm answering my own question because I found workaround for the missing elf.h file:
cd /Volumes/Android/WORKING_DIRECTORY/external/elfutils/libelf/
$ sudo cp -a elf.h /usr/include
With a copy of 'elf.h' file now in /usr/include the compilation goes on for a while, but then stops again with a different error:
arch/arm/mach-tegra/sleep.S: Assembler messages:
arch/arm/mach-tegra/sleep.S:240: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [arch/arm/mach-tegra/sleep.o] Error 1
make: *** [arch/arm/mach-tegra] Error 2
Not sure what to do about this last error though.
UPDATE: I gave up on trying to compile Android kernel directly under OS X. Instead, I installed 64-bit Ubuntu on VirtualBox and followed instructions found on this page:
http://forum.xda-developers.com/showthread.php?t=1774035
Except that as I said, I used VirtualBox and not VMWare Player as the above page suggested. It worked great and I didn't have any problems with networking and was able to ssh into Ubuntu to easily move compiled kernel back to OS X.
I also referred to this page to get the right kernel source for my device (grouper), prebuilt gcc and syntax for the make command (make tegra3_android_defconfig):
http://source.android.com/source/building-kernels.html
I hope this answer will save someone some time.
if you are still interested, check this out http://algobardo.github.io/2014/10/Android-Kernel-MacOsX/ and let me know if it is reproducible on your system with your android version.

Configuration error of the GMP library for the android platform

I'm trying to compile GMP for android (arm) but I'm received a very strange error. First, I set up a few things as described another SO question here:
export NDKROOT=/prod/ndk
$NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 -- install-dir=$NDKROOT/android_armeabi
export CC="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-gcc --sysroot=$NDKROOT/android_armeabi/sysroot"
export CXX="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-g++ --sysroot=$NDKROOT/android_armeabi/sysroot"
export AR="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-ar"
export SYSROOT="$NDKROOT/android_armeabi/sysroot"
export PATH="$NDKROOT/android_armeabi/bin":$PATH
Then I simply run ./configure --enable-cxx --prefix=/local/to/where/i/want/to/install --host=arm-none-linux-gnueabi and configuration goes well, with the following being part of the output:
Version: GNU MP 5.1.1
Host type: arm-none-linux-gnueabi
ABI: standard
Install prefix: /location/to/where/i/want/to/install
Compiler: /prod/ndk/android_armeabi/bin/arm-linux-androideabi-gcc -- sysroot=/prod/ndk/android_armeabi/sysroot -std=gnu99
Static libraries: yes
Shared libraries: yes
Up to here it goes well, but when I run make, I receive the following error:
ismpf.cc: In function 'std::istream& operator>>(std::istream&, mpf_ptr)':
ismpf.cc:48:43: error: 'struct lconv' has no member named 'decimal_point'
make[2]: *** [ismpf.lo] Error 1
make[2]: Leaving directory `~/Downloads/gmp-5.1.1/cxx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/Downloads/gmp-5.1.1'
make: *** [all] Error 2
So my first problem is there. Any ideas?
Just out of curiosity, I tried to rerun the same exact configure command as above but using sudo ahead of it. After a few seconds I receive the following:
configure: error: Oops, mp_limb_t is 64 bits, but the assembler code
in this configuration expects 32 bits.
There is the second (and really weird problem that arises).
Just out of curiosity again, I tried to reboot and clear all the variables we created, and simply run the command that the GMP manual recommends:
./configure --prefix=/location/ --enable-cxx --host=arm-linux-androideabi
The ./configure runs, the make goes well, but all 9/9 tests fail when I do make check. Can anybody point me in the right direction with these errors, or about how to try and correctly compile GMP for android? Any help is immensely appreciated.
Unsetting the CFLAGS env var solved the problem for me.

"cannot open linker script file" when compiling GameKit for Android

When I built Gamekit for Android, I got the follow error:
...(deleted)
[ 98%] Built target OgreKitCore
Linking CXX executable ../../../bin/StripBlend
/usr/local/android-ndk-r8b/toolchains/mipsel-linux-android-4.6/prebuilt/linux-x86/bin/../lib/gcc/mipsel-linux-android/4.6.x-google/../../../../mipsel-linux-android/bin/ld: cannot open linker script file /usr/local/android-ndk/toolchains/mipsel-linux-android-4.6/mipself.x: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [../bin/StripBlend] Error 1
make[1]: *** [FileTools/Strip/CMakeFiles/StripBlend.dir/all] Error 2
make: *** [all] Error 2
I google it and found a related post:
https://groups.google.com/forum/#!msg/doubango/TVOUjTxfbtA/y6eaikfcTu0J
They just rollback NDK version to fix this problem.
However, I have to build an Android Gamekit library for MIPS CPU, so I need NDK-r8 or NDK-r8b.
Is there any suggestion to fix this problem?
PS: GameKit is http://code.google.com/p/gamekit/
Copy mipself.x and mipself.xsc, which can be downloaded from the Internet,
into /toolchains/mipsel-linux-android-4.6/ folder, and then fix this problem.

Categories

Resources