On Thu, Jan 12, 2006 at 09:36:33AM +0000, Ceri Davies wrote: > On Wed, Jan 11, 2006 at 09:25:04PM +0200, Ruslan Ermilov wrote: > > On Wed, Jan 11, 2006 at 04:30:46PM +0000, Ceri Davies wrote: > > > On Wed, Jan 11, 2006 at 11:10:06AM -0500, michael johnson wrote: > > > > On 1/11/06, Ruslan Ermilov <[EMAIL PROTECTED]> wrote: > > > > > > > > > > ru 2006-01-11 15:49:25 UTC > > > > > > > > > > FreeBSD ports repository > > > > > > > > > > Modified files: > > > > > devel/ccache Makefile > > > > > Log: > > > > > Attempt to attract maintainer's attention to a problem a lot of > > > > > our users reported when doing "make buildworld" with NOCCACHE > > > > > defined (hardcodes CC and CXX to "/usr/bin/{cc|c++}"). > > > > > > > > > > > > Please feel free to change what ever in ccache so it works. I won't be > > > > doing > > > > much with freebsd for the next little bit. > > > > > > My ccache entry in make.conf looks like: > > > > > > # ccache > > > .if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/cc) > > > .if ${.CURDIR:M/usr/src*} > > > CC=/usr/local/libexec/ccache/cc > > > CXX=/usr/local/libexec/ccache/c++ > > > .else > > > CC=cc > > > CXX=c++ > > > .endif > > > .else > > > CC=/usr/bin/cc > > > CXX=/usr/bin/c++ > > > .endif > > > > > > I could probably have used PREFIX too, but that always == /usr/local on > > > my machines. > > > > > The last ".else" part is the problem when doing "make buildworld" and > > NOCCACHE is defined. I have no idea what will break if we just remove > > it (i.e., revert rev. 1.2 to this patch). > > Oh, my bad. Turns out I don't have ccache installed so the whole thing > is getting ignored. > > Man, I was having a bad day yesterday. Let's see what else I've > broken... > The problem is not with having or not having ccache installed, but with the hardcoded /usr/bin/cc and /usr/bin/c++ if NOCCACHE is defined. This breaks buildworld as follows:
- buildworld sets CC and CXX to point to specially built compilers available somewhere inside ${WORLDTMP}, - these compilers pick up correct (up-to-date) versions of headers, libraries, etc., from ${WORLDTMP}, - setting CC and CXX in /etc/make.conf makes them global variables, of a higher precedence than those that buildworld passes in shell environment, - buildworld uses wrong compilers that pick up wrong headers etc., - buildworld breaks. I don't care to fix the port (mostly because I'm not familiar with ccache) but I'm full with getting mysterious build failure reports from our users, where in 90% of cases this was caused by the wrong contents of /etc/make.conf suggested by port installation example. Cheers, -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer
pgpNXg5p5N6RK.pgp
Description: PGP signature