Date: Sat, 03 Feb 2024 18:39:10 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 276810] [exp-run] science/netcdf: rename '_FillValue' macro to 'NC_FillValue' Message-ID: <bug-276810-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276810 Bug ID: 276810 Summary: [exp-run] science/netcdf: rename '_FillValue' macro to 'NC_FillValue' Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Ports Framework Assignee: portmgr@FreeBSD.org Reporter: dim@FreeBSD.org CC: ports-bugs@FreeBSD.org While investigating build failures for bug 276104 (clang 18 exp-run), I not= iced the following problem with science/netcdf-cxx, which is ultimately caused by its dependency, science/netcdf: libtool: compile: c++ -DHAVE_CONFIG_H -I. -I.. -fPIC -DPIC -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -MT ncAtt.lo -MD -MP -MF .deps/ncAtt.Tpo -c ncAtt.cpp -fPIC -DPIC -o .libs/ncA= tt.o In file included from ncAtt.cpp:1: In file included from ./ncAtt.h:2: In file included from ./ncException.h:3: In file included from /usr/include/c++/v1/iostream:44: In file included from /usr/include/c++/v1/istream:170: In file included from /usr/include/c++/v1/ostream:187: In file included from /usr/include/c++/v1/bitset:133: /usr/include/c++/v1/__bit_reference:176:16: error: expected ',' or '>' in template-parameter-list 176 | template <bool _FillValue, class _Cp> | ^ /usr/local/include/netcdf.h:113:25: note: expanded from macro '_FillValue' 113 | #define _FillValue "_FillValue" | ^ and lots more of these errors. The problem is that netcdf defines a macro named '_FillValue', but names starting with underscores are reserved for system headers. In this case, li= bc++ 18 uses the same identifier '_FillValue' for a template argument. But becau= se netcdf's definition expands to a literal string, this results in compile errors. I have submitted https://github.com/Unidata/netcdf-c/issues/2858 to ask upstream netcdf-c about this, but pending their answer, I would like to sug= gest an exp-run with the '_FillValue' macro being renamed to 'NC_FillValue', to = get an idea of the fallout. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276810-7788>