From: Ethan M. (UW) <me...@uw...> - 2019-11-04 03:00:15
|
On Sunday, 03 November 2019 22:57:19 Mojca Miklavec wrote: > On Sun, 3 Nov 2019 at 22:33, Hans-Bernhard Bröker wrote: > > Am 03.11.2019 um 21:48 schrieb Mojca Miklavec: > > > Dear developers, > > > > > > I would like to request renaming the file version.h (and potentially > > > version.c) to something else, for example gnuplot_version.h. > > > > > > The problem is that C++20 introduced a standard header version.h: > > > https://en.cppreference.com/w/cpp/header/version > > > > That's not actually what that reference says. That header is called > > <version>, not <version.h>. > > I'm sorry, I misread the error report. > > The problem is in fact not with version.h, but with VERSION (please > note that files are case insensitive on macOS). > > I tried to reproduce the problem locally, and here's what I get: > > /opt/local/bin/clang-mp-9.0 -pipe -Os -F/opt/local/Library/Frameworks > -arch x86_64 -ObjC -L/opt/local/lib -Wl,-rpath -Wl,/opt/local/lib > -L/opt/local/lib -Wl,-headerpad_max_install_names > -F/opt/local/Library/Frameworks -arch x86_64 -L/opt/local/lib -lcerf > -framework Foundation -framework AquaTerm -L/opt/local/lib > -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -o > bf_test bf_test.o -lm > In file included from wxterminal/wxt_gui.cpp:93: > In file included from wxterminal/wxt_gui.h:75: > In file included from > /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/wxprec.h:12: > In file included from > /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/defs.h:734: > In file included from > /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/debug.h:14: > In file included from /usr/include/assert.h:44: > In file included from > /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/stdlib.h:100: > In file included from > /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/math.h:337: > In file included from > /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/type_traits:417: > In file included from > /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 > > > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta -- Ethan A Merritt, Dept of Biochemistry Biomolecular Structure Center, K-428 Health Sciences Bldg MS 357742, University of Washington, Seattle 98195-7742 |