'프로그램 사용/distcc & ccache'에 해당되는 글 17건

  1. 2016.09.25 distcc-pump error
  2. 2016.09.13 distcc 크로스 컴파일/커널 빌드 관련
  3. 2014.12.12 distcc 로 valgrind-3.6.1 컴파일 실패?
  4. 2014.12.09 distcc 작동모드
  5. 2014.12.08 ccache & distcc
  6. 2014.12.08 distcc on ubuntu
  7. 2010.03.04 distcc - 네트워크 분산 컴파일 2

한번 오랫만에 시간이 나서 마음먹고 해보려는데

에러! ㅠㅠ

다음번에 재시도를 해봐야지..


$ distcc-pump --startup

/usr/bin/distcc-pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option


$ distcc-pump make -j8 CC=ditscc

__________Using distcc-pump from /usr/bin

/usr/bin/distcc-pump: error: pump mode requested, but distcc hosts list does not contain any hosts with ',cpp' option 


어디서 저 옵션이 들어가나 뒤져보니 목록에 옵션으로 넣는거였네..

conf 파일에는 불가능하려나? zeroconf로 받아온다거나?


DISTCC_HOSTS=",cpp" 

[링크: https://wiki.archlinux.org/index.php/Distcc]


+ 2016-09-26

[링크 : https://forums.gentoo.org/...?sid=0b18b85927db5c54fa1bff47ee829527]

Posted by 구차니

distcc --show-hosts 실패했는데 zeroconf를 켜니 되네..



$ sudo vi /etc/default/distcc

STARTDISTCC="true"

ALLOWEDNETS="127.0.0.1 192.168.1.0/24"

LISTENER=""

ZEROCONF="true"


$ distcc --show-hosts


$ make mrproper

 

$ make -j16 ARCH=arm CC="distcc /opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc" CROSS_COMPILE="/opt/arm-2009q1/bin/arm-none-linux-gnueabi-" ti_dm365_defconfig

 

$ distcc-pump make -j16 ARCH=arm CC="distcc /opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc" CROSS_COMPILE="/opt/arm-2009q1/bin/arm-none-linux-gnueabi-" uImage 


[링크 : http://samarthparikh.blogspot.com/2012/10/install-distcc-and-make-linux-kernel.html]


$ make -j8 CC=distcc

[링크 : http://linuxdeveloper.blogspot.com/2012/03/distributed-kernel-compilation-in.html]




$ sudo apt-cache search distcc-pump

distcc-pump - pump mode for distcc a distributed compiler client and server



+
For example:
              eval `distcc-pump --startup`
              make -j80
              distcc-pump --shutdown


EXAMPLE
       distcc-pump make -j20



QUICKSTART FOR DISTCC-PUMP MODE

       Proceed  as  above, but in Step 3, specify that the remote hosts are to

       carry the burden of preprocessing and that  the  files  sent  over  the

       network should be compressed:


              $   export   DISTCC_HOSTS='--randomize   localhost   red,cpp,lzo

              green,cpp,lzo blue,cpp,lzo'


       The --randomize option enforces a uniform  usage  of  compile  servers.

       While you will get some benefit from distcc's pump mode with only a few

       servers, you get increasing benefit with more server CPUs  (up  to  the

       hundreds!).   Wrap your build inside the pump command, here assuming 10

       servers:


              $ pump make -j20 CC=distcc

[링크 : http://manpages.ubuntu.com/manpages/precise/man1/distcc.1.html]

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc kernel compile 재시도..  (0) 2016.09.28
distcc-pump error  (0) 2016.09.25
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
distcc 작동모드  (0) 2014.12.09
ccache & distcc  (0) 2014.12.08
Posted by 구차니
configure 상으로는 차이가 없으나
$ CC="distcc gcc" ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for gcc... distcc gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether distcc gcc accepts -g... yes
checking for distcc gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of distcc gcc... gcc3
checking whether distcc gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... distcc gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of distcc gcc... gcc3
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of gcc... gcc3

distcc 안되는 경우
make[3]: Entering directory `/mnt/disk1/home/minimonk/work/valgrind/valgrind-3.6.1/memcheck'
../coregrind/link_tool_exe_linux 0x38000000 distcc gcc  -Wno-long-long  -Wno-pointer-sign -fno-stack-protector   -o memcheck-x86-linux -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -static -nodefaultlibs -nostartfiles -u _start -Wl,--build-id=none -m32 memcheck_x86_linux-mc_leakcheck.o memcheck_x86_linux-mc_malloc_wrappers.o memcheck_x86_linux-mc_main.o memcheck_x86_linux-mc_translate.o memcheck_x86_linux-mc_machine.o memcheck_x86_linux-mc_errors.o ../coregrind/libcoregrind-x86-linux.a ../VEX/libvex-x86-linux.a -lgcc
cc: gcc: 그런 파일이나 디렉터리가 없습니다
distcc[14875] ERROR: compile (null) on localhost failed

로컬 컴파일 되는 경우
make[3]: Entering directory `/mnt/disk1/home/minimonk/work/valgrind/valgrind-3.6.1/memcheck'
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_leakcheck.o -MD -MP -MF .deps/memcheck_x86_linux-mc_leakcheck.Tpo -c -o memcheck_x86_linux-mc_leakcheck.o `test -f 'mc_leakcheck.c' || echo './'`mc_leakcheck.c
mv -f .deps/memcheck_x86_linux-mc_leakcheck.Tpo .deps/memcheck_x86_linux-mc_leakcheck.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_malloc_wrappers.o -MD -MP -MF .deps/memcheck_x86_linux-mc_malloc_wrappers.Tpo -c -o memcheck_x86_linux-mc_malloc_wrappers.o `test -f 'mc_malloc_wrappers.c' || echo './'`mc_malloc_wrappers.c
mv -f .deps/memcheck_x86_linux-mc_malloc_wrappers.Tpo .deps/memcheck_x86_linux-mc_malloc_wrappers.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_main.o -MD -MP -MF .deps/memcheck_x86_linux-mc_main.Tpo -c -o memcheck_x86_linux-mc_main.o `test -f 'mc_main.c' || echo './'`mc_main.c
mv -f .deps/memcheck_x86_linux-mc_main.Tpo .deps/memcheck_x86_linux-mc_main.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_translate.o -MD -MP -MF .deps/memcheck_x86_linux-mc_translate.Tpo -c -o memcheck_x86_linux-mc_translate.o `test -f 'mc_translate.c' || echo './'`mc_translate.c
mv -f .deps/memcheck_x86_linux-mc_translate.Tpo .deps/memcheck_x86_linux-mc_translate.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_machine.o -MD -MP -MF .deps/memcheck_x86_linux-mc_machine.Tpo -c -o memcheck_x86_linux-mc_machine.o `test -f 'mc_machine.c' || echo './'`mc_machine.c
mv -f .deps/memcheck_x86_linux-mc_machine.Tpo .deps/memcheck_x86_linux-mc_machine.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1  -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT memcheck_x86_linux-mc_errors.o -MD -MP -MF .deps/memcheck_x86_linux-mc_errors.Tpo -c -o memcheck_x86_linux-mc_errors.o `test -f 'mc_errors.c' || echo './'`mc_errors.c
mv -f .deps/memcheck_x86_linux-mc_errors.Tpo .deps/memcheck_x86_linux-mc_errors.Po
../coregrind/link_tool_exe_linux 0x38000000 gcc  -Wno-long-long  -Wno-pointer-sign -fno-stack-protector   -o memcheck-x86-linux -m32 -mpreferred-stack-boundary=2 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -O2 -static -nodefaultlibs -nostartfiles -u _start -Wl,--build-id=none -m32 memcheck_x86_linux-mc_leakcheck.o memcheck_x86_linux-mc_malloc_wrappers.o memcheck_x86_linux-mc_main.o memcheck_x86_linux-mc_translate.o memcheck_x86_linux-mc_machine.o memcheck_x86_linux-mc_errors.o ../coregrind/libcoregrind-x86-linux.a ../VEX/libvex-x86-linux.a -lgcc 

머가 문제인지 모르겠으나..
아마도..(?) -lgcc로 gcc.a라던가 이런게 전송이 안되서 그런게 아닐까 추측이 된다. 

ubuntu 12.04 기준
/usr/lib/gcc/i686-linux-gnu/4.6.3/libgcc.a 가 존재한다.
[링크 : http://askubuntu.com/questions/346377/cannot-find-lgcc-s]

아마도.. 두개의 시스템 gcc 버전이 상이하거나 아키텍쳐 상의 차이로
디렉토리가 달라 libgcc.a 의 경로를 찾지 못해 에러가 난 것으로 보인다.
즉.. distcc를 구성할때는 동일한 배포판, 동일한 버전으로 설치해야 사용이 용이할 것으로 보인다.

--

임시 파일은 /tmp에 생성된다.
/tmp$ ll
합계 804
drwxrwxrwt  8 root     root     245760 12월 12 13:36 ./
drwxr-xr-x 23 root     root       4096  6월 11  2014 ../
drwxrwxrwt  2 root     root       4096 12월 12 10:38 .ICE-unix/
-r--r--r--  1 root     root         11 12월 12 10:37 .X0-lock
drwxrwxrwt  2 root     root       4096 12월 12 10:37 .X11-unix/
-rw-------  1 distccd  nogroup  315392 12월 12 13:36 ccIxjVed.s
-rw-------  1 distccd  nogroup       0 12월 12 13:35 distcc_d37970ab.stderr
-rw-r--r--  1 distccd  nogroup       0 12월 12 13:35 distcc_d41570ab.stdout
-rw-------  1 distccd  nogroup  225936 12월 12 13:35 distccd_c84770ab.i
-rw-------  1 distccd  nogroup       0 12월 12 13:35 distccd_d70770ab.o
drwx------  2 minimonk minimonk   4096 12월 12 10:38 keyring-ZMR3zZ/
drwx------  2 minimonk minimonk   4096 12월 12 10:38 pulse-Gj2NwjL3C0so/
drwx------  2 root     root       4096 12월 12 10:37 pulse-PKdhtXMmr18n/
drwx------  2 minimonk minimonk   4096 12월 12 10:38 ssh-vFvOqnIn1567/
-rw-rw-r--  1 minimonk minimonk      0 12월 12 10:37 unity_support_test.0 

[링크 : http://manpages.ubuntu.com/manpages/maverick/man1/distccd.1.html]

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc-pump error  (0) 2016.09.25
distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 작동모드  (0) 2014.12.09
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
Posted by 구차니
gss-api (Generic Security Services Application Program Interface)
안전하게 소스코드를 공유해서 분산빌드 하는데 필요한 API

distcc 의 모드
plain - distcc를 구동하는 쪽(client)에서 pre-processor를 처리후 원격지에서 컴파일 / 어셈블리
           결과물만 돌려받고 로컬에서 링킹
pump - 원격지(distcc 서버)에서 pre-processor / 컴파일 / 어셈블리까지 처리

ccache 와 pump동시 사용불가

구성방법은
distcc
ccache + distcc
pump + distcc 이나
include path 등의 문제로 인해 distcc 단독으로 사용하거나 ccache + distcc 정도가 무난할 것으로 생각된다.


HOW PLAIN (NON-PUMP) DISTCC WORKS
distcc only ever runs the compiler and assembler remotely. With plain distcc, the preprocessor must always run locally because it needs to access various header files on the local machine which may not be present, or may not be the same, on the volunteer. The linker similarly needs to examine libraries and object files, and so must run locally.
The compiler and assembler take only a single input file (the preprocessed source) and produce a single output (the object file). distcc ships these two files across the network and can therefore run the compiler/assembler remotely.
Fortunately, for most programs running the preprocessor is relatively cheap, and the linker is called relatively infrequent, so most of the work can be distributed.
distcc examines its command line to determine which of these phases are being invoked, and whether the job can be distributed.
 
HOW DISTCC-PUMP MODE WORKS
In pump mode, distcc runs the preprocessor remotely too. To do so, the preprocessor must have access to all the files that it would have accessed if had been running locally. In pump mode, therefore, distcc gathers all of the recursively included headers, except the ones that are default system headers, and sends them along with the source file to the compilation server.
In distcc-pump mode, the server unpacks the set of all source files in a temporary directory, which contains a directory tree that mirrors the part of the file system that is relevant to preprocessing, including symbolic links.
The compiler is then run from the path in the temporary directory that corresponds to the current working directory on the client. To find and transmit the many hundreds of files that are often part of a single compilation, pump mode uses an incremental include analysis algorithm. The include server is a Python program that implements this algorithm. The pump command starts the include server so that throughout the build it can answer include queries by distcc commands.
The include server uses static analysis of the macro language to deal with conditional compilation and computed includes. It uses the property that when a given header file has already been analyzed for includes, it is not necessary to do so again if all the include options (-I's) are unchanged (along with other conditions).
For large builds, header files are included, on average, hundreds of times each. With distcc-pump mode each such file is analyzed only a few times, perhaps just once, instead of being preprocessed hundreds of times. Also, each source or header file is now compressed only once, because the include server memoizes the compressed files. As a result, the time used for preparing compilations may drop by up to an order of magnitude over the preprocessing of plain distcc.
Because distcc in pump mode is able to push out files up to about ten times faster, build speed may increase 3X or more for large builds compared to plain distcc mode.

RESTRICTIONS FOR PUMP MODE
Using pump mode requires both client and servers to use release 3.0 or later of distcc and distccd (respectively).
The incremental include analysis of distc-pump mode rests on the fundamental assumption that source and header files do not change during the build process. A few complex build systems, such as that for Linux kernel 2.6, do not quite satisfy this requirement. To overcome such issues, and other corner cases such as absolute filepaths in includes, see the include_server(1) man page.
Another important assumption is that the include configuration of all machines must be identical. Thus the headers under the default system path must be the same on all servers and all clients. If a standard GNU compiler installation is used, then this requirement applies to all libraries whose header files are installed under /usr/include or /usr/local/include/. Note that installing software packages often lead to additional headers files being placed in subdirectories of either.
If this assumption does not hold, then it is possible to break builds with distcc-pump mode, or worse, to get wrong results without warning. Presently this condition is not verified, and it is on our TODO list to address this issue.
An easy way to guarantee that the include configurations are identical is to use a cross-compiler that defines a default system search path restricted to directories of the compiler installation.
See the include_server(1) manual for more information on symptoms and causes of violations of distcc-pump mode assumptions. 

USING DISTCC WITH CCACHE
ccache is a program that speeds software builds by caching the results of compilations. ccache is normally called before distcc, so that results are retrieved from a normal cache. Some experimentation may be required for idiosyncratic makefiles to make everything work together.
The most reliable method is to set

CCACHE_PREFIX="distcc"
This tells ccache to run distcc as a wrapper around the real compiler. ccache still uses the real compiler to detect compiler upgrades.
ccache can then be run using either a masquerade directory or by setting

CC="ccache gcc"
As of version 2.2, ccache does not cache compilation from preprocessed source and so will never get a cache hit if it is run from distccd or distcc. It must be run only on the client side and before distcc to be any use.
distcc's pump mode is not compatible with ccache.

[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html


[링크 : http://www.rasplay.org/?p=8567]
[링크 : http://en.m.wikipedia.org/wiki/Generic_Security_Services_Application_Program_Interface]

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
distcc - 네트워크 분산 컴파일  (2) 2010.03.04
Posted by 구차니
distcc는 단순하게(?) 분산 컴파일을 하는 녀석이고
ccache은 distcc시 컴파일 된 것을 캐싱해서 중복컴파일 하지 않도록 해준다는데.
아무튼 두개를 같이 쓰지 하나만 독립적으로 쓰는건 드물다고 한다.

그런데.. ccache -C와 같이 캐싱된걸 지우는게 가끔 필요한 것으로 봐서는
캐싱하고 문제가 생길 바에는 조금 느려도 매번 distcc만 사용해서 쌩으로 컴파일 하는게 나을지도 모르겠다.

[링크 : http://whatwant.tistory.com/421]
[링크 : https://ccache.samba.org/]

distcc pump mode
[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html]
Posted by 구차니
서버측

$ sudo apt-get install distcc distccmon-gnome

$ sudo vi /etc/default/distcc

STARTDISTCC="true"
ALLOWEDNETS="192.168.1.5/24 127.0.0.1"
LISTENER="192.168.1.5 127.0.0.1"
NICE="10"
JOBS=""
ZEROCONF="false"
 
$ sudo service distcc start
 * Starting Distributed Compiler Daemon: distccd                         [ OK ]

$ ps -ef | grep dist
distccd  18285     1  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18286 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18289 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18290 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18291 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18292 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
distccd  18293 18285  0 22:10 ?        00:00:00 /usr/bin/distccd --pid-file=/var/run/distccd.pid --log-file=/var/log/distccd.log --daemon --allow 192.168.1.0/24 --allow 127.0.0.1 --listen 192.168.1.5 127.0.0.1 --nice 0
minimonk 18297 17675  0 22:10 pts/1    00:00:00 grep --color=auto dist 

클라이언트 측
$ sudo apt-get install distcc
$ export DISTCC_HOSTS='192.168.1.5 localhost'
$ CC="distcc gcc" ./configure
$ make -j 8 

[링크 : http://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_22]

클라이언트에서 make -j 8 하니 서버에서 이렇게 cpu가 올라간다!! 우오오?!


valgrind를 컴파일 하는데 흐음..
네트워크 를 생각외로 많이 사용해 지는거 같기도 하고? (일단은.. 1MB/s 정도?)



gnome으로 된 distcc 모니터는 설정에 관련된 부분은 존재하지 않는다 -_-
$ sudo apt-cache search distcc
ccontrol - Compilation controller
distcc - Simple distributed compiler client and server
distcc-pump - pump mode for distcc a distributed compiler client and server
distccmon-gnome - GTK+ monitor for distcc a distributed client and server
dmucs - distributed compilation system for use with distcc
ubuntu-orchestra-modules-distcc - Modules mainly used by orchestra-management-server

$ distccmon-gnome



아무런 내용이 나오지 않는건.. 호스트 파일이 존재하지 않아서 이려나?
$ sudo distcc --show-hosts
distcc[18944] (dcc_parse_hosts) Warning: /home/minimonk/.distcc/zeroconf/hosts contained no hosts; can't distribute work
distcc[18944] (dcc_zeroconf_add_hosts) CRITICAL! failed to parse host file.

distcc[18944] (dcc_show_hosts) CRITICAL! Failed to get host list 

$ distcc
distcc 3.1 i686-pc-linux-gnu
  (protocols 1, 2 and 3) (default port 3632)
  built Jul 17 2011 15:03:13
Copyright (C) 2002, 2003, 2004 by Martin Pool.
Includes miniLZO (C) 1996-2002 by Markus Franz Xaver Johannes Oberhumer.
Portions Copyright (C) 2007-2008 Google.

distcc comes with ABSOLUTELY NO WARRANTY.  distcc is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Built with Zeroconf support.

Please report bugs to distcc@lists.samba.org

Usage:
   distcc [COMPILER] [compile options] -o OBJECT -c SOURCE
   distcc --help

Options:
   COMPILER                   defaults to "cc"
   --help                     explain usage and exit
   --version                  show version and exit
   --show-hosts               show host list and exit
   -j                         calculate the concurrency level from the host list.

Environment variables:
   See the manual page for a complete list.
   DISTCC_VERBOSE=1           give debug messages
   DISTCC_LOG                 send messages to file, not stderr
   DISTCC_SSH                 command to run to open SSH connections
   DISTCC_DIR                 directory for host list and locks

Server specification:
A list of servers is taken from the environment variable $DISTCC_HOSTS, or
$DISTCC_DIR/hosts, or ~/.distcc/hosts, or /etc/distcc/hosts.
Each host can be given in any of these forms, see the manual for details:

   localhost                  run in place
   HOST                       TCP connection, port 3632
   HOST:PORT                  TCP connection, specified port
   @HOST                      SSH connection
   USER@HOST                  SSH connection to specified host
   --randomize                Randomize the server list before execution

distcc distributes compilation jobs across volunteer machines running
distccd.  Jobs that cannot be distributed, such as linking or
preprocessing are run locally.  distcc should be used with make's -jN
option to execute in parallel on several machines.


$ vi /etc/default/distcc
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc

#
# should distcc be started on boot?
#
# STARTDISTCC="true"

STARTDISTCC="false"

#
# Which networks/hosts should be allowed to connect to the daemon?
# You can list multiple hosts/networks separated by spaces.
# Networks have to be in CIDR notation, f.e. 192.168.1.0/24
# Hosts are represented by a single IP Adress
#
# ALLOWEDNETS="127.0.0.1"

ALLOWEDNETS="127.0.0.1"

#
# Which interface should distccd listen on?
# You can specify a single interface, identified by it's IP address, here.
#
# LISTENER="127.0.0.1"

LISTENER="127.0.0.1"

#
# You can specify a (positive) nice level for the distcc process here
#
# NICE="10"

NICE="10"

#
# You can specify a maximum number of jobs, the server will accept concurrently
#
# JOBS=""

JOBS=""

#
# Enable Zeroconf support?
# If enabled, distccd will register via mDNS/DNS-SD.
# It can then automatically be found by zeroconf enabled distcc clients
# without the need of a manually configured host list.
#
# ZEROCONF="true"

ZEROCONF="false" 

$ vi /etc/distcc/hosts
# As described in the distcc manpage, this file can be used for a global
# list of available distcc hosts.
#
# The list from this file will only be used, if neither the
# environment variable DISTCC_HOSTS, nor the file $HOME/.distcc/hosts
# contains a valid list of hosts.
#
# Add a list of hostnames in one line, seperated by spaces, here.
+zeroconf 
[링크 : http://pointclouds.org/documentation/advanced/distcc.php]


Posted by 구차니
컴파일 속도를 올리는 법을 찾다보니
distcc라는 녀석이 나온다.
원래 samba에서 관리하던 녀석인가?

60-second instructions:

  1. For each machine, download distcc unpack, and do
    ./configure && make && sudo make install
  2. On each of the servers, run distccd --daemon, with --allow options to restrict access.
  3. Put the names of the servers in your environment:
    export DISTCC_HOSTS='localhost red green blue'
  4. Build!
    cd ~/work/myproject; make -j8 CC=distcc

아무튼 CC를 distcc 로 해서 사용하고
distcc / distccd 조합으로 네트워크를 통해서 병행처리 하는 것으로 보인다.

[링크 : http://mechta.kr/51]
[링크 : http://distcc.samba.org/]
[링크 : http://distcc.org -> http://code.google.com/p/distcc/]



2010.07.08 추가

심볼릭 링크를 변경함으로서 distcc를 cross-compile에도 사용가능 하도록 해준다.
(해보진 않았으나 이런 문서만 발견 -0-)
[링크 : http://www.gentoo.org/doc/en/cross-compiling-distcc.xml]


+
2014.09.30 추가
[링크 : http://whatwant.tistory.com/423

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
distcc 작동모드  (0) 2014.12.09
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
Posted by 구차니