[head] Java bootstrap failure: natClip.cc:26: syntax error before`;'

Zack Weinberg zackw@stanford.edu
Sat Feb 17 12:01:00 GMT 2001


On Sat, Feb 17, 2001 at 10:40:43AM +0100, Gerald Pfeifer wrote:
> On Sat, 17 Feb 2001, Bryce McKinlay wrote:
> > So, the problem is that the appropriate libstdc++ -I flags (the
> > contents of $builddir/libstdc++-v3/src/libstdc++.INC) arn't getting
> > included in what the toplevel passes down to libjava's make in the CXX
> > variable.
> >
> > This seems to crop up occasionally, but I dont really know what causes
> > it. "rm -rf" your build directory and starting again ought to fix it
> > ;-)
> 
> No, I'm using a fresh build directory for every build :-)  (and I got this
> failure three times yesterday before reporting it).

I get this too.  It's classic incomprehensible shell/Make behavior.

In the top level configure.in, there is this lovely bit of gibberish:

# Don't use libstdc++-v3's flags to configure/build itself.
libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'

Yep, all one long line.  This gets stuffed into the definition of
CXX_FOR_TARGET in the top level Makefile.  When we go to build
libjava, it does export CXX="$(CXX_FOR_TARGET)" first.

If I replace the backquoted expression with 
`cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC` 
then libjava completes its build successfully.  So the problem is not
with finding libstdc++.INC, or its contents.  And $$dir is libjava, so
the cat should get executed - but it doesn't.  I stuck debugging echos
all over that thing and it appears that neither branch of the case
gets executed.  I don't know how that could happen, but it is.

zw



More information about the Gcc-bugs mailing list