📄 distcc.1
字号:
server. This is normally only needed if for some reason you can'tinstall distccd into a directory on the default PATH for SSHconnections. Use this if you get errors like "distccd: command notfound" in SSH mode. .TP.B /LIMITA decimal limit can be added to any host specification to restrict thenumber of jobs that this client will send to the machine. The limitdefaults to four per host (two for localhost), but may be furtherrestricted by the server. You should only need to increase this forservers with more than two processors..TP.B ,lzoEnables LZO compression for this TCP or SSH host..PPHere is an example demonstrating some possibilities:.PP.RS.nf.B localhost/2 @bigman/16:/opt/bin/distccd oldmachine:4200/1.B # cartman is down.B distant/3,lzo.fi.RE.PPComments are allowed in host specifications. Comments start with ahash/pound sign (\fB#\fP) and run to the end of the line..PPIf a host in the list is not reachable distcc will emit a warning andignore that host for about one minute..SH "COMPRESSION"The .B lzo host option specifies that LZO compression should be used for datatransfer, including preprocessed source, object code and errormessages. Compression is usually economical on networks slower than100Mbps, but results may vary depending on the network, processors andsource tree..PP Enabling compression makes the distcc client and server use more CPUtime, but less network traffic. The compression ratio is typically4:1 for source and 2:1 for object code..PPUsing compression requires both client and server to use at leastrelease 2.9 of distcc. No server configuration is required: theserver always responds with compressed replies to compressed requests..SH "SEARCH PATHS".PPIf the compiler name is an absolute path, it is passed verbatim to theserver and the compiler is run from that directory. For example:.PP.RS.B distcc /usr/local/bin/gcc-3.1415 -c hello.c.RE.PPIf the compiler name is not absolute, or not fully qualified,distccd's PATH is searched. When distcc is run from a masqueradedirectory, only the base name of the compiler is used. The client'sPATH is used only to run the preprocessor and has no effect on theserver's path..SH "TIMEOUTS".PPBoth the distcc client and server impose timeouts on transfer of dataacross the network. This is intended to detect hosts which are downor unreachable, and to prevent compiles hanging indefinitely if aserver is disconnected while in use. If a client-side timeoutexpires, the job will be re-run locally..PPThe timeouts are not configurable at present..SH "DIAGNOSTICS"Error messages or warnings from local or remote compilers are passedthrough to diagnostic output on the client..PPdistcc can supply extensive debugging information when the verboseoption is used. This is controlled by the .B DISTCC_VERBOSEenvironment variable on the client, and the.B --verboseoption on the server. For troubleshooting, examine both the clientand server error messages..SH "EXIT CODES"The exit code of distcc is normally that of the compiler:zero for successful compilation and non-zero otherwise..PPdistcc distinguishes between "genuine" errors such as a syntax errorin the source, and "accidental" errors such as a networking problemconnecting to a volunteer. In the case of accidental errors, distccwill retry the compilation locally unless the DISTCC_FALLBACK optionhas been disabled..PPIf the compiler exits with a signal, distcc returns an exit code of128 plus the signal number..PPdistcc internal errors cause an exit code between 100 and 127. Inparticular.TP100General distcc failure..TP 105Out of memory..TP 110Compiler not found..TP111Recursive call to distcc..TP 116No hosts defined and fallbacks disabled..PP(Others are listed in exitcode.h.).SH "FILES"If $DISTCC_HOSTS is not set, distcc reads a host list from either .B $DISTCC_DIR/hostsor a system-wide configuration file set at compile time. The filelocations are shown in the output from.B distcc --help.PPdistcc creates a number of temporary and lock files underneath thetemporary directory..SH "ENVIRONMENT VARIABLES"distcc's behaviour is controlled by a number of environment variables.For most cases nothing need be set if the host list is stored in afile..TP.B "DISTCC_HOSTS"Space-separated list of volunteer host specifications..TP.B "DISTCC_VERBOSE"If set to 1, distcc produces explanatory messages on the standarderror stream or in the log file. This can be helpful in debuggingproblems. Bug reports should include verbose output..TP.B "DISTCC_LOG"Log file to receive messages from distcc itself, ratherthan stderr..TP.B "DISTCC_FALLBACK"By default distcc will compile locally if it fails to distribute a jobto the intended machine, or if no host list can be found. If thisvariable is set to 0 then fallbacks are disabled and thosecompilations will simply fail. Note that this does not affect jobswhich must always be local such as linking..TP.B "DISTCC_SAVE_TEMPS"If set to 1, temporary files are not deleted after use. Good fordebugging, or if your disks are too empty..TP.B "DISTCC_TCP_CORK"If set to 0, disable use of "TCP corks", even if they're present onthis system. Using corks normally helps pack requests into fewerpackets and aids performance. This should normally be left enabled..TP.B DISTCC_SSHSpecifies the command used for opening SSH connections. Defaults to"ssh" but may be set to a different connection command such as "lsh"or "tsocks-ssh" that accepts a similar command line. The command isnot split into words and is not executed through the shell. .TP.B "DISTCC_DIR"Per-user configuration directory to store lock files and state files.By default .B ~/.distcc/ is used..TP.B "TMPDIR"Directory for temporary files such as preprocessor output. By default/tmp/ is used..TP.B "UNCACHED_ERR_FD"If set and if DISTCC_LOG is not set, distcc errors are written to thefile descriptor identified by this variable. This variable isintended mainly for automatic use by ccache, which sets it to avoidcaching transient errors such as network problems..SH "CROSS COMPILING"Cross compilation means building programs to run on amachine with a different processor, architecture, oroperating system to where they were compiled. distccsupports cross compilation, including teams ofmixed-architecture machines, although some changes to thecompilation commands may be required..PPThe compilation command passed to distcc must be one thatwill execute properly on every volunteer machine to producean object file of the appropriate type. If the machineshave different processors, then simply using .B distcc ccwill probably not work, because that will normally invoke thevolunteer's native compiler..PPMachines with the same CPU but different operating systems may notnecessarily generate compatible .o files..PPSeveral different gcc configurations can be installedside-by-side on any machine. If you build gcc from source,you should use the .B --program-suffix configurationoptions to cause it to be installed with a name that encodesthe gcc version and the target platform..PPThe recommended convention for the gcc name is.I TARGET-gcc-VERSIONsuch as.B i686-linux-gcc-3.2\&. GCC 3.3 will install itselfunder this name, in addition to .I TARGET-gccand, if it's native, .I gcc-VERSION and .I gcc\&. .PPThe compiler must be installed under the same name on theclient and on every volunteer machine..SH "BUGS"If you think you have found a distcc bug, please see the file.I reporting-bugs.txtin the documentation directory for information on how to report it..PPSome makefiles have missing or extra dependencies that cause incorrector slow parallel builds. Recursive make is inefficient and can leaveprocessors unnecessarily idle for long periods. (See.I Recursive Make Considered Harmfulby Peter Miller.) Makefile bugs are the most common cause of treesfailing to build under distcc. Alternatives to Make such as.I SConscan give much faster builds for some projects..PPUsing different versions of gcc can cause confusing build problemsbecause the header files and binary interfaces have changed over time,and some distributors have included incompatible patches withoutchanging the version number. distcc does not protect against usingincompatible versions. Compiler errors about link problems ordeclarations in system header files are usually due to mismatched orincorrectly installed compilers..PPDue to limitations in gcc, gdb may not be able to automatically findthe source files for programs built using distcc in somecircumstances. The gdb .B directorycommand can be used. This should be fixed in gcc 3.4..PPgcc's .B -MD option can produce output in the wrong directory if the source andobject files are in different directories and the .B -MF option is not used. There is no perfect solution because ofincompatible changes between gcc versions. Explicitly specifying thedependency output file with .B -MFwill fix the problem..PPTCP mode connections should only be used on trusted networks..PPIncluding slow machines in the list of volunteer hosts can slow thebuild down..PPWhen distcc or ccache is used on NFS, the filesystem must be exportedwith the.B no_subtree_check option to allow reliable renames between directories..PPThe compiler can be invoked with a command line.B gcc hello.cto both compile and link. distcc doesn't split this into separateparts, but rather runs the whole thing locally..PPOther known bugs may be documented on .I http://distcc.samba.org/.SH "AUTHOR"distcc was written by Martin Pool <mbp@sourcefrog.net>, with theco-operation of many scholars including Wayne Davison, Frerich Raabe,Dimitri Papadopoulos and others noted in the NEWS file. Please reportbugs to <distcc@lists.samba.org>..SH "LICENCE"You are free to use distcc. distcc (including this manual) may becopied, modified or distributed only under the terms of the GNUGeneral Public Licence version 2 or later. distcc comes withabsolutely no warrany. A copy of the GPL is included in the fileCOPYING..SH "SEE ALSO"distccd(1), ccache(1), gcc(1), make(1).I http://distcc.samba.org/.I http://ccache.samba.org/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -