Closed AMDmi3 closed 4 months ago
My builds are failing too, I think it's because Homebrew has moved to version 1.0.1
https://github.com/pemsley/coot/actions/workflows/build-coot-macos.yml
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:49:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.cpp:10:
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:57:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.cpp:10:
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:65:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.cpp:10:
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:73:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.cpp:10:
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:81:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.cpp:10:
In file included from ../../../coot/MoleculesToTriangles/CXXClasses/RepresentationInstance.h:15:
In file included from /usr/local/include/glm/ext.hpp:198:
/usr/local/include/glm/./gtx/bit.hpp:89:17: error: 'nodiscard' attribute cannot be applied to types
GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
^
/usr/local/include/glm/detail/setup.hpp:498:23: note: expanded from macro 'GLM_FUNC_DECL'
#define GLM_FUNC_DECL GLM_NODISCARD GLM_CUDA_FUNC_DECL
^
/usr/local/include/glm/detail/setup.hpp:344:26: note: expanded from macro 'GLM_NODISCARD'
# define GLM_NODISCARD [[nodiscard]]
^
6 errors generated.
make[2]: *** [libMoleculesToTrianglesCXXClasses_la-RepresentationInstance.lo] Error 1
https://github.com/g-truc/glm/pull/1252 was where [[nodiscard]] was added. @christophe-lunarg Can you take a look at this please?
I hope the above PR fixes this.
@christophe-lunarg When are you gonna release a new version of GLM? The SuperTux project relies on GLM for some maths and we're currently using an earlier version in the nightly builds and would like to use a current upstream version.
I've ran into this when build-testing one of glm consumers, gamescope, before updating FreeBSD port of glm to 1.x.
Reproducible with
What preprocessed line looks like:
Smaller repro (note that template is required):
I haven't dug into the docs, but simple experiment revealed two ways to fix it: either change the order of attributes or use attributes of the same format, e.g. change
__attribute__((__deprecated__))
to[[deprecated]
. Both compile by gcc and clang, and I suggest to use[[deprecated]]
in glm, as it's standard and supported sincec++14
.