Skip to content

freeglut: fix build with gcc15#446347

Merged
bjornfor merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-freeglut-gcc15
Sep 27, 2025
Merged

freeglut: fix build with gcc15#446347
bjornfor merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-freeglut-gcc15

Conversation

@ghpzin

@ghpzin ghpzin commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Fixes build failure with gcc15:

/build/freeglut-3.6.0/src/x11/fg_init_x11.c:297:6: error: conflicting
types for 'fgPlatformDestroyContext'; have 'void(SFG_PlatformDisplay,
struct __GLXcontextRec *)' {aka 'void(struct tagSFG_PlatformDisplay,
struct __GLXcontextRec *)'}
  297 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/freeglut-3.6.0/src/x11/fg_init_x11.c:34:
/build/freeglut-3.6.0/src/egl/fg_init_egl.h:31:13: note: previous
declaration of 'fgPlatformDestroyContext' with type 'void(void)'
   31 | extern void fgPlatformDestroyContext();
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
/build/freeglut-3.6.0/src/x11/fg_init_x11.c:297:6: error: conflicting
types for 'fgPlatformDestroyContext'; have 'void(SFG_PlatformDisplay,
struct __GLXcontextRec *)' {aka 'void(struct tagSFG_PlatformDisplay,
struct __GLXcontextRec *)'}
  297 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/freeglut-3.6.0/src/x11/fg_init_x11.c:34:
/build/freeglut-3.6.0/src/egl/fg_init_egl.h:31:13: note: previous
declaration of 'fgPlatformDestroyContext' with type 'void(void)'
   31 | extern void fgPlatformDestroyContext();
      |             ^~~~~~~~~~~~~~~~~~~~~~~~

Tested build with:

nix-build --expr 'with import ./. {}; freeglut.override { stdenv = gcc15Stdenv; }'

Part of fixes for gcc15 update:
#440456

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Sep 26, 2025
@ghpzin ghpzin changed the base branch from master to staging September 26, 2025 13:17
@nixpkgs-ci nixpkgs-ci Bot closed this Sep 26, 2025
@nixpkgs-ci nixpkgs-ci Bot reopened this Sep 26, 2025
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 26, 2025
- add patch from merged upstream PR:
https://www.github.com/freeglut/freeglut/pull/187

Fixes build failure with gcc15:
```
/build/freeglut-3.6.0/src/x11/fg_init_x11.c:297:6: error: conflicting
types for 'fgPlatformDestroyContext'; have 'void(SFG_PlatformDisplay,
struct __GLXcontextRec *)' {aka 'void(struct tagSFG_PlatformDisplay,
struct __GLXcontextRec *)'}
  297 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/freeglut-3.6.0/src/x11/fg_init_x11.c:34:
/build/freeglut-3.6.0/src/egl/fg_init_egl.h:31:13: note: previous
declaration of 'fgPlatformDestroyContext' with type 'void(void)'
   31 | extern void fgPlatformDestroyContext();
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
/build/freeglut-3.6.0/src/x11/fg_init_x11.c:297:6: error: conflicting
types for 'fgPlatformDestroyContext'; have 'void(SFG_PlatformDisplay,
struct __GLXcontextRec *)' {aka 'void(struct tagSFG_PlatformDisplay,
struct __GLXcontextRec *)'}
  297 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/freeglut-3.6.0/src/x11/fg_init_x11.c:34:
/build/freeglut-3.6.0/src/egl/fg_init_egl.h:31:13: note: previous
declaration of 'fgPlatformDestroyContext' with type 'void(void)'
   31 | extern void fgPlatformDestroyContext();
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
```
@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 26, 2025
@ghpzin ghpzin marked this pull request as ready for review September 26, 2025 13:37
@nix-owners nix-owners Bot requested a review from bjornfor September 26, 2025 13:38

@bjornfor bjornfor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good and builds.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Sep 26, 2025
@bjornfor bjornfor merged commit 80487ae into NixOS:staging Sep 27, 2025
33 of 35 checks passed
@ghpzin ghpzin deleted the pr-freeglut-gcc15 branch September 27, 2025 05:54
@fabianhjr fabianhjr mentioned this pull request Dec 1, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants