Skip to content

hotdoc: fix build with gcc15 - #446324

Merged
Aleksanaa merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-hotdoc-gcc15
Sep 28, 2025
Merged

Aleksanaa merged 1 commit into
NixOS:stagingfrom
ghpzin:pr-hotdoc-gcc15

Conversation

@ghpzin

@ghpzin ghpzin commented Sep 26, 2025 •

Copy link
Copy Markdown
Contributor

Fixes build failure with gcc15:

/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: In function ‘yylex’:
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:49:10:
error: too many arguments to function ‘parse_comment’; expected 0, have 1
   49 | "/*"                            { return parse_comment (comments);}
      |          ^~~~~~~~~~~~~  ~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12: note: declared here
   37 | static int parse_comment ();
      |            ^~~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:50:10:
error: too many arguments to function ‘parse_define’; expected 0, have 1
   50 | {HASH}{SPACE}*"define"{SPACE}*  { return parse_define (comments); }
      |          ^~~~~~~~~~~~  ~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12: note: declared here
   38 | static int parse_define ();
      |            ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: At top level:
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:80:1:
error: conflicting types for ‘parse_define’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’}
   80 | parse_define (PyObject *comments)
      | ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12:
note: previous declaration of ‘parse_define’ with type ‘int(void)’
   38 | static int parse_define ();
      |            ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:126:1:
error: conflicting types for ‘parse_comment’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’}
  126 | parse_comment (PyObject *comments)
      | ^~~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12:
note: previous declaration of ‘parse_comment’ with type ‘int(void)’
   37 | static int parse_comment ();
      |            ^~~~~~~~~~~~~

Could not figure out how to test it with gcc15 as is.
But it builds on top of #440456 with this fix and fails otherwise.

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: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Sep 26, 2025
@ghpzin
ghpzin changed the base branch from master to staging September 26, 2025 11:38
@nixpkgs-ci nixpkgs-ci Bot closed this Sep 26, 2025
@nixpkgs-ci nixpkgs-ci Bot reopened this Sep 26, 2025
- add patch from merged upstream commit:
hotdoc/hotdoc@adf8518

Fixes build failure with gcc15:
```
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: In function ‘yylex’:
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:49:10:
error: too many arguments to function ‘parse_comment’; expected 0, have 1
   49 | "/*"                            { return parse_comment (comments);}
      |          ^~~~~~~~~~~~~  ~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12: note: declared here
   37 | static int parse_comment ();
      |            ^~~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:50:10:
error: too many arguments to function ‘parse_define’; expected 0, have 1
   50 | {HASH}{SPACE}*"define"{SPACE}*  { return parse_define (comments); }
      |          ^~~~~~~~~~~~  ~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12: note: declared here
   38 | static int parse_define ();
      |            ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l: At top level:
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:80:1:
error: conflicting types for ‘parse_define’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’}
   80 | parse_define (PyObject *comments)
      | ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:38:12:
note: previous declaration of ‘parse_define’ with type ‘int(void)’
   38 | static int parse_define ();
      |            ^~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:126:1:
error: conflicting types for ‘parse_comment’; have ‘int(PyObject *)’ {aka ‘int(struct _object *)’}
  126 | parse_comment (PyObject *comments)
      | ^~~~~~~~~~~~~
/build/hotdoc-0.17.4/hotdoc/parsers/c_comment_scanner/scanner.l:37:12:
note: previous declaration of ‘parse_comment’ with type ‘int(void)’
   37 | static int parse_comment ();
      |            ^~~~~~~~~~~~~
```
@ghpzin
ghpzin marked this pull request as ready for review September 26, 2025 11:49
@nixpkgs-ci nixpkgs-ci Bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 26, 2025
@Aleksanaa
Aleksanaa merged commit 66112e6 into NixOS:staging Sep 28, 2025
@ghpzin
ghpzin deleted the pr-hotdoc-gcc15 branch September 28, 2025 10:44
@fabianhjr fabianhjr mentioned this pull request Dec 1, 2025
4 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants