From: Mojca M. <moj...@gm...> - 2019-11-03 21:57:39
|
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. 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 |