Skip to content

Fix Clang compilation: make static functions inline#92

Merged
jermp merged 1 commit intojermp:masterfrom
adamant-pwn:patch-2
Oct 5, 2025
Merged

Fix Clang compilation: make static functions inline#92
jermp merged 1 commit intojermp:masterfrom
adamant-pwn:patch-2

Conversation

@adamant-pwn
Copy link
Copy Markdown
Contributor

@adamant-pwn adamant-pwn commented Oct 4, 2025

Add inline keyword to static functions in headers to comply with Clang's stricter ODR checks. This fixes compilation errors on macOS arm64 builds with Apple Clang. I'm only adding inline to functions that triggered compilation errors in Metagraph when bumping the version of sshash, but in principle it might be prudent to add this to more static functions.

Add inline keyword to static functions in headers to comply with
Clang's stricter ODR checks. This fixes compilation errors on macOS arm64 builds with Apple Clang.
@jermp
Copy link
Copy Markdown
Owner

jermp commented Oct 5, 2025

Ok, thanks! Actually, I'm already using this version of PTHash in SSHash and, in turn, in Fulgor as well. I did not get any problems (of course, otherwise I would have fixed them) when compiling on Mac os under clang, M1 processor.

@jermp jermp merged commit 65fe3a0 into jermp:master Oct 5, 2025
9 checks passed
@adamant-pwn
Copy link
Copy Markdown
Contributor Author

Thanks! The difference in compilation messages might be due to difference in compilation flags 🤔

On our end it was triggered by [-Werror,-Wunneeded-internal-declaration] at https://github.com/ratschlab/metagraph/actions/runs/18247150520/job/51956656024

@adamant-pwn adamant-pwn deleted the patch-2 branch October 5, 2025 08:39
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