Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Do you use ccache in portage ??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
imbruxo
n00b
n00b


Joined: 23 Mar 2024
Posts: 17

PostPosted: Sat Nov 02, 2024 3:12 pm    Post subject: Do you use ccache in portage ?? Reply with quote

so I have this question that is it worth it to use ccache in portage as 2024 ?
any body can give their Idea and details ???
cause somebody tell that is a good thing
somebody tell me it's wast of space and time
but I myself have no Idea about it , and just using system without it
thanks for you attention <3
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5121
Location: Bavaria

PostPosted: Sat Nov 02, 2024 3:48 pm    Post subject: Re: Do you use ccache in portage ?? Reply with quote

imbruxo wrote:
so I have this question that is it worth it to use ccache in portage as 2024 ?
any body can give their Idea and details ??? [...]

First of all: If you are using our binary packages then you dont need it.
I dont use our binpackages and compile everything ... but ... I do my updates in the night (when I sleep) and dont care if it takes one hour or one hour and 20 minutes :lol:
Maybe read our wiki article - here you will find typically useful reasons to use it: https://wiki.gentoo.org/wiki/Ccache
... and no, I dont use/need it. 8)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
stefantalpalaru
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jan 2009
Posts: 76
Location: Italy

PostPosted: Sat Nov 02, 2024 4:55 pm    Post subject: Re: Do you use ccache in portage ?? Reply with quote

imbruxo wrote:
somebody tell me it's wast of space and time


That's about right. The average Gentoo user will not benefit from ccache. Further more, it introduces a new class of build-time failure scenarios that you are left debugging by yourself.

Not worth the trouble.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2444

PostPosted: Sat Nov 02, 2024 6:56 pm    Post subject: Re: Do you use ccache in portage ?? Reply with quote

stefantalpalaru wrote:
imbruxo wrote:
somebody tell me it's wast of space and time


That's about right. The average Gentoo user will not benefit from ccache.


That's about wrong. See this post.

stefantalpalaru wrote:
Further more, it introduces a new class of build-time failure scenarios that you are left debugging by yourself.

Not worth the trouble.


I've had only a few failures related to that during my 4 year odyssey with my old hardware.

However with my current hardware it doesn't make much sense.

Best Regards,
Georgi
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2400
Location: Germany

PostPosted: Sat Nov 02, 2024 9:10 pm    Post subject: Reply with quote

hi imbruxo,
you need it if you have in some packages the same binary to recompile. If one Package have some same dependencies and will compile the same binary file. Then ccache will push the answer sonner too it.

It is not easy to answer when its useful. But on gentoo its likely. because you have many packages that do not change. Since updates often change just few of sounds lines of code. However you have many libraries with chances and .. so on. If a sub library chance your upper code with that dependence will change too. But still ccache will boost everything which did not change.
Back to top
View user's profile Send private message
imbruxo
n00b
n00b


Joined: 23 Mar 2024
Posts: 17

PostPosted: Thu Nov 07, 2024 12:11 pm    Post subject: Re: Do you use ccache in portage ?? Reply with quote

pietinger wrote:
imbruxo wrote:
so I have this question that is it worth it to use ccache in portage as 2024 ?
any body can give their Idea and details ??? [...]

First of all: If you are using our binary packages then you dont need it.
I dont use our binpackages and compile everything ... but ... I do my updates in the night (when I sleep) and dont care if it takes one hour or one hour and 20 minutes :lol:
Maybe read our wiki article - here you will find typically useful reasons to use it: https://wiki.gentoo.org/wiki/Ccache
... and no, I dont use/need it. 8)


Thanks my friend :D
Back to top
View user's profile Send private message
imbruxo
n00b
n00b


Joined: 23 Mar 2024
Posts: 17

PostPosted: Sat Nov 09, 2024 6:43 pm    Post subject: Reply with quote

ChrisJumper wrote:
hi imbruxo,
you need it if you have in some packages the same binary to recompile. If one Package have some same dependencies and will compile the same binary file. Then ccache will push the answer sonner too it.

It is not easy to answer when its useful. But on gentoo its likely. because you have many packages that do not change. Since updates often change just few of sounds lines of code. However you have many libraries with chances and .. so on. If a sub library chance your upper code with that dependence will change too. But still ccache will boost everything which did not change.


Thanks for your info
I'm really grateful for it
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2444

PostPosted: Sat Nov 09, 2024 7:11 pm    Post subject: Reply with quote

ChrisJumper wrote:
hi imbruxo,
you need it if you have in some packages the same binary to recompile. If one Package have some same dependencies and will compile the same binary file. Then ccache will push the answer sonner too it.


Just by itself it's useless for the simple fact by default it includes the path in the hash and portage always includes the version in the path effectively invalidating the cache unless you recompile exactly the same version. Check the post I've linked above.

Best Regards,
Georgi
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 458
Location: Naarm/Melbourne, Australia

PostPosted: Sun Nov 10, 2024 9:36 am    Post subject: Reply with quote

logrusx wrote:
unless you recompile exactly the same version

This is the context in which i've used it in the past: when i was first using Gentoo, it was on a relatively memory-constrained system (12G total), and i was trying to work out appropriate values of MAKEOPTS for packages that take a while to build. Using ccache (and sccache in the case of FF) meant that i could test out values for a given build, knowing that if it bailed in the middle due to memory pressure, the things that had been built prior to that point wouldn't need to built again.
_________________
https://wiki.gentoo.org/wiki/User:Flexibeast
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 228

PostPosted: Sun Nov 10, 2024 10:02 am    Post subject: Reply with quote

sccache is quite horrible about having the full path in the cache key without any choice. ccache works fairly well however, as long as you configure it in the documented manner.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
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