Jay Lorn
Jay Lorn

Reputation: 31

android_gyp missing/not found when building Chromium for Android

I need to modify Chromium for Android. Because I have little or no experience with Linux, I've been having difficulties with getting it to compile and now I'm stumped for good.

I've been following the steps here: https://code.google.com/p/chromium/wiki/AndroidBuildInstructions

This is roughly a list of commands that I have executed on a fresh Ubuntu 13.04 (raring) installation:

sudo apt-get install git-svn subversion g++ gtk+-2.0 gyp ant

# here I download depot_tools into the home dir

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PATH"\:`pwd`/depot_tools

# here I download the Chromium source code into ~/src

fetch android --nosvn=True
sudo ./src/build/install-build-deps.sh
gclient sync --nohooks

# download "jdk-6u38-linux-x64.bin" from the Oracle website, then

chmod 755 ~/Downloads/
sudo mkdir /usr/lib/jvm
cd /usr/lib/jvm && sudo /bin/sh ~/Downloads/jdk-6u38-linux-x64.bin -noregister

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 50000
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 50000
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 50000
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_38/bin/javap 50000
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javap

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_38
export PATH=$JAVA_HOME/bin\:"$PATH"

unset CC
unset CXX

cd ~/src
./build/android/envsetup.sh

# edit install-build-deps-android.sh
# replacing "ant1.8" with "ant" (a hack of mine)
sudo ./build/install-build-deps-android.sh

export GYP_DEFINES="target_arch=x64"

Now I'm missing android_gyp and I can't find it anywhere in the ~/src folder.

This is where it says I should execute it: http://code.google.com/p/chromium/wiki/AndroidBuildInstructions#Compile

If I try to skip the command, it says that I don't have "build.ninja", so yeah...

Could anyone please help me? I'm new at this. Thank you

Upvotes: 3

Views: 997

Answers (1)

gkanwar
gkanwar

Reputation: 561

./build/android/envsetup.sh

Should be:

. build/android/envsetup.sh

The dot + space sources the script so that any bash definitions will be kept around after the script runs. See: http://ss64.com/bash/source.html.

android_gyp is a bash function defined in envsetup.sh, so sourcing it provides the definition in your shell.

Upvotes: 3

Related Questions