Skip to content

Apply gap build fix for gcc-15 #40228

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Apply gap build fix for gcc-15 #40228

wants to merge 1 commit into from

Conversation

vbraun
Copy link
Member

@vbraun vbraun commented Jun 8, 2025

Taken from https://src.fedoraproject.org/rpms/gap/blob/rawhide/f/gap-c23.patch

There might be gap packages that need to be fixed separately, but this at least lets us compile the base gap

Copy link

github-actions bot commented Jun 8, 2025

Documentation preview for this PR (built with commit 85c0356; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dimpase
Copy link
Member

dimpase commented Jun 9, 2025

probably needs C standard guard for a preprocessor macro to put patch in, just like glpk

@vbraun
Copy link
Member Author

vbraun commented Jun 9, 2025

I don't think there is any danger of breaking old compilers, the only actual change is

-typedef Obj (* ObjFunc) (/*arguments*/);
+typedef void *ObjFunc;

and thats as old as rocks. There is a longish preamble of the patch that mentions bool.c, but thats just for reference. Maybe you misread that?

@dimpase
Copy link
Member

dimpase commented Jun 9, 2025

dunno, GAP people don't think it's as trivial.
There is an issue on their GitHub, can you find it?

@vbraun
Copy link
Member Author

vbraun commented Jun 9, 2025

Upstream bug is this one: gap-system/gap#5857

The proper fix is probably to turn ObjFunc into a variadic function pointer, as discussed there. The patch here is just using an opaque pointer. It compiles (because nothing in gap ends up calling throught an ObjFunc pointer), but it is more of a bandaid than what I would consider a proper fix. Though good enough for now...

Copy link
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, assuming it's not only compiles, but passes tests (the spkg as well as testlong)

@dimpase
Copy link
Member

dimpase commented Jun 10, 2025

@orlitzky - do you have anything to say on this issue?

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

Successfully merging this pull request may close these issues.

2 participants