Home Help Center

Compiling Ice with distcc

timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
Hi

Does any one know if I can compile ice with distcc and ccache?

I'm compiling on a laptop and with out distcc or ccache it's very slow.


Thanks

Comments

  • Yunqiao YinYunqiao Yin Member Yin YunqiaoOrganization: BaosteelProject: real time process control system ✭✭
    timberwolf wrote: »
    Hi

    Does any one know if I can compile ice with distcc and ccache?

    I'm compiling on a laptop and with out distcc or ccache it's very slow.


    Thanks

    No problem,just use it! We have built our project(including Ice source) with ccache&distcc for a long time. If you want to use distcc , you'd better have the same compiler on each host.
  • timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
    No problem,just use it! We have built our project(including Ice source) with ccache&distcc for a long time. If you want to use distcc , you'd better have the same compiler on each host.

    I tried to use it but it didn't work. ice does not compile with anything other than CXX=g++ and CC=gcc. using it with distcc cache /usr/bin/gcc $* doesn't work.

    Can I ask how you set things up for it to work?
  • Yunqiao YinYunqiao Yin Member Yin YunqiaoOrganization: BaosteelProject: real time process control system ✭✭
    timberwolf wrote: »
    I tried to use it but it didn't work. ice does not compile with anything other than CXX=g++ and CC=gcc. using it with distcc cache /usr/bin/gcc $* doesn't work.

    Can I ask how you set things up for it to work?

    config/Make.rules.Linux :
    ....
    ifeq ($(CXX),c++)
       CXX = ccache c++    #add this line
       ifeq ($(MACHINE),sparc64)
          #
          # We are an ultra, at least, and so have the atomic instructions
          #
          USE_SPARC_ASM     = yes
          CXXARCHFLAGS      = -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
       endif
    ....
    
    and set the enviroments:
    CCACHE_PREFIX=distcc
    CCACHE_DIR=/path/to/cache/dir
    CCACHE_LOGFILE=/path/to/ccache/logfile
    DISTCC_HOSTS="host1 host2 host3 ..."
    CCACHE_NOLINK=1
    
    Then enjoy fast compile:
    make -j 10
  • timberwolftimberwolf Member Bailey WuOrganization: University of SydneyProject: DGC
    config/Make.rules.Linux :
    ....
    ifeq ($(CXX),c++)
       CXX = ccache c++    #add this line
       ifeq ($(MACHINE),sparc64)
          #
          # We are an ultra, at least, and so have the atomic instructions
          #
          USE_SPARC_ASM     = yes
          CXXARCHFLAGS      = -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM
       endif
    ....
    
    and set the enviroments:
    CCACHE_PREFIX=distcc
    CCACHE_DIR=/path/to/cache/dir
    CCACHE_LOGFILE=/path/to/ccache/logfile
    DISTCC_HOSTS="host1 host2 host3 ..."
    CCACHE_NOLINK=1
    
    Then enjoy fast compile:
    make -j 10

    Thanks a lot man, I'll try it next time I compile.
Sign In or Register to comment.