[Gento] ccache
Résolu
bob031
Messages postés
8158
Date d'inscription
Statut
Membre
Dernière intervention
-
bob031 Messages postés 8158 Date d'inscription Statut Membre Dernière intervention -
bob031 Messages postés 8158 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
En suivant le tuto sur ccache sur le wiki-gentoo (http://en.gentoo-wiki.com/wiki/Ccache),
je ne comprenais pas pourquoi après avoir lancé la commande suivante (pour vérifier que ccache fonctionne) :
l'exemple affiche :
/* The output will look something like this if it's working */
cache hit 189
cache miss 1983
called for link 159
multiple source files 4
compile failed 52
preprocessor error 4
bad compiler arguments 3
not a C/C++ file 141
autoconf compile/link 357
unsupported compiler option 30
no input file 145
files in cache 3966
cache size 30.1 Mbytes
max cache size 2.0 Gbytes
alors que moi j'affiche :
max cache size 976.6 Mbytes
alors que j'ai fait tout comme on dit, pour résumé en indiquant 2G
alors plusieurs heures d'incompréhension :
http://ccache.samba.org/ccache-man.html
me dit :
ok, je fais :
localhost redfox # CCACHE_DIR="/var/tmp/ccache" ccache -M 2G
Set cache size limit to 2097152k
localhost redfox # ccache -s
cache directory /var/tmp/ccache
cache hit 9939
cache miss 44741
called for link 4323
multiple source files 3
compile failed 1121
preprocessor error 400
not a C/C++ file 2139
autoconf compile/link 9483
unsupported compiler option 511
no input file 5519
files in cache 89482
cache size 594.4 Mbytes
max cache size 2.0 Gbytes
localhost redfox #
et voilà ! Ta ! Ta !
:-))
Debian Etch // Fedora 8 // Gentoo 2007-rc3 // Mandriva 2007.1 Spring
Windows Breaks : -----^-----^-----^-----^-----^-----^--- bip bip bip bip !
En suivant le tuto sur ccache sur le wiki-gentoo (http://en.gentoo-wiki.com/wiki/Ccache),
je ne comprenais pas pourquoi après avoir lancé la commande suivante (pour vérifier que ccache fonctionne) :
CCACHE_DIR="/var/tmp/ccache" ccache -s
l'exemple affiche :
/* The output will look something like this if it's working */
cache hit 189
cache miss 1983
called for link 159
multiple source files 4
compile failed 52
preprocessor error 4
bad compiler arguments 3
not a C/C++ file 141
autoconf compile/link 357
unsupported compiler option 30
no input file 145
files in cache 3966
cache size 30.1 Mbytes
max cache size 2.0 Gbytes
alors que moi j'affiche :
max cache size 976.6 Mbytes
alors que j'ai fait tout comme on dit, pour résumé en indiquant 2G
alors plusieurs heures d'incompréhension :
http://ccache.samba.org/ccache-man.html
me dit :
OPTIONS SUMMARY -M <maxsize> set maximum size of cache (use G, M or K)
ok, je fais :
localhost redfox # CCACHE_DIR="/var/tmp/ccache" ccache -M 2G
Set cache size limit to 2097152k
localhost redfox # ccache -s
cache directory /var/tmp/ccache
cache hit 9939
cache miss 44741
called for link 4323
multiple source files 3
compile failed 1121
preprocessor error 400
not a C/C++ file 2139
autoconf compile/link 9483
unsupported compiler option 511
no input file 5519
files in cache 89482
cache size 594.4 Mbytes
max cache size 2.0 Gbytes
localhost redfox #
et voilà ! Ta ! Ta !
:-))
Debian Etch // Fedora 8 // Gentoo 2007-rc3 // Mandriva 2007.1 Spring
Windows Breaks : -----^-----^-----^-----^-----^-----^--- bip bip bip bip !
2 réponses
finalement, j'avais mal configuré ccache !
j'ai recommencé pour la Mandriva et la Debian !
pour la mandriva :
la taille de 2G ne fonctionnait pas pour le user (ok avec root), ceci m'a aidé à résoudre le petit souci :
et pour cause .... dans le fichier .bash_profile de mon user, j'avais :
CCACHE_DIR=/var/tmp/ccache !
en modifiant j'obtiens bien :
pour la debian :
j'ai usé de cette méthode :
/usr/local/bin est en premier dans le PATH donc no problémo pour réaliser la "seconde méthode"
pour être sur que tout est ok :
[redfox@mandriva ~]$ which gcc
/usr/lib/ccache/bin/gcc
[redfox@mandriva ~]$
source : http://ccache.samba.org/ccache-man.html
ta da ! :-))
j'ai recommencé pour la Mandriva et la Debian !
pour la mandriva :
la taille de 2G ne fonctionnait pas pour le user (ok avec root), ceci m'a aidé à résoudre le petit souci :
CCACHE_DIR the CCACHE_DIR environment variable specifies where ccache will keep its cached compiler output. The default is "$HOME/.ccache".
et pour cause .... dans le fichier .bash_profile de mon user, j'avais :
CCACHE_DIR=/var/tmp/ccache !
en modifiant j'obtiens bien :
[redfox@mandriva ~]$ ccache -s cache directory /home/redfox/.ccache cache hit 0 cache miss 0 files in cache 0 cache size 0 Kbytes max cache size 976.6 Mbytes [redfox@mandriva ~]$ ccache -M 2G Set cache size limit to 2097152k [redfox@mandriva ~]$ [redfox@mandriva ~]$ [redfox@mandriva ~]$ ccache -s cache directory /home/redfox/.ccache cache hit 0 cache miss 0 files in cache 0 cache size 0 Kbytes max cache size 2.0 Gbytes [redfox@mandriva ~]$
pour la debian :
j'ai usé de cette méthode :
To install for the second method do something like this: cp ccache /usr/local/bin/ ln -s /usr/local/bin/ccache /usr/local/bin/gcc ln -s /usr/local/bin/ccache /usr/local/bin/g++ ln -s /usr/local/bin/ccache /usr/local/bin/cc This will work as long as /usr/local/bin comes before the path to gcc (which is usually in /usr/bin). After installing you may wish to run "which gcc" to make sure that the correct link is being used. Note! Do not use a hard link, use a symbolic link. A hardlink will cause "interesting" problems.
/usr/local/bin est en premier dans le PATH donc no problémo pour réaliser la "seconde méthode"
pour être sur que tout est ok :
[redfox@mandriva ~]$ which gcc
/usr/lib/ccache/bin/gcc
[redfox@mandriva ~]$
source : http://ccache.samba.org/ccache-man.html
ta da ! :-))