Search code examples
androidosx-yosemiteandroid-5.1.1-lollipopccache

Error while creating ccache for Android Rom on OSX


I am trying to use ccache to build the rom faster.

the link at http://source.android.com/source/building.html gives the following code:

$ export USE_CCACHE=1
$ export CCACHE_DIR=/<path_of_your_choice>/.ccache
$ prebuilts/misc/linux-x86/ccache/ccache -M 50G

However i get the following error on line 3

$ prebuilts/misc/linux-x86/ccache/ccache -M 50G
-bash: prebuilts/misc/linux-x86/ccache/ccache: cannot execute binary file

Even if i go into the directory and try to execute it by "./ccache -M 50G" it gives the same 'cannot execute binary file' error.

Can you guys tell me what am I doing wrong?


Solution

  • I was able to solve this problem

    $ export USE_CCACHE=1 
    

    is supposed to go in your .bash_profile

    After that you can give the following command and it will work.

    prebuilts/misc/linux-x86/ccache/ccache -M 50G