cons-discuss
[Top][All Lists]
Advanced

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

Re: Include problem


From: Steven Knight
Subject: Re: Include problem
Date: Fri, 4 May 2001 23:02:27 -0500 (CDT)

Zachary--

> I am compiling on solaris and cons exits with this message:
>
> cons.pl: you have attempted to use path "gandalf_obj/elrond/src/iostream"
> both as a file and as a directory!

This comes from a directory method that simply issues the complaint and
dies, because the requested functionality (is this object accessible?)
really only makes sense for files.  So implicitly, somewhere before:

        #include <iostream/iostream.h>

something in a Conscript file, or turned up in a depenency scan, seemed
to reference gandalf_obj/elrond/src/iostream as a file.

This is a very old piece of code.  Since it was written, Cons has gotten
more tolerant and informative about situations like this, but no one's
gone back and updated this particular method.  This should be fixed to
*not* die, and to report where the (file) object was first defined.

> One problem is that dependency scanner apparently does not understand
> #ifdef.

This is covered in the FAQ:

        8.4. Will Cons use C preprocessor statements to determine dependencies?

        No. Any change to a file, regardless of whether it's surrounded
        by a #ifdef, will change the file's MD5 signature and cause
        a rebuild of all targets that depend on that file. So cons
        may believe that a file depends upon more than it actually
        does. This shouldn't hurt anything. If cons can't actually find
        one of the files that it believes should be a dependency, it
        simply ignores it.

Except, of course, it doesn't ignore it in your case... :-( But the
general point remains.  Trying to vary the dependency list based on
#ifdefs in the code is really problematic.

> Another is that more subtle because I cannot create a small testcase, the
> problem occures only in the context of a fairly large build.

I'll try to come up with a patch that will report where Cons originally
thought "iostream" was referenced as a file.

        --SK




reply via email to

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