Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36487 - distcc Completely Ignores TMPDIR When Set in the Environment
Summary: distcc Completely Ignores TMPDIR When Set in the Environment
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Lisa Seelye (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-25 10:53 UTC by Steven Elling
Modified: 2003-12-26 19:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Elling 2003-12-25 10:53:39 UTC
First off I use NFS for my home directories and locks cannot be created in distcc's default location (~/.distcc).  I have no ideal why NFS locks are not working because I am using the kernel nfs service on my Gentoo server.

I use ccache and distcc to compile my kernels as a normal user and set the environment variable TMPDIR to /tmp to prevent distcc from using my home directory, however, it appears distcc is completely ignoring TMPDIR.

Reproducible: Always
Steps to Reproduce:
1. Mount your home directory from an NFS server.
2. Change the permissions of a kernel source tree under /usr/src so a non-root account can compile the kernel.
3. Configure the kernel.
4. export TMPDIR=/tmp
5. export DISTCC_HOSTS="localhost host2 host3"
6. make -j5 HOSTCC='ccache distcc' CC='$(HOSTCC)' bzImage

Actual Results:  
This is some of the output (edited to remove account name) from a 2.6.0 compile:

make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
  CHK     include/linux/compile.h
  CC      arch/i386/kernel/ptrace.o
  CC      arch/i386/kernel/ldt.o
  CC      arch/i386/kernel/setup.o
distcc[14041] (dcc_lock_host) ERROR: lock ~/.distcc/lock/cpu_localhost_0 failed:
No locks available
distcc[14041] (dcc_lock_one) ERROR: failed to lock
distcc[14039] (dcc_lock_host) ERROR: lock ~/.distcc/lock/cpu_localhost_0 failed:
No locks available
distcc[14039] (dcc_lock_one) ERROR: failed to lock
distcc[14036] (dcc_lock_host) ERROR: lock ~/.distcc/lock/cpu_localhost_0 failed:
No locks available
distcc[14036] (dcc_lock_one) ERROR: failed to lock
<snip>

Expected Results:  
distcc should of created the locks under /tmp and then distributed the compile
to other distcc hosts.

$> distcc --version
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) built
Oct 31 2003 20:00:40
Comment 1 SpanKY gentoo-dev 2003-12-25 10:56:06 UTC
set DISTCC_DIR in make.conf
Comment 2 Steven Elling 2003-12-25 11:13:40 UTC
/etc/make.conf has nothing to do with running make -- independent of the portage system -- inside the kernel source tree.  make.conf is only used during an emerge and obviously I'm not running emerge.
Comment 3 Lisa Seelye (RETIRED) gentoo-dev 2003-12-25 11:59:34 UTC
You want to use DISTCC_TMPDIR
Comment 4 Lisa Seelye (RETIRED) gentoo-dev 2003-12-25 11:59:55 UTC
Woops, DISTCC_DIR - sorry.
Comment 5 Steven Elling 2003-12-26 19:14:17 UTC
Ah, ha! DISTCC_DIR worked.  The distcc man page states:

TMPDIR - System temporary directory. distcc creates a subdirectory whose name  includes the hostname and userid inside this to store all its files. By default /tmp/ is used.

Should I let you guys file a bug report with distcc@lists.samba.org or should I do it?
Comment 6 Lisa Seelye (RETIRED) gentoo-dev 2003-12-26 19:33:47 UTC
Sure, feel free to report it.