User Tools

Site Tools


distcc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
distcc [2009/10/06 00:32] – created suapapadistcc [2013/08/03 05:04] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== ccache + distcc + crosscompile ======
 +===== distccd 설정 ====
 +외부 머신에서의 분산빌드 요청을 수락하기 위해 /etc/default/distcc 설정
 +<code bash>
 +STARTDISTCC="true"
 +ALLOWEDNETS="127.0.0.1 192.168.10.0/24"
 +LISTENER="192.168.10.1"
 +NICE="10"
 +</code>
 +크로스 컴파일시 크로스 컴파일러의 경로를 추가해 주어야 함 /etc/init.d/distcc 수정
 +<code bash>
 +...
 +PATH=...:/ExtApps/toolchain/arm-2009q1/bin
 +...
 +</code>
 +분산빌드를 시작하는 peer는 distccd 데몬을 시작할 필요 없음
 +
 +===== 분산 빌드를 시작 하는 주 머신 ==
 +/home/suapapa/.distcc/hosts 파일에 다음과 같이 접속할 host 나열
 +<code bash>
 +localhost 192.168.10.2
 +</code>
 +또는 DISTCC_HOSTS로 익스포트
 +<code bash>
 +DISTCC_HOSTS="192.168.10.2/3 localhost/2 another_serv/n"
 +</code>
 +===== distcc서버들이 살아있나 검사 =====
 +<code python>
 +#!/usr/bin/python
 +
 +from socket import *
 +def isDistccSrvOK(addr, port = 3632):
 +    try:
 +        sok = socket(AF_INET, SOCK_STREAM)
 +        sok.connect((addr, port))
 +    except:
 +        return False
 +    sok.close()
 +    return True
 +
 +if __name__ == '__main__':
 +    import sys
 +    print isDistccSrvOK(sys.argv[1])
 +
 +</code>
 +
 +===== 빌드 =====
 +다음과 같이 alias 설정
 +<code bash>
 +alias arm_make='nice -n 20 make ARCH=arm CROSS_COMPILE="ccache arm-none-eabi-" -j 3 '
 +alias arm_dist6_make='nice -n 20 make ARCH=arm CROSS_COMPILE="ccache distcc arm-none-eabi-" -j 6 '
 +</code>
 +
 +
 +
 +  *[[http://www.debian-administration.org/article/Speed_up_compiling_software_with_distcc|Speed up compiling software with distcc]]
 +  *[[http://www.debian-administration.org/articles/129|Speeding up recompilation with ccache]]
 +
 +  *[[http://linpc.com/node/203|Cross Compiling with distcc]]
 +
 ====== references ====== ====== references ======
   *[[http://code.google.com/p/distcc/|distcc]] in google code   *[[http://code.google.com/p/distcc/|distcc]] in google code
   *[[http://distcc.samba.org/|discc]] old official homepage   *[[http://distcc.samba.org/|discc]] old official homepage
   *[[http://www.ibm.com/developerworks/kr/library/l-distcc.html|distcc로 컴파일 시간 줄이기]] in IBM DW   *[[http://www.ibm.com/developerworks/kr/library/l-distcc.html|distcc로 컴파일 시간 줄이기]] in IBM DW
- 
distcc.1254789128.txt.gz · Last modified: 2013/08/03 05:04 (external edit)