Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,670 Members 44,533 Now Online
XDA Developers Android and Mobile Development Forum

Android CyanogenMod source compilation error

Tip us?
 
p2.revelation
Old
(Last edited by p2.revelation; 14th June 2014 at 05:39 PM.)
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Jun 2014
Prompt Android CyanogenMod source compilation error

I've successfully downloaded the CyanogenMod 10 source tree by syncing the latest repo. I've also installed the Java JDK properly and already set a ANDROID_JAVA_HOME variable but still getting those errors while executing this command "make -j4 otatools"

Code:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.
I used these steps to register the downloaded version of Java as an alternative, and switching it to be used as the default

Code:
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_60/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_60/bin/javac 1
update-alternatives --set java /opt/jdk1.7.0_60/bin/java
update-alternatives --set javac /opt/jdk1.7.0_60/bin/javac
Output for java -version

Code:
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
Output for ANDROID_JAVA_HOME

Code:
echo $ANDROID_JAVA_HOME
/opt/jdk1.7.0_60/bin/
My Machine configuration is Debian Wheezy 64 bit with 4GB RAM

Please help me to solve this issue!
Thanks in advance!
 
dvm84
Old
#2  
dvm84's Avatar
Senior Member
Thanks Meter 61
Posts: 101
Join Date: Jun 2014
Quote:
Originally Posted by p2.revelation View Post
I've successfully downloaded the CyanogenMod 10 source tree by syncing the latest repo. I've also installed the Java JDK properly and already set a ANDROID_JAVA_HOME variable but still getting those errors while executing this command "make -j4 otatools"

Code:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.
I used these steps to register the downloaded version of Java as an alternative, and switching it to be used as the default

Code:
update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_60/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_60/bin/javac 1
update-alternatives --set java /opt/jdk1.7.0_60/bin/java
update-alternatives --set javac /opt/jdk1.7.0_60/bin/javac
Output for java -version

Code:
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
Output for ANDROID_JAVA_HOME

Code:
echo $ANDROID_JAVA_HOME
/opt/jdk1.7.0_60/bin/
My Machine configuration is Debian Wheezy 64 bit with 4GB RAM

Please help me to solve this issue!
Thanks in advance!
The error itself says
Code:
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.
and you have mentioned Output for ANDROID_JAVA_HOME as
Code:
/opt/jdk1.7.0_60/bin/
So you could run this in terminal
Code:
sudo su
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java6-installer
java -version
When it says this you are ready to run the compilation
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Device: Sony Xperia M
ROM: Vanir
Kernel: VanirAOSP Hodor Kernel
Recovery: CWM/TWRP (Depending on the kernel)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes