Bug 2562

Summary: imake tries running files in /tmp/
Product: xorg Reporter: Geoffrey Derber <gderber>
Component: Build/MonolithicAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: eich, gjgowey, roland.mainz
Version: 6.8.2   
Hardware: x86 (IA32)   
OS: Linux (All)   
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 5799    

Description Geoffrey Derber 2005-02-17 13:56:39 UTC
imake tries running file in /tmp/ this will not work with systems that mount
/tmp/ noexec

The entire compile:

make[1]: Entering directory `/usr/src/xc'

Building Release 6.8.2.

I hope you checked the configuration parameters in ./config/cf
to see if you need to pass BOOTSTRAPCFLAGS.

Thu Feb 17 16:58:49 EST 2005

cd ./config/imake && /usr/bin/make -w -f Makefile.ini BOOTSTRAPCFLAGS="" CC="cc"
make[2]: Entering directory `/usr/src/xc/config/imake'
rm -f ccimake imake.o imake
rm -f *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a tags TAGS make.log \#*
rm -f -r Makefile.proto Makefile Makefile.dep bootstrap
rm -f imakemdep_cpp.h
make[2]: Leaving directory `/usr/src/xc/config/imake'
/usr/bin/make -w Makefile.boot
make[2]: Entering directory `/usr/src/xc'
cd ./config/imake && /usr/bin/make -w -f Makefile.ini BOOTSTRAPCFLAGS="" CC="cc"
make[3]: Entering directory `/usr/src/xc/config/imake'
cc -o ccimake -DCROSSCOMPILEDIR=\"\"  -O -I../../include -I../../imports/x11/inc
lude/X11 ccimake.c
if [ -n "" ] ; then \
/cc -E `./ccimake` \
-DCROSSCOMPILE_CPP imakemdep.h > imakemdep_cpp.h; \
else touch imakemdep_cpp.h; fi
cc -c  -O -I../../include -I../../imports/x11/include/X11 `./ccimake` imake.c
cc -o imake  -O -I../../include -I../../imports/x11/include/X11 imake.o
make[3]: Leaving directory `/usr/src/xc/config/imake'
rm -f ./config/makedepend/Makefile.proto
./config/imake/imake -I./config/cf  -s ./config/makedepend/Makefile.proto -f ./c
onfig/makedepend/Imakefile -DTOPDIR=../.. -DCURDIR=./config/makedepend
sh: /tmp/imake8v4KbF: Permission denied
make[2]: Leaving directory `/usr/src/xc'
make[2]: *** [config/makedepend/Makefile.proto] Aborted
make[2]: *** Deleting file `config/makedepend/Makefile.proto'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/usr/src/xc'

the "sh: /tmp/imake8v4KbF: Permission denied" seems particularly indicative of
the problem.
Comment 1 Roland Mainz 2005-03-01 23:12:24 UTC
It seems that imake is placing a script in /tmp and then tries to run it
there... weired...
CC:'ing Egbert Eich who knows imake little bit better than I do...
Comment 2 Egbert Eich 2005-03-03 10:43:24 UTC
imake needs to test for the libc version. To do so it needs to run a program.
This is placed in /tmp.
Since the build system is going to be replaced I don't think it's worthwile fixing.
Comment 3 Geoff Gowey 2006-07-12 05:24:37 UTC
This problem was from 2005 and it's now July 2006.  I'm getting the same error
with the CVS version.  I'm ssh'd in and I've even tried setting /tmp to 777. 
What would a temporary work around consist of?

Comment 4 Geoff Gowey 2006-07-12 09:16:19 UTC
I found a solution.  Change imake.c so that instead of /tmp/imakeXXXXX it reads
./imakeXXXXX .  Works like a champ.

Comment 5 Erik Andren 2006-08-03 03:01:50 UTC
Geoff, could you please post a patch showing your changes?
Comment 6 Daniel Stone 2007-02-27 01:25:25 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 7 Donnie Berkholz 2007-08-01 16:34:46 UTC
1.0.2 has a patch that lets you set the TMPDIR environment variable to point to some other location.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.