bug-cvs
[Top][All Lists]
Advanced

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

Re: depcomp problem [Fwd: Trying to compile latest CVS on old SCO un


From: Derek R. Price
Subject: Re: depcomp problem [Fwd: Trying to compile latest CVS on old SCO unixware 2]
Date: Mon, 18 Jun 2001 15:04:23 -0400

Stephen Cameron wrote:

> It's getting a bit weird now,
>
> Making all in lib
>         source='argmatch.c' object='argmatch.o' libtool=no \
>         depfile='.deps/argmatch.Po' tmpdepfile='.deps/argmatch.TPo' \
>         depmode=none /bin/sh ../depcomp \
>         ../compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../src      -g 
> -c
> -o argmatch.o `test -f argmatch.c || echo './'`argmatch.c
> UX:as: ERROR: (EOF):cannot open output file: argmatch.o: Is a directory
>
> Say what?!?

The test system probably had ofile defaulting to ./argmatch.o or somesuch...


> So now I try ineptly patching "compile" which gets me a little further, loads
> of .c files compile, but:
> --- compile.orig        Mon Jun 18 05:09:55 2001
> +++ compile     Mon Jun 18 05:11:53 2001
> @@ -47,8 +47,18 @@
>  done
>
>  test -z "$ofile" && {
> -   echo "compile: no \`-o' option seen" 1>&2
> -   exit 1
> +   if [ "$cfile" = "" ]
> +   then
> +       echo "compile: no \`-o' option seen, and no .c file." 1>&2
> +       exit 1
> +   else
> +       ofile=`echo "$cfile" | sed -e "s/\.c$/.o/"`
> +       if [ "$ofile" = "$cfile" ]
> +       then
> +         echo "compile: could not guess .o file from .c file: $cfile"
> +         exit 1
> +       fi
> +   fi
>  }

>  test -z "$cfile" && {

This sounds suspicious, perhaps a symptom of a bug in the makefile rules if you
realy needed it - compile is designed to work around a problem with -o and -c
being used at the same time, so it shouldn't be called without -o or -c...


> @@ -60,7 +70,7 @@
>  cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
>
>  # Create the lock directory.
> -lockdir=`echo $ofile | sed -e 's|/|_|g'`
> +lockdir=`echo "$ofile"".lock" | sed -e 's|/|_|g'`
>  while true; do
>     if mkdir $lockdir > /dev/null 2>&1; then
>        break

Okay, but I have a nitpick.  You shouldn't need the quotes around 
"$ofile"".lock":
$ofile.lock should be sufficient.


> Then running make again:
>
> [....]
> UX:mv: ERROR: version.o and version.o are identical
>         ../compile cc  -g   -o cvs  add.o admin.o annotate.o  buffer.o
> checkin.o checkout.o  classify.o client.o commit.o  create_adm.o cvsrc.o 
> diff.o
>  edit.o entries.o error.o  expand_path.o fileattr.o filesubr.o  find_names.o
> hardlink.o hash.o  history.o ignore.o import.o  lock.o log.o login.o logmsg.o
> main.o mkmodules.o modules.o  myndbm.o no_diff.o parseinfo.o  patch.o rcs.o
> rcscmds.o  recurse.o release.o remove.o  repos.o root.o run.o scramble.o
> server.o status.o subr.o tag.o  update.o vers_ts.o watch.o  wrapper.o zlib.o
> ../diff/libdiff.a  ../lib/libcvs.a  ../zlib/libz.a  version.o -lsocket -lgen
> compile: no `.c' file seen

Okay, this sounds like an Automake bug now.  I suspect compile shouldn't be 
called
for linking... only when both -o and -c are specified.  I'm cc'ing Automake 
again.

Automake folks:  I've included a revised patch for the lockdir line as I'm 
pretty
sure you'll want that bit whatever else comes out of this.


> Hmmm.  At this point I have to wonder if this "compile" script is all it's
> cracked up to be.  It doesn't seem to be able to use cc to just link...(and my
> patch is wrong in that area too.)For that matter, "compile" may be generated 
> by
> automake for all I know.
>
> And, BTW, that "[UX:mv: ERROR: x.o and x.o are identical" appears for pretty
> much every file that gets compiled...
>
> And I wonder about the line in the script:
>
> "$prog" $args
>
> Would that have problems with quoted arguments passed into the script? Not 
> that
> cvs would run into that, but still.

Actually, I think it would, but the source of the problem is the loop that
constructs $args, not this call.  I've included a patch for this too.


> Feel free to forward this email to the automake list, if that's a more
> appropriate destination.

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:dprice@collab.net         CollabNet ( http://collab.net )
--
Round up the usual suspects.

                - Claude Rains as Captain Louis Renault, _Casablanca_


Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1430
diff -u -r1.1430 ChangeLog
--- ChangeLog   2001/06/18 01:08:34     1.1430
+++ ChangeLog   2001/06/18 18:29:45
@@ -1,3 +1,9 @@
+2001-06-18  Derek Price  <dprice@collab.net>
+           Stephen Cameron  <smcameron@yahoo.com>
+
+       * lib/compile: Make sure lockdir doesn't have the same name as the
+       object file.
+
 2001-06-17  Tom Tromey  <tromey@redhat.com>
 
        * automake.in (require_file_internal): Check for already-required
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.3
diff -u -r1.3 compile
--- compile     2000/10/16 09:01:36     1.3
+++ compile     2001/06/18 18:29:46
@@ -60,7 +60,7 @@
 cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
 
 # Create the lock directory.
-lockdir=`echo $ofile | sed -e 's|/|_|g'`
+lockdir=`echo $ofile.lock | sed -e 's|/|_|g'`
 while true; do
    if mkdir $lockdir > /dev/null 2>&1; then
       break
Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1430
diff -u -r1.1430 ChangeLog
--- ChangeLog   2001/06/18 01:08:34     1.1430
+++ ChangeLog   2001/06/18 18:34:54
@@ -1,3 +1,8 @@
+2001-06-18  Derek Price  <dprice@collab.net>
+           Stephen Cameron  <smcameron@yahoo.com>
+
+       * lib/compile: Allow arguments with spaces and other special characters.
+
 2001-06-17  Tom Tromey  <tromey@redhat.com>
 
        * automake.in (require_file_internal): Check for already-required
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.3
diff -u -r1.3 compile
--- compile     2000/10/16 09:01:36     1.3
+++ compile     2001/06/18 18:34:55
@@ -37,10 +37,10 @@
        ;;
     *.c)
        cfile=$1
-       args="$args $1"
+       args="$args '$1'"
        ;;
     *)
-       args="$args $1"
+       args="$args '$1'"
        ;;
    esac
    shift

reply via email to

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