Gentoo Forums
Gentoo Forums
Quick Search: in
ccache help [Solved]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Bullet Dodger
Apprentice
Apprentice


Joined: 16 Jul 2005
Posts: 181

PostPosted: Fri Jun 13, 2008 8:05 pm    Post subject: ccache help [Solved] Reply with quote

I'm trying to set up ccache using our wiki http://gentoo-wiki.com/TIP_Use_ccache

i "emerge -av dev-util/ccache"

Followed the wiki and checked:
Code:

# ls -l /usr/lib/ccache/bin
total 0
lrwxrwxrwx 1 root root 15 Jun 14 01:04 c++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15 Jun 14 01:04 g++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15 Jun 14 01:04 gcc -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15 Jun 14 01:05 i686-pc-linux-gnu-c++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15 Jun 14 01:05 i686-pc-linux-gnu-g++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15 Jun 14 01:05 i686-pc-linux-gnu-gcc -> /usr/bin/ccache

And
Code:

# cat /etc/make.conf

--- cut ---

FEATURES="fixpackages parallel-fetch ccache"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"

After an emerge --sync, i found portage needed updated, so after an emerge portage
Code:

# CCACHE_DIR="/var/tmp/ccache" ccache -s
cache directory                     /var/tmp/ccache
cache hit                              0
cache miss                             0
files in cache                         0
cache size                             0 Kbytes
max cache size                       2.0 Gbytes


Ok, so maybe the 1st time it was doing the caching, so there could not be any cach hits, so emerge portage again and:
Code:

 # CCACHE_DIR="/var/tmp/ccache" ccache -s
cache directory                     /var/tmp/ccache
cache hit                              0
cache miss                             0
files in cache                         0
cache size                             0 Kbytes
max cache size                       2.0 Gbytes


Same results :-(

Next part of the howto is genkenal and non-portage - that doesn't help. i think i need the portage stuff working 1st before i worry about genkernel.

Cheers


Last edited by Bullet Dodger on Mon Jun 16, 2008 4:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
notHerbert
Veteran
Veteran


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Fri Jun 13, 2008 8:20 pm    Post subject: Reply with quote

Did you symlink /root/.ccache
Code:
mv /root/.ccache  /root/snafu.ccache
ln -s /var/tmp/ccache  /root/.ccache

I think ccache is for C, and to my knowlwdge portage is mostly in python.
When you get to emerging system logger and grub etc.. you will see that it works. :)
Back to top
View user's profile Send private message
Bullet Dodger
Apprentice
Apprentice


Joined: 16 Jul 2005
Posts: 181

PostPosted: Fri Jun 13, 2008 8:57 pm    Post subject: Reply with quote

I didn't do this:
Code:

mv /root/.ccache  /root/snafu.ccache


But is this link the right way round? (does it even matter? a links a link right?)
Code:

# ls -alF /var/tmp/|grep ccache
lrwxrwxrwx  1 root    root       13 Jun 14 01:09 ccache -> /root/.ccache/
Back to top
View user's profile Send private message
notHerbert
Veteran
Veteran


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Fri Jun 13, 2008 9:24 pm    Post subject: Reply with quote

It has to look like this
Code:
 # ls -l /root/.ccache       
lrwxrwxrwx 1 root root 15 Apr 18 23:53 /root/.ccache -> /var/tmp/ccache

The commands to do it is
Code:
mv /root/.ccache  /root/snafu.ccache
ln -s /var/tmp/ccache  /root/.ccache

After you do that it should work fine. :wink:
Back to top
View user's profile Send private message
Bullet Dodger
Apprentice
Apprentice


Joined: 16 Jul 2005
Posts: 181

PostPosted: Mon Jun 16, 2008 4:03 pm    Post subject: Reply with quote

I set up the link properly re-emerged portage and the same results. Still looks like it's not working.
Did an emerge -uDaN world and it is working.
So looks like portage was not being cashed - don't know why - but looks like its working aways.

Cheers
Back to top
View user's profile Send private message
tuam
l33t
l33t


Joined: 04 May 2004
Posts: 664
Location: DUS, Germany

PostPosted: Tue Jun 17, 2008 12:55 am    Post subject: Reply with quote

Bullet Dodger wrote:
So looks like portage was not being cashed - don't know why

That's because portage is *not* written in C or C++.

FF,

Daniel
_________________
Logic clearly dictates that the needs of the many outweigh the needs of the few. - Spock
The needs of the one outweigh the needs of the many. - Kirk
I refuse to let arithmetic decide questions like that. - Picard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum