autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with symlinks and VPATH Builds


From: Mark D. Roth
Subject: Re: Problem with symlinks and VPATH Builds
Date: Tue, 23 Jul 2002 22:02:53 -0500
User-agent: Mutt/1.2.5i

On Tue Jul 23 13:31 2002 -0700, Paul Eggert wrote:
> I'd rather try $PWD, then pwd, and fall back on /bin/pwd only if the
> other two methods don't work.  That way, the names will be nicer.

That won't solve the problem, specifically because $PWD and pwd give
the "nice" path names.  The problem is that ksh is trying to interpret
relative paths based on the string in $PWD rather than by actually
traversing the ".." links, as shown here:

address@hidden:/scratch/ac> ksh
$ cd usr/local/src/dummy-0.1
$ pwd
/scratch/ac/usr/local/src/dummy-0.1
$ ls -laF ../../common
total 3
drwxr-xr-x   3 roth     users         512 Jul 23 21:46 ./
drwxr-xr-x   4 roth     users         512 Jul 23 21:46 ../
drwxr-xr-x   3 roth     users         512 Jul 23 21:46 dummy-0.1/
$ cd ../../common
ksh: ../../common:  not found
$ cd /scratch/ac/projects/encap-src/psg/sparc-solaris8/dummy-0.1
$ pwd
/scratch/ac/projects/encap-src/psg/sparc-solaris8/dummy-0.1
$ ls -laF ../../common
total 3
drwxr-xr-x   3 roth     users         512 Jul 23 21:46 ./
drwxr-xr-x   4 roth     users         512 Jul 23 21:46 ../
drwxr-xr-x   3 roth     users         512 Jul 23 21:46 dummy-0.1/
$ cd ../../common
$ pwd
/scratch/ac/projects/encap-src/psg/common
$ 


> I don't observe any problem with ksh either.  Here's what I get:
[...]

And I still see the problem:

address@hidden:/scratch/ac> which ksh
/usr/bin/ksh
address@hidden:/scratch/ac> /bin/uname -a
SunOS coredump.cso.uiuc.edu 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10
address@hidden:/scratch/ac> ksh -x doit
+ R=/scratch/ac
+ cd /scratch/ac
+ rm -fr projects usr
+ mkdir -p projects/encap-src/psg/common
+ mkdir -p projects/encap-src/psg/sparc-solaris8
+ mkdir -p usr/local
+ ln -s /scratch/ac/projects/encap-src/psg/sparc-solaris8 usr/local/src
+ cd projects/encap-src/psg/common
+ mkdir dummy-0.1
+ cd dummy-0.1
+ touch dummy.c Makefile.in
+ cat
+ 1> configure.ac 0< /tmp/sh56.1
+ autoconf
+ autoheader
autoheader: `config.h.in' is created
+ cd usr/local/src
+ mkdir dummy-0.1
+ cd dummy-0.1
+ echo PWD = /scratch/ac/usr/local/src/dummy-0.1
PWD = /scratch/ac/usr/local/src/dummy-0.1
+ ../../common/dummy-0.1/configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
configure: creating ./config.status
./config.status[551]: ../../common/dummy-0.1:  not found
./config.status[552]: ../../common/dummy-0.1:  not found
config.status: creating Makefile
config.status: creating config.h
address@hidden:/scratch/ac> 

If it matters, my system has Sun patch 110662-07 installed.  That
shouldn't matter, since I can replicate this problem on other
platforms as well, but it's always better to check these things...

Interestingly, I just noticed that the configure script uses /bin/sh,
but config.status uses ksh:

address@hidden:/scratch/ac> head -1 
projects/encap-src/psg/common/dummy-0.1/configure
#! /bin/sh
address@hidden:/scratch/ac> head -1 usr/local/src/dummy-0.1/config.status 
#! /bin/ksh

Is this what you're seeing as well?  If your config.status were being
created using /bin/sh, then that might explain why you're not seeing
the problem...

-- 
Mark D. Roth <address@hidden>
http://www.feep.net/~roth/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]