Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to build with gcc-13 #678

Closed
drew-parsons opened this issue Jul 20, 2023 · 1 comment
Closed

fails to build with gcc-13 #678

drew-parsons opened this issue Jul 20, 2023 · 1 comment

Comments

@drew-parsons
Copy link
Contributor

drew-parsons commented Jul 20, 2023

Debian reports that basix 0.6.0 is failing to build with gcc-13, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037650
mainly affecting finite-element.cpp, finite-element.h, precompute.h
A failing build log can be found at https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/fenics-basix.html
e.g.

[ 75%] Building CXX object CMakeFiles/basix.dir/basix/e-regge.cpp.o
/usr/bin/c++ -Dbasix_EXPORTS -I/build/1st/fenics-basix-0.6.0/obj-x86_64-linux-gnu -I/build/1st/fenics-basix-0.6.0/cpp -g -O2 -ffile-prefix-map=/build/1st/fenics-basix-0.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++20 -fPIC -MD -MT CMakeFiles/basix.dir/basix/e-regge.cpp.o -MF CMakeFiles/basix.dir/basix/e-regge.cpp.o.d -o CMakeFiles/basix.dir/basix/e-regge.cpp.o -c /build/1st/fenics-basix-0.6.0/cpp/basix/e-regge.cpp
In file included from /build/1st/fenics-basix-0.6.0/cpp/basix/interpolation.cpp:6:
/build/1st/fenics-basix-0.6.0/cpp/basix/finite-element.h:786:42: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  786 |   void permute_dofs(const std::span<std::int32_t>& dofs,
      |                                          ^~~~~~~

There was a gcc-13 issue with dolfinx, which is apparently resolved by FEniCS/dolfinx#2646 , using int instead of int32_t. But basix is still using std::int32_t.

The GNU gcc-13 guide indicates <cstdint> should now be included to get std::int32_t. Currently finite-element.h is not including it explicitly. #664 included <concept> and <utility> but not <cstdint>, and it's not obvious that it would give a successful build with gcc-13.

Is it possible to say which patch in the main branch might have fixed basix builds with gcc-13?

rmsc added a commit to rmsc/basix that referenced this issue Aug 20, 2023
* Including <cstdint> is required for the std::int32_t type.
garth-wells pushed a commit that referenced this issue Aug 21, 2023
* Including <cstdint> is required for the std::int32_t type.
@garth-wells
Copy link
Member

Fixed in #691.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants