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

Build fails on musl due to missing type #996

Closed
orlitzky opened this issue Feb 9, 2024 · 1 comment · Fixed by #997
Closed

Build fails on musl due to missing type #996

orlitzky opened this issue Feb 9, 2024 · 1 comment · Fixed by #997
Labels
bug Label for issues or PR which report or fix bugs C++ language Label for PR/issues related to the kernel module

Comments

@orlitzky
Copy link

orlitzky commented Feb 9, 2024

Original report: https://bugs.gentoo.org/924165

When using the musl C library, semigroups fails to build with the error,

src/to_gap.hpp: In member function 'OpaqueBag* gapbind14::to_gap<libsemigroups::PBR>::operator()(libsemigroups::PBR) const':
src/to_gap.hpp:469:12: error: 'u_int32_t' was not declared in this scope; did you mean 'uint32_t'?
  469 |       for (u_int32_t i = 0; i < 2 * x.degree(); i++) {
      |            ^~~~~~~~~
      |            uint32_t

From what I gather, the u_int32_t alias is a GNUism, defined in sys/types.h shipped by glibc, but not guaranteed to exist anywhere else. The musl libc, for example, does not typedef it unless #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE).

Hopefully this is as simple as deleting the first underscore to obtain the ISO type uint32_t.

@james-d-mitchell
Copy link
Collaborator

Thanks @orlitzky, I think this is is just a typo really, and can safely be replaced with uint32_t. We are testing libsemigroups with musl, but not Semigroups.

@james-d-mitchell james-d-mitchell added bug Label for issues or PR which report or fix bugs C++ language Label for PR/issues related to the kernel module labels Feb 10, 2024
james-d-mitchell added a commit to james-d-mitchell/Semigroups that referenced this issue Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label for issues or PR which report or fix bugs C++ language Label for PR/issues related to the kernel module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants