Skip to content

iwyu.yml: work around missing includes for Fedora [skip ci]#7625

Merged
firewave merged 2 commits intocppcheck-opensource:mainfrom
firewave:iwyu-inc
Jun 30, 2025
Merged

iwyu.yml: work around missing includes for Fedora [skip ci]#7625
firewave merged 2 commits intocppcheck-opensource:mainfrom
firewave:iwyu-inc

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator Author

In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.cpp:24:
In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.h:38:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/climits:47:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
  124 | # include_next <limits.h>
      | 

This issue will pop up when a distro updates its LLVM to a newer version than IWYU is built against.

@firewave firewave changed the title iwyu.yml: work around missing includes for Fedora iwyu.yml: work around missing includes for Fedora [skip ci] Jun 25, 2025
@firewave firewave force-pushed the iwyu-inc branch 3 times, most recently from d61fe2e to 9c429f6 Compare June 25, 2025 19:55
@firewave
Copy link
Copy Markdown
Collaborator Author

After the fix there is another issue when using libc++:

In file included from /__w/cppcheck/cppcheck/externals/tinyxml2/tinyxml2.cpp:31:
/usr/bin/../include/c++/v1/cstddef:45:5: error: <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   45 | #   error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
      |     ^

@firewave
Copy link
Copy Markdown
Collaborator Author

After the fix there is another issue when using libc++:

I disabled that step for now...

@firewave
Copy link
Copy Markdown
Collaborator Author

See https://github.com/danmar/cppcheck/actions/runs/15956527702/job/45003567477 for a successful build with the changes applied.

@firewave firewave marked this pull request as ready for review June 29, 2025 15:17
@firewave firewave merged commit fd7558d into cppcheck-opensource:main Jun 30, 2025
@firewave firewave deleted the iwyu-inc branch June 30, 2025 08:33
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

Successfully merging this pull request may close these issues.

2 participants