<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>36487</bug_id>
          
          <creation_ts>2003-12-25 10:53 0000</creation_ts>
          <short_desc>distcc Completely Ignores TMPDIR When Set in the Environment</short_desc>
          <delta_ts>2003-12-26 19:33:47 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Development</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ellingsw+20942@gmail.com</reporter>
          <assigned_to>lisa@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>ellingsw+20942@gmail.com</who>
            <bug_when>2003-12-25 10:53:39 0000</bug_when>
            <thetext>First off I use NFS for my home directories and locks cannot be created in distcc&apos;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=&quot;localhost host2 host3&quot;
6. make -j5 HOSTCC=&apos;ccache distcc&apos; CC=&apos;$(HOSTCC)&apos; 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&apos; 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
&lt;snip&gt;

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

$&gt; distcc --version
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) built
Oct 31 2003 20:00:40</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-12-25 10:56:06 0000</bug_when>
            <thetext>set DISTCC_DIR in make.conf</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ellingsw+20942@gmail.com</who>
            <bug_when>2003-12-25 11:13:40 0000</bug_when>
            <thetext>/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&apos;m not running emerge.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lisa@gentoo.org</who>
            <bug_when>2003-12-25 11:59:34 0000</bug_when>
            <thetext>You want to use DISTCC_TMPDIR</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lisa@gentoo.org</who>
            <bug_when>2003-12-25 11:59:55 0000</bug_when>
            <thetext>Woops, DISTCC_DIR - sorry.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ellingsw+20942@gmail.com</who>
            <bug_when>2003-12-26 19:14:17 0000</bug_when>
            <thetext>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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lisa@gentoo.org</who>
            <bug_when>2003-12-26 19:33:47 0000</bug_when>
            <thetext>Sure, feel free to report it.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>