|
From: Ethan M. (UW) <me...@uw...> - 2019-11-04 03:47:25
|
On Sunday, 03 November 2019 18:56:09 Ethan Merritt wrote:
> > /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/cstddef:37:
> > ../version:1:1: error: expected unqualified-id
> > 5.2
> > ^
> >
> > > And frankly, I cannot believe any tool vendor nor standardization body
> > > would be so daft as to assume that <version.h> is a suitable name for a
> > > new standard header. There must be roughly several million pre-existing
> > > user header files by that name out there that this would trample on.
> >
> > Well ... the fact is that the build breaks when using the latest clang
> > compiler. And on old OS versions this is now the default behaviour in
> > MacPorts, so gnuplot build is currently broken for many of our users.
>
> I can build from current git head using clang 9.0.0 without any problem.
> My wxgtk version is 3.1
>
> On my system cstddef.h does not refer to VERSION anywhere.
> However that file came from gcc, not from llvm.
> I don't know where that gets us in debugging your problem,
> but it seems not to be a problem with clang per se.
>
> Note that the syntax
> #include <FILENAME>
> should only look in "a standard list of system directories".
> I do not know where that standard list is defined, but in any
> case it should not include the current working directory.
> So a local file named VERSION would not conflict.
>
> Ethan
>
>
> >
> > It hardly makes sense to start pointing fingers about who was supposed
> > to figure out that VERSION would be loaded first when one of the
> > compiler's own files says "#include <version>" ...
> >
> > Mojca
Upon further reflection...
Your error message cannot be coming from a filename.
It is the VERSION symbol itself that may be an issue.
Can you compile a junk program?
clang -o helloworld -DVERSION="6.7" helloworld.cpp
If defining VERSION breaks your compile chain that is clearly
a problem, but it has nothing to do with gnuplot file names.
Ethan
--
Ethan A Merritt, Dept of Biochemistry
Biomolecular Structure Center, K-428 Health Sciences Bldg
MS 357742, University of Washington, Seattle 98195-7742
|