Android error while building the Alexa auto SDK - android

I am trying to build the Alexa auto sdk in Mac OS High Sierra. I am able to successfully build the docker environment required on Mac for the Alexa Auto SDK Builder. While installing the NDK I am getting the following error in terminal `
*******************
*** Docker Mode ***
*******************
NOTE: Run Docker image...
NOTE: SDK Version: 1.2.0
NOTE: Start building for androidarm...
NOTE: Android toolchains will be installed: /workdir/android
NOTE: Checking Android toolchain installation (armeabi-v7a/22)...
NOTE: Installing NDK (android-ndk-r16b)...
NOTE: Downloading file android-ndk-r16b-linux-x86_64.zip
--2018-10-31 05:39:02-- https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
Resolving dl.google.com (dl.google.com)... 216.58.203.142, 2404:6800:4009:802::200e
Connecting to dl.google.com (dl.google.com)|216.58.203.142|:443... connected.
ERROR: cannot verify dl.google.com's certificate, issued by ‘CN=192.168.86.1’:
Self-signed certificate encountered.
To connect to dl.google.com insecurely, use `--no-check-certificate'.
ERROR: Android toolchain setup failed
I tried wget --no-check-certificate https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip `
and downloaded the NDK but the issue is still persisting. Please help as I am stuck.

We have downloaded Alexa-auto-SDK 1.6.
we used the following steps below. Please update docker, my case everything fine working.
mac$ ./builder/build.sh oe -t androidarm --android-api 26
*******************************************************************************
The scripts provided herein will retrieve several third-party libraries,
environments, and/or other software packages at build-time
("External Dependencies") from third-party sources. These are terms and
conditions that you need to agree to abide by if you choose to build the
External Dependencies. Licenses for the External Dependencies may be found at
builder/README.md. If you do not agree with every term and condition
associated with the External Dependencies, enter “QUIT” in the command line
when prompted by the script.
*******************************************************************************
Type "QUIT" to exit the script now, press ENTER to continue:
\e[1mNOTE\e[0m: Builder only runs within Docker with macOS host
\e[1mNOTE\e[0m: Switching to Docker mode...
*******************
*** Docker Mode ***
*******************
+++ dirname /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts/run-docker.sh
++ cd /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts
++ pwd
+ THISDIR=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts
+ source /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/scripts/common.sh
++ '[' -z /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder ']'
+ VM_HOME=/home/builder
+ IMAGE_REVISION=20190128
+ IMAGE_NAME=aac/ubuntu-base:20190128
+ VOLUME_NAME=buildervolume
+ VOLUME_MOUNT_POINT=/workdir
+ [[ '' != \1 ]]
+ TTY=-t
+ EXTRA_OPTIONS=
+ '[' '!' -z ']'
++ docker images -q aac/ubuntu-base:20190128
+ [[ aad39b28847b == '' ]]
++ docker volume ls
++ grep buildervolume
+ [[ local buildervolume == '' ]]
+ note 'Run Docker image...'
+ echo -e '\e[1mNOTE\e[0m: Run Docker image...'
\e[1mNOTE\e[0m: Run Docker image...
+ execute_command aac/builder/build.sh oe -t androidarm --android-api 26
+ docker run -i -t --rm -v buildervolume:/workdir -v /Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/..:/home/builder/aac -e ANDROID_TOOLCHAIN=/workdir/android -e AGL_SDK_BASE=/workdir/agl-sdk -e HOST_PWD=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk -e HOST_SDK_HOME=/Users/mac/MetroProject/Android1.5/alexa-auto-sdk/builder/.. aac/ubuntu-base:20190128 aac/builder/build.sh oe -t androidarm --android-api 26
NOTE: SDK Version: 1.6.0-00002-gb9ee08f-dirty
NOTE: Start building for androidarm...
NOTE: Android toolchains will be installed: /workdir/android
NOTE: Checking Android toolchain installation (armeabi-v7a/26)...
NOTE: Using BUILD_DIR=/workdir/build
Welcome to Alexa Auto Builder!
.c;.
.lKx.
':loooooc' .:c' .c:. .;lkKOocc:. .;looooc,.
.:lc;;;:d00l. ,OKc cK0; 'coOKOocc:. .lOOd:;;cxOk:.
.oKk' ,OKc :0O; .dKx. .oKO; .l00:
.;:::;:dKk' ,OKc :0O; .dKx. ,kKo. 'kKd.
'dOxlc::lkKk' ,OKc :0O; .dKx. ,OKo. .xKd.
.dKk' .lKk' ,OKl. cKO; .dKx. .dKk' :00c
.oKOc...,lkKk' .xKOc'.';cxKO; .oKOl,,,. 'd0kc,..,lO0l.
.:dxxdol;:ol. 'lxkxdol;;lo' .:dxxdo' .;ldxxxxdc'
... ... ....
......
... .',,,;;cc:.
.',,.. .. 'c:.
..,::;,... ...,;;. 'c,
..,:ccc:;,''...... .....'',;:cc;,.. .:,
..',:ccllllcccc:::::::ccccllllc:;'.. ..
...',,;;::::::::;;;,'....
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 1299 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Multiple providers are available for virtual/nativesdk-libintl (nativesdk-gettext, nativesdk-glibc)
Consider defining a PREFERRED_PROVIDER entry to match virtual/nativesdk-libintl
Build Configuration:
BB_VERSION = "1.36.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-16.04"
TARGET_SYS = "arm-linux-androideabi"
MACHINE = "androidarm"
DISTRO = "aac"
DISTRO_VERSION = "1.6.0"
TUNE_FEATURES = "arm armv7a vfp thumb callconvention-hard"
TARGET_FPU = "hard"
meta-aac-ubuntu = "1.6:b9ee08ff5e9a88e1554d1d90f3e368d92cd302cf"
meta = "HEAD:1b18cdf6b8bdb00ff5df165b9ac7bc2b10c87d57"
meta-aac
meta-aac-builder = "1.6:b9ee08ff5e9a88e1554d1d90f3e368d92cd302cf"
Initialising tasks: 100% |#######################################| Time: 0:00:03
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 553 tasks of which 417 didn't need to be rerun and all succeeded.
Thank you

Related

I have accidentally uninstalled jack server while building Android AOSP

I am building the Android code for Android Go on my ubuntu 14.04 machine.
While building I got some problems with jack server and I ended up uninstalling the jack server (accidentally).
How do I install the Jack Server again ?
I have tried to install the jack server using the following command:
jack-admin install-server jack-launcher.jar jack-server-4.11.ALPHA.jar
However, I get an error:
Jack server installation not found
Kindly help how do I install Jack Server again.
I have also followed guides from Google Search Result but it has not helped so far.
Update -1
After trying the answer from #gaoc I get the following error each time I try to make the build. :
[ 0% 19/82490] Ensuring Jack server is installed and started
FAILED: setup-jack-server
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )"
Jack server already installed in "/home/c_sganig/.jack-server"
Communication error with Jack server (3), try 'jack-diagnose' or see Jack server log
Communication error with Jack server 3. Try 'jack-diagnose'
Communication error with Jack server 3. Try 'jack-diagnose'
[ 0% 34/82490] build out/target/product/msm8909go/emmc_appsboot.mbn
make: Entering directory `/home/c_sganig/code/LA.UM.6.7.r1/bootable/bootloader/lk'
including app/aboot dev/fbcon dev/gcdb/display dev/keys dev/pmic/pm8x41 dev/pmic/pmi8994 dev/qpnp_haptic dev/vib lib/debug lib/heap lib/libc lib/libfdt lib/openssl lib/ptable
including lib/openssl/crypto lib/zlib_inflate
make[1]: Entering directory `/home/c_sganig/code/LA.UM.6.7.r1/bootable/bootloader/lk'
generating ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/config.h
generating ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/system-onesegment.ld
linking ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /home/c_sganig/code/LA.UM.6.7.r1/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(bpabi.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /home/c_sganig/code/LA.UM.6.7.r1/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(_divdi3.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-ld: warning: /home/c_sganig/code/LA.UM.6.7.r1/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/../lib/gcc/arm-eabi/4.8/libgcc.a(_udivdi3.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
generating image: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.bin
generating listing: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.lst
generating symbols: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.sym
generating listing: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.debug.lst
text data bss dec hex filename
367924 200272 202520 770716 bc29c ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk
../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-objcopy -O binary ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.bin
generating size map: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk.size
generating stripped elf: ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk_s.elf
cp -f ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/build-msm8909/lk_s.elf ../../../out/target/product/msm8909go/obj/EMMC_BOOTLOADER_OBJ/../../emmc_appsboot.mbn
make[1]: Leaving directory `/home/c_sganig/code/LA.UM.6.7.r1/bootable/bootloader/lk'
make: Leaving directory `/home/c_sganig/code/LA.UM.6.7.r1/bootable/bootloader/lk'
ninja: build stopped: subcommand failed.
11:47:18 ninja failed with: exit status 1
#### failed to build some targets (45 seconds) ####
Show the list of removed packages:
$ awk '$3 == "remove" { print $1, $2, $4 }' /var/log/dpkg.log | tee list
If you can find the removed package in the list, then reinstall:
$ sudo apt-get install --reinstall nameofpackage
Following is the solution that helped me with jack server issue:
Delete ~/.jack-server directory and ~/.jack.settings file. This will be recreated when we run make command, so nothing to worry about that.
Sync repo again using this command (takes about 30-40 minutes):
repo sync -c --no-clone-bundle --no-tags -j4
This -c option with sync command will tell the git about branch you really need instead of all repositories. -jn (-j4 in my case) , here n refers to the number of threads you want.
Now build environment , lunch and make as usual.
I will also share another link to Google Group which has some significant information regarding this issue. : https://issuetracker.google.com/issues/37070263

Invalid syntax zipfile(apkAbsPath) in line 202 ninjadroid.py

I cloned ninjadroid from https://github.com/rovellipaolo/NinjaDroid recently and followed the instructions for decompiling apk files. As instructed I have installed android sdk and python, but when I tried running the command in my command prompt (python ninjadroid.py -t myPackage.apk), it throws the below error
File "ninjadroid.py", line 202
with ZipFile(apkAbsPath) as z:
Mmm... that's strange.
Is 'myPackage.apk' an existing file (in your computer)? Is it a real APK package? From the error, I would say you are trying to reverse a non-APK file.
Unfortunately the "is-APK" check in the current, available version is a lazy check - done pretty badly. I completely reimplemented it in the new version I am working on.
UPDATE
With the newest NinjaDroid version (i.e. 2.0):
$ python ninjadroid.py this_is_a_non_existing_file
>> NinjaDroid: [ERROR] The target file (i.e. 'this_is_a_non_existing_file') must be an existing, readable file!
$ touch this_is_an_existing_file_but_not_an_apk_package.txt
$ python ninjadroid.py this_is_an_existing_file_but_not_an_apk_package.txt
>> NinjaDroid: [ERROR] The target file (i.e. 'this_is_an_existing_file_but_not_an_apk_package.txt') must be an APK package!
$ python ninjadroid.py test/data/Example.apk
{
"app_name": "Example",
...
}

Install Calabash-Android causes error on OS X Mavericks

I need some help with trying to install Calabash-Android. After installing rvm, home-brew, when I install Calabash i get a strange error:
sudo gem install calabash-android
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR="
compiling gherkin_lexer_ar.c
ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [- Wreturn-type]
}
^
ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable]
static const int lexer_en_main = 1;
^
2 warnings generated.
linking shared-object gherkin_lexer_ar.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line- argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [gherkin_lexer_ar.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin- 2.12.2/ext/gherkin_lexer_ar/gem_make.out
doronkatz#Dorons-MacBook-Air ~ $ mkdir ~/android
doronkatz#Dorons-MacBook-Air ~ $ mkdir ~/android
mkdir: /Users/doronkatz/android: File exists
doronkatz#Dorons-MacBook-Air ~ $ sudo gem install calabash-android
Password:
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make "DESTDIR="
compiling gherkin_lexer_ar.c
ragel/i18n/ar.c.rl:440:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
ext/gherkin_lexer_ar/gherkin_lexer_ar.c:864:18: warning: unused variable 'lexer_en_main' [-Wunused-const-variable]
static const int lexer_en_main = 1;
^
2 warnings generated.
linking shared-object gherkin_lexer_ar.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line- argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [gherkin_lexer_ar.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin- 2.12.2/ext/gherkin_lexer_ar/gem_make.out
Not sure what the error means, I have installed Xcode tools for mavericks as well. Any thoughts out there?
I had the same problem and I just found out a solution for this.
I found one related problem here:
http://techespanto.wordpress.com/2013/03/29/upgrade-ruby-version-on-mac-osx/
and it suggested I had to upgrade the ruby version on my machine. The first two commands in that link are not working, so I leave you here what I did:
Install the command line tools for mac with:
xcode-select --install
Install homebrew in your mac with:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Install rvm with:
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
List the latest ruby versions with:
rvm list known
Install the latest ruby version with:
rvm install ruby-<version>
(for me it was ruby-2.1-head)
And that's all. Hope it works for you as well!
You can also try the solution from https://stackoverflow.com/a/22787223/1165581
I looked at the calabash-ios google group for you and I think I have the solution for your
Try installing it like this
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install calabash-cucumber
If that fails you can try to downgrade xcode from 5.1 to one of the previous(Preferences->Locations).
And the reference link

Getting a valgrind for android. Problems with `valgrind`'s looking for `memcheck-arm-linux`

Context is developing an android app that uses several static executable binaries through sh syscall. One of the binaries eventually segfaults when using a samsung galaxy s4 cellphone (but not when using emulator or a Sony Xperia tipo cellphone), so following http://embetek.blogspot.com.es/2011/10/valgrind-for-arm.html with several custom modifications (CFLAGS='-static -march=armv7-a') end up getting a
$ ldd valgrind
not a dynamic executable
$ file valgrind
valgrind: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
statically linked, for GNU/Linux 3.2.0, not stripped.
Loaded on the target phone (versioned android 4.2.2 kernel 3.4...), (context.getFilesDir() + File.separator + "valgrind").canExecute() returns false.
Running sh -c PATH...valgrind tells valgrind: can't execute: Permission denied and status 126 on exit.
Emulator seems to run kernel 2.6... so there adb shell and executing valgrind there told something similar but more decorated telling about a kernel version mismatch: literally
llostatic/files/valgrind <
FATAL: kernel too old
Segmentation fault
(context.getFilesDir() + File.separator + "valgrind").setExecute() is failing by unknown reason was failing because it wasn't being done at all (was doing something like dumpAssetToFile("valgrind"){/* Many things suppressed here. */ argument.setExecute() /* Done wrong without a files dir path ask */}.
Now valgrind seems to be correctly calling for a memcheck-arm-linux, but I didn't yet made it recognize it.
Even a execution of "sh -c \"PATH=$PATH:" + getFilesDir() + File.separator + " " + getFilesDir() + File.separator + "busybox strace valgrind -v " + BINARY + " " + ARGS + " " + "2>&1\"" does not do what I expect. It is not exactly this what gets executed, but am outputting this to stderr.
W/System.err(6918): commandStrArr[0]: sh
W/System.err(6918): commandStrArr[1]: -c
W/System.err(6918): commandStrArr[2]: PATH=$PATH:/data/data/NAMESPACE/files/ busy
box strace valgrind -v /data/data/NAMESPACE/files/BINARY ARGS 2>&1
W/System.err(6918): strace: applet not found
W/System.err(6918): valgrind: failed to start tool 'memcheck' for platform 'arm-l
inux': No such file or directory
W/System.err(6918): Error: BINARY exited with status nonzero (1).
My read of this is that busybox can not emulate strace, but is anyway executing as a command and args from what it thinks as args[2] to the end of its view of arguments. valgrind is loading well but can not find memcheck. A context here is memcheck-arm-linux is an asset' ed static binary dumped to the files directory together with those working valgrind and busybox. I can not be able to be sure memcheck-arm-linux is exactly what is asking for, if I can't get a system calls trace. IMHO It would be a gotcha not being memcheck-arm-linux what valgrind is calling here "'memcheck' for platform 'arm-linux'".
Additional info (abstract the cwds please):
$ file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for
GNU/Linux 3.2.0, stripped
[...]
$ file coregrind/valgrind
coregrind/valgrind: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically
linked, for GNU/Linux 3.2.0, not stripped
[...]
$ file memcheck/memcheck-arm-linux
memcheck/memcheck-arm-linux: ELF 32-bit LSB executable, ARM, version 1 (SYSV), st
atically linked, not stripped
Does anybody see why valgrind seems no to be accepting memcheck-arm-linux as a valid memcheck tool?
Finally strace gave solution to this problem.
Don't still have the trace, but strace told very clearly that valgrind was calling memcheck-arm-linux with a wrong path. Was looking some path from the host compiler machine that obviously don't exist in the target machine.
That hinted the valgrind build command should be changed from
$ export CROSS_COMPILE=arm-unknown-linux-gnueabi- && export CC=${CROSS_COMPILE}gc
c && export CPP=${CROSS_COMPILE}cpp && export CXX=${CROSS_COMPILE}g++ && export L
D=${CROSS_COMPILE}ld && export AR=${CROSS_COMPILE}ar && ./configure --target=arm-
unknown-linux-gnueabi --host=armv7a-none-linux-gnueabi --prefix=$HOME/valgrind-3.
6.1/construct CFLAGS='-static -march=armv7-a' -verbose 2>&1 && make clean && make
-j4 && make
to:
$ export CROSS_COMPILE=arm-unknown-linux-gnueabi- && export CC=${CROSS_COMPILE}gc
c && export CPP=${CROSS_COMPILE}cpp && export CXX=${CROSS_COMPILE}g++ && export L
D=${CROSS_COMPILE}ld && export AR=${CROSS_COMPILE}ar && ./configure --target=arm-
unknown-linux-gnueabi --host=armv7a-none-linux-gnueabi --prefix=/data/data/$APK_P
ACKAGE_NAMESPACE/files CFLAGS='-static -march=armv7-a' -verbose 2>&1 && make clea
n && make -j4 && make
You can see --prefix is now correctly set to a path that exists in the target device, and is valid. Hardcoded. Dirty. Ugly. But is working now.

GCC thinks I'm running x86

I am trying to compile Cyanogenmod on Linux Mint 15. And receive the following error.
host StaticLib: libmincrypt (/home/benji/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a)
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-ar only run on 64-bit linux
make: *** [/home/benji/Source/out/host/linux-x86/obj/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a] Error 1
make: *** Waiting for unfinished jobs....
# In case value of PACKAGES is empty.
-
benji#ultranoid ~/Source/prebuilts/tools/gcc-sdk $ ./gcc
ERROR: ./../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux
I can't figure out what is causing this. I am on a 64 bit install. Please advise.
benji#ultranoid ~/Source $ uname -p
x86_64
Workaround
Comment out lines 23-38 of prebuilts/tools/gcc-sdk/gcc
Example: http://pastebin.com/qH0BYcSF
As pointed out here, within Android build system the test for x32 vs x64 host is based on the output of file -L "$SHELL" | grep -q "x86[_-]64". In other words it tests whether or not current shell is a 64 bit binary.
So a possible answer is : check out if value of environmental variable $SHELL is a valid path to a shell executable.
You may try to change shell with chsh or
create a link to your favorite shell so that $SHELL is satisfied. The latter did the trick for me - I've simply linked /bin/bash to where $SHELL pointed.
use uname -m to check system.
#file -L "$SHELL" | grep -q "x86[_-]64"
#if [ $? != 0 ]; then
# $SHELL is not a 64-bit executable, so assume our userland is too.
# echo "ERROR: $MY_TOOL only run on 64-bit linux"
# exit 1
#fi
changed to:
ARCH_OS=uname -m | tr '[:upper:]' '[:lower:]'
if [ "$ARCH_OS" != "x86_64" ] ; then
echo "ERROR: $MY_TOOL only run on 64-bit linux from uname -m"
exit 1
fi

Categories

Resources