Jami Android - error when build iconv lib - android

follow here https://github.com/savoirfairelinux/ring-project to build Jami android but I face this error when build client-android
libtool: link: rm -fr .libs/libiconv.a .libs/libiconv.la .libs/libiconv.lai libtool: link: ar cru .libs/libiconv.a objects/iconv.o objects/localcharset.o objects/relocatable.o
ar: u modifier ignored since D is the default (see U)
libtool: link: /home/tan111/devtools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib .libs/libiconv.a
libtool: link: ( cd ".libs" && rm -f "libiconv.la" && ln -s "../libiconv.la" "libiconv.la" )
cp .libs/libiconv.so preloadable_libiconv.so
cp: cannot stat .libs/libiconv.so': No such file or directory
make[2]: *** [Makefile:52: preloadable_libiconv.so] Error 1 make[2]: Leaving directory /home/tan111/jami/ring-project/daemon/contrib/native-aarch64-linux-android/iconv/preload
make[1]: *** [Makefile:49: install] Error 2 make[1]: Leaving directory /home/tan111/jami/ring-project/daemon/contrib/native-aarch64-linux-android/iconv
make: *** [/home/tan111/jami/ring-project/daemon/contrib/src/iconv/rules.mak:41: .iconv] Error 2
Does anyone facing it before? Please help me
Thank a lot!

try to set ar to the ndk, like this:
make AR=/home/tan111/devtools/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar -j4

Related

Can't build recovery image with AOSP 4.2.2

I am trying to build the recovery.img for AOSP 4.2.2 with the following commands:
cd myandroidsrc
source build/envsetup.sh
lunch
make recoveryimage -j8
But I keep running into the following error:
find: `src': No such file or directory
...
a lot of "PRODUCT_COPY_FILES /frameworkds/base/data/.. .ogg ignored" messages
...
cp -f /boot.img /device/myvendor/mydevice/boot/
cp: cannot stat `/boot.img': No such file or directory
make: *** [out/target/product/mydevice/boot.img] Error 1
make: *** Deleting file `out/target/product/mydevice/boot.img'
make: *** Waiting for unfinished jobs....
I also tried to build the boot image with:
make bootimage
But this also results in the same error like # the make recoveryimage call. Am I missing some make call here or is my file structure wrong ?
are you using prebuilt boot.img if yes check its path properly. cp -f /boot.img /device/myvendor/mydevice/boot/
As you can see above the root of device tree should have boot.img which is being copied.

How to setup Facebook Redex in order to optimize Android Bytecodes?

There is a very good instruction in Redex page at http://fbredex.com/.
I follow the instruction but I have problem in two steps.
1.I have no problem with run of first command (my OS is Ubuntu)
sudo apt-get install \
g++ \
automake \
autoconf \
autoconf-archive \
libtool \
libboost-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
libssl-dev \
libiberty-dev
I clone folly repo somewhere on my laptop
I go to the directory by $ cd android/projects/folly/folly/
I run git submodule update --init but nothing happens. I even run this command in $ cd android/projects/folly/ but nothing happens either.
I run autoreconf -ivf && ./configure && make && make install. Seems works as I see process takes around a minute or two and there are a lot og messages print out.
I copy/paste a sample .apk file to my Desktop and run redex ~/Desktop/my_android_app.apk -o ~/Desktop/my_android_app-redexed.apk. However, I'm getting this message on terminal.
No command 'redex' found, did you mean: Command 'redet' from package
'redet' (universe) redex: command not found
I ran above command when I am in /home/hesam/android/projects/folly/folly or /home/hesam/android/projects/folly/. But I get same output.
Update
I cloned Redex repo and followed Bert's Instruction. It works and I could see something is happening by running git submodule update --init. So thanks to Bert. However, I got error at the end of autoreconf -ivf && ./configure && make && make install command.
Please have a look at following output:
Making all in unit
make[3]: Entering directory `/home/hesam/android/projects/redex/test/unit'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/hesam/android/projects/redex/test/unit'
make[2]: Leaving directory `/home/hesam/android/projects/redex/test'
make[1]: Leaving directory `/home/hesam/android/projects/redex'
Making install in third-party/folly/folly
make[1]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
Making install in .
make[2]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[3]: Entering directory `/home/hesam/android/projects/redex/third-party/folly/folly'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ./libtool --mode=install /usr/bin/install -c libfolly.la libfollybenchmark.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libfolly.so.57.0.0 /usr/local/lib/libfolly.so.57.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libfolly.so.57.0.0': Permission denied
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/hesam/android/projects/redex/third-party/folly/folly'
make: *** [install-recursive] Error 1
hesam: redex (master) $ redex ~/Desktop/my_android_app.apk -o ~/Desktop/my_android_app-redexed.apk
No command 'redex' found, did you mean:
Command 'redet' from package 'redet' (universe)
redex: command not found
hesam: redex (master) $
You don't need to separately clone folly; it's included as a submodule of redex. Just do:
git clone https://github.com/facebook/redex.git
cd redex
git submodule update --init
and then configure/make according to the instructions.
there is a difference regard instructions you see in fbredex and what you see in Github redex page. Please follow what Github page says for make and install.
autoreconf -ivf && ./configure && make
sudo make install
Regard my above problem, A developer from Redex team called me and after few minutes he found and solved the problem. He has updated FAQ section on Redex page that you can see at here. Since there is no explanation there I copy/paste what he said on chat.
So, as an optimization, the runtime linker doesn't actually go
trawling through everything to look for libs anymore It uses the cache
file, which is generated by ldconfig
Update
I forgot to mention that you must have ANDROID_SDK in your PATH. I have following paths in my .profile. Don't forget to source it after making change in it. ~/android/sdk is path to my Android SDK directory.
export ANDROID_HOME=~/android/sdk
export ANDROID_SDK=${ANDROID_HOME}
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

ubuntu 15.10 64bit build Android source 5.0 version

How can I fix this problem?When I was building the Android source of 5.0 with
'make -j4', it was causing a problem.
This is the error log:
Install: out/host/linux-x86/bin/acp
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
prebuilts/misc/linux-x86/bison/bison -d -o out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/EventLogTags.java <= frameworks/base/core/java/android/content/EventLogTags.logtags
prebuilts/misc/linux-x86/bison/bison: m4 子进程失败
build/core/binary.mk:539: recipe for target 'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp' failed
make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 1
make: *** 正在等待未完成的任务....
frameworks/base/tools/aidl/aidl_language_l.l:55: warning, 无法匹配规则
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
build/core/binary.mk:576: recipe for target 'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp' failed
make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 1
make: *** Deleting file 'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp'
logtags: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech/tts/EventLogTags.java <= frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
In my case, I get similar error when build Marshmallow 6.0.1_r1 in Ubuntu 18.04.
If you get similar errors like this:
build/core/binary.mk:646: recipe for target 'out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp' failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Aborted (core dumped)
Look at the line carefully, it's a core dumped, so I use coredumpctl list, navigate to the end of list with G, then figure out the core dump executed path (right column) is prebuilts/misc/linux-x86/flex/flex-2.5.39
And the PREBUILT file shows:
xb#dnxb:~/my_android_src/prebuilts/misc/linux-x86/flex$ cat PREBUILT
The objects in this prebuilt directory can be rebuilt
using the source archive hosted at
http://sourceforge.net/projects/flex/files/
Commands:
./configure
make CFLAGS="-static" LDFLAGS="-static"
# (Disregard the errors at the end of the build)
rm flex
make CFLAGS="-static" LDFLAGS="-static" flex
# Copy the linker command line, replace it with static libm.a
gcc -static -static -o flex ccl.o dfa.o ecs.o scanflags.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o tables_shared.o filter.o regex.o /usr/lib/x86_64-linux-gnu/libm.a
xb#dnxb:~/my_android_src/prebuilts/misc/linux-x86/flex$
That's it, the first 2 lines said that you probably need to rebuild yourself if something went wrong since this flex-2.5.39 binary is prebuilt in another platform.
So simply untar the flex-2.5.39.tar.gz of this directory, go to the extracted flex-2.5.39 directory, then follows the PREBUILT instruction above.
In short, you need to do the following steps:
cd <ANDROID_TREE_DIR>/prebuilts/misc/linux-x86/flex
tar -zxvf flex-2.5.39.tar.gz
cd flex-2.5.39
make CFLAGS="-static" LDFLAGS="-static"
rm flex
make CFLAGS="-static" LDFLAGS="-static" flex
/bin/bash ./libtool --tag=CC --mode=link gcc -static -static -o flex ccl.o dfa.o ecs.o scanflags.o gen.o main.o misc.o nfa.o parse.o scan.o skel.o sym.o tblcmp.o yylex.o options.o scanopt.o buf.o tables.o tables_shared.o filter.o regex.o lib/libcompat.la /usr/lib/x86_64-linux-gnu/libm.a
cd ..
cp flex-2.5.39/flex .
mv flex flex-2.5.39
ls -la
flex-2.5.39 #### <<- YOUR new generated file
flex-2.5.39.tar.gz
MODULE_LICENSE_BSD_LIKE
NOTICE
PREBUILT
Now try to do make <module> -j4 again, no longer abort on such error.
p/s: Alternative way will be LANG=C make pm -j4 if you see something like LC_* error message.
p/s2: I also need symlink ld as below to fixed 'out/host/linux-x86/obj/lib/libart.so' failed and error: unsupported reloc 42:
xb#dnxb:~/my_android_src$ cp prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld ../ld_bk #backup android source's ld first
xb#dnxb:~/my_android_src$ rm prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld #remove android source's ld
xb#dnxb:~/my_android_src$ ln -s /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/bin/ld #create symlink for android source's ld to system's ld.gold
Check carefully you have all the required packages installed https://source.android.com/source/initializing.html

mipsel-linux-gcc: Command not found

I'm trying to cross-compile a kernel and rootfs using mipsel-linux-gcc compiler. Host machine is 64-bit, while the rootfs to be built is 32-bit.i tried to install ia32-libs and ia32-libs-multiarch. But failed. I've installed gcc-multilib using apt-get. However, I can't build. I've updated PATH variable to the toolchain used.
echo $PATH
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/toolchains/stbgcc-4.5.3-1.1/bin
Error I get :
root#android-build:uclinux-rootfs# make vmlinuz-7425b0-android
make TFTPHOST=android-build TFTPDIR=/tftpboot/$USER TFTPPATH=$USER defaults-7425b0-android
make[1]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin
The recommended toolchain for this release is:
stbgcc-4.5.3-2.4
perl -w bin/config.pl save_defaults 7425b0-android
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile savedefconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -j1 silentoldconfig
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin
The recommended toolchain for this release is:
stbgcc-4.5.3-2.4
make -C linux ARCH=mips silentoldconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile silentoldconfig
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --silentoldconfig Kconfig
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -C linux ARCH=mips prepare scripts
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile prepare
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
make[4]: mipsel-linux-gcc: Command not found
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC kernel/bounds.s
/bin/sh: mipsel-linux-gcc: not found
make[5]: *** [kernel/bounds.s] Error 127
make[4]: *** [prepare0] Error 2
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: *** [prepare] Error 2
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: *** [silentoldconfig] Error 2
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make[1]: *** [defaults-7425b0-android] Error 2
make[1]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make: *** [vmlinuz-7425b0-android] Error 2
But what I get for which mipsel-linux-gcc gave the right answer
which mipsel-linux-uclibc-gcc
/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc
What could be the variable I need to export?
I had that 'command not found' problem. Try to install ia32-libs or if that is not found try suggested lib32z1 lib32ncurses5 lib32bz2-1.0 packages. That fixed the problem for me.

configure sphinxbase or pocketsphinx for android in ubuntu

I need to implement speech to text offline functionality for my android apps, I found library sphinxbase i tried to installed in ubuntu but something went wrong and the error occured.
I have download the both package of sphinxbase and pockectsphinx and placed in same directory , As document says i ran ./autogen.sh file successfuly after this one message occur to run make command to compile packages after make command there is some error occur
libtool: install: /usr/bin/install -c .libs/libsphinxbase.a /usr/local/lib/libsphinxbase.a
libtool: install: chmod 644 /usr/local/lib/libsphinxbase.a
libtool: install: ranlib /usr/local/lib/libsphinxbase.a/bin/bash: /home/speech: No such file or directory
make[4]: *** [install-libLTLIBRARIES] Error 127
make[4]: Leaving directory `/home/speech to text/Untitled Folder/sphinxbase/src/libsphinxbase'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/speech to text/Untitled Folder/sphinxbase/src/libsphinxbase'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/speech to text/Untitled Folder/sphinxbase/src/libsphinxbase'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/speech to text/Untitled Folder/sphinxbase/src'
make: *** [install-recursive] Error 1
Strip off the space in the directory name.
Try renaming "speech to text" to "speechtotext".

Categories

Resources