Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2008 23:27:16 +0200
From:      Martin Tournoij <carpetsmoker@rwxrwxrwx.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: Standardize NO_CCACHE flag and ccache definitions
Message-ID:  <20080618212716.GA61331@rwxrwxrwx.net>
In-Reply-To: <20080618125154.GC90685@k7.mavetju>
References:  <20080618125154.GC90685@k7.mavetju>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 18, 2008 at 10:51:54PM +1000, Edwin Groothuis wrote:
> Hello,
> 
> Recently I've started to use devel/ccache again (sometimes it takes
> a while before you understand how it works) and it works pretty
> well, except for some ports which can't be build with it. For example
> devel/cmake.
> 
> To prevent everybody from having to re-invent the wheel, we could
> introduce a NO_CCACHE flag in the affected ports Makefile:
> 
> 	NO_CCACHE=yes

Hi Edwin,

There are some ports which refuse to compile with ccache, these all
seem to be projects which use scons, unlike make, scons does not copy
the user's environment automatically, and the required environment
variables for ccache (like CCACHE_DIR) aren't present, which leads to
build failure, an example is games/freera.

I'm not that familiar with scons, and what exactly the "proper way" is
to handle this sort of stuff in scons, I looked at it some time ago
for a port  I maintain (graphics/gsculpt), and from what I remember,
just copying the entire user's environment to the scons build
environment is not as easy as it sounds, I don't remember the
details.
The fix I used was to just copy the ccache environment variables ...
Quick 'n dirty, but it works.
I didn't look at it very long, so there could be a better way.

Note that some applications like graphics/blender work fine with
ccache without modification (Note that the current blender port
doesn't use scons, but a previous version did).
Writing *good* SConstruct files seems to be relatively
hard/complicated ... Which is seems to be why most projects don't have
good SConstruct files.

In any case, there seem to be only a few isolated ports which don't
compile with ccache, fixing those also seems to be pretty easy ... So
before implementing NO_CCACHE fixing the ports seems like a better
idea IMO, if you want I can search for broken scons ports and fix if
necessary.

Not sure if there are other scenarios where ccache fails, I have used
it for years in various environments (including jails/tinderboxes)
without any problems other than those outlined above.

-- 
Martin Tournoij
carpetsmoker@rwxrwxrwx.net
http://www.daemonforums.org

QOTD:
We all like praise, but a hike in our pay is the best kind of
ways.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080618212716.GA61331>