Skip to content

fix(cachesim): define _GNU_SOURCE before the first system header - #384

Merged
haochengxia merged 2 commits into
developfrom
fix/cachesim
Nov 8, 2026
Merged

haochengxia merged 2 commits into
developfrom
fix/cachesim

Conversation

@haochengxia

Copy link
Copy Markdown
Collaborator

What does this PR do?

cachesim fails to build with GCC 14 on glibc 2.37 or earlier, e.g. RHEL/Alma/Rocky 9
with gcc-toolset-14:

cache_init.h:76:9: error: implicit declaration of function 'strcasestr';
did you mean 'strcasecmp'? [-Wimplicit-function-declaration]

strcasestr is a GNU extension: glibc 2.37 and earlier declare it only under _GNU_SOURCE (2.38 moved it to the default set). _GNU_SOURCE takes effect only if it is defined before a file's first system header.

Type of change

  • Bug fix
  • New eviction / admission / prefetch algorithm
  • New trace reader or trace format
  • Performance improvement
  • Documentation
  • Build / CI
  • Other:

How was it tested?

develop this PR
AlmaLinux 9 (glibc 2.34), GCC 14.2, aarch64 cachesim fails to build builds; ctest 15/15
Arch (glibc 2.44), GCC 16, x86_64 builds builds; testOracleTrace and testCLI pass

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T00:56:14.632432Z 05c9564 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@haochengxia haochengxia changed the title Fix/cachesim fix(cachesim): define _GNU_SOURCE before the first system header Nov 8, 2026
@haochengxia
haochengxia merged commit 0a908ea into develop Nov 8, 2026
12 checks passed
@haochengxia
haochengxia deleted the fix/cachesim branch November 8, 2026 00:59
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.

1 participant