CCache fortwährend Kompilierungsfehler!

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
User avatar
Proteus
Posts: 289
Joined: 2013-04-14 05:08
Location: Holzgerlingen
 

CCache fortwährend Kompilierungsfehler!

Post by Proteus »

Also irgendwie bekomme ich`s wieder nicht hin! Ich wollte mal ccache testen und es heißt es könnte das kompilieren um einiges beschleunigen. Ich bekomme komischerweise wenn ich ein Programm aus den Port per "make" installieren will Abbrüche noch und nöcher.

Ich installiere so:

Code: Select all

cd /usr/ports/devel/ccache && make install clean

cat >> /root/.cshrc << "EOF"
setenv PATH %%PREFIX%%/%%CCLINKDIR%%:$PATH
setenv CCACHE_PATH /usr/bin:%%LOCALBASE%%/bin
setenv CCACHE_DIR /tmp/ccache
setenv CCACHE_LOGFILE /var/log/ccache.log
if ( -x /usr/local/bin/ccache ) then
	/usr/local/bin/ccache -M 1024m > /dev/null
endif
"EOF"

cat >> /etc/make.conf << "EOF"
.if !defined(NO_CCACHE)
  CC=  /usr/local/libexec/ccache/world-cc
  CXX= /usr/local/libexec/ccache/world-c++
.endif
.if ${.CURDIR:M*/ports/devel/ccache}
  NO_CCACHE= yes
.endif
Laufen tuts:

Code: Select all

[root@f329:~] # ccache -s
cache directory                     /tmp/ccache
primary config                      /tmp/ccache/ccache.conf
secondary config      (readonly)    /usr/local/etc/ccache.conf
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                             0
files in cache                         0
cache size                           0.0 kB
max cache size                       1.0 GB
Und entleeren lässt sich das ganze mit -c -C auch.
LG
Proti

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"
User avatar
Proteus
Posts: 289
Joined: 2013-04-14 05:08
Location: Holzgerlingen
 

Re: CCache fortwährend Kompilierungsfehler!

Post by Proteus »

Okay ich denke ich habe es hinbekommen.

Code: Select all

vi /etc/make.conf

.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
	.if !defined(NOCCACHE)
		CC:=${CC:C,^cc,%%PREFIX%%/%%CCLINKDIR%%/world/cc,1}
		CXX:=${CXX:C,^c\+\+,%%PREFIX%%/%%CCLINKDIR%%/world/c++,1}
	.endif
.endif

vi /root/.cshrc

setenv PATH %%PREFIX%%/%%CCLINKDIR%%:$PATH
setenv CCACHE_PATH /usr/bin:%%LOCALBASE%%/bin
setenv CCACHE_DIR /tmp/ccache
setenv CCACHE_LOGFILE /var/log/ccache.log
if ( -x /usr/local/bin/ccache ) then
	/usr/local/bin/ccache -M 1024M > /dev/null
endif
Nun huscht er durch, ohne Fehler.
LG
Proti

"Die Kamera wird bei hohen ISO Werten aber rauschen. Nichts ahnend hielt er sich die Kamera ans Ohr!"