Skip to content

Build glm.cppm module with GLM_ENABLE_EXPERIMENTAL defined fails #1388

@isvilen

Description

@isvilen
g++ -std=c++20 -fmodules -DGLM_ENABLE_EXPERIMENTAL -c /usr/include/glm/glm.cppm
In file included from /usr/include/glm/gtx/string_cast.hpp:45,
                 from /usr/include/glm/ext.hpp:251,
                 from /usr/include/glm/glm.cppm:8:
/usr/include/glm/gtx/string_cast.inl:161:55: error: ‘template<glm::qualifier Q> static std::string glm::detail::compute_to_string<glm::vec<2, bool, Q> >::call(const glm::vec<2, bool, Q>&)’ exposes TU-local entity ‘glm::detail::LabelTrue’
  161 |                 GLM_FUNC_QUALIFIER static std::string call(vec<2, bool, Q> const& x)
      |                                                       ^~~~
/usr/include/glm/gtx/string_cast.inl:46:28: note: ‘glm::detail::LabelTrue’ declared with internal linkage
   46 |         static const char* LabelTrue = "true";
      |                            ^~~~~~~~~
/usr/include/glm/gtx/string_cast.inl:172:55: error: ‘template<glm::qualifier Q> static std::string glm::detail::compute_to_string<glm::vec<3, bool, Q> >::call(const glm::vec<3, bool, Q>&)’ exposes TU-local entity ‘glm::detail::LabelTrue’
  172 |                 GLM_FUNC_QUALIFIER static std::string call(vec<3, bool, Q> const& x)
      |                                                       ^~~~
/usr/include/glm/gtx/string_cast.inl:46:28: note: ‘glm::detail::LabelTrue’ declared with internal linkage
   46 |         static const char* LabelTrue = "true";
      |                            ^~~~~~~~~
/usr/include/glm/gtx/string_cast.inl:184:55: error: ‘template<glm::qualifier Q> static std::string glm::detail::compute_to_string<glm::vec<4, bool, Q> >::call(const glm::vec<4, bool, Q>&)’ exposes TU-local entity ‘glm::detail::LabelTrue’
  184 |                 GLM_FUNC_QUALIFIER static std::string call(vec<4, bool, Q> const& x)
      |                                                       ^~~~
/usr/include/glm/gtx/string_cast.inl:46:28: note: ‘glm::detail::LabelTrue’ declared with internal linkage
   46 |         static const char* LabelTrue = "true";
      |                            ^~~~~~~~~
/usr/include/glm/gtx/string_cast.inl:151:55: error: ‘template<glm::qualifier Q> static std::string glm::detail::compute_to_string<glm::vec<1, bool, Q> >::call(const glm::vec<1, bool, Q>&)’ exposes TU-local entity ‘glm::detail::LabelTrue’
  151 |                 GLM_FUNC_QUALIFIER static std::string call(vec<1, bool, Q> const& x)
      |                                                       ^~~~
/usr/include/glm/gtx/string_cast.inl:46:28: note: ‘glm::detail::LabelTrue’ declared with internal linkage
   46 |         static const char* LabelTrue = "true";
g++ --version
g++ (GCC) 15.2.1 20250808 (Red Hat 15.2.1-1)

This happens on Linux Fedora 42 release, glm version is glm-devel-1.0.1-3.fc42.noarch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions