Conversation
As described in the ticket, this fixes mongosh's build on x64 macOS
with Node.js 24, even though we haven't fully investigated why
that is the case.
Making these variables `static` is a good idea anyway since they
are not meant to be used by other compilation units or loaded
from the kerberos addon.
Without this patch, we receive:
[2026/01/15 12:18:50.271] ld: warning: alignment (2) of atom '__ZN13node_kerberos15spnego_mech_oidE' is too small and may result in unaligned pointers
[2026/01/15 12:18:50.271] ld: warning: alignment (2) of atom '__ZN13node_kerberos13krb5_mech_oidE' is too small and may result in unaligned pointers
[2026/01/15 12:18:50.946] ld: warning: pointer not aligned at address 0x10945A92E ('node_kerberos::krb5_mech_oid' + 4 from /private/tmp/m/boxednode/<REDACTED:notary_signing_key_name>/node-v24.12.0/out/Release/kerberos.a(kerberos_unix.o))
[2026/01/15 12:18:50.946] ld: warning: pointer not aligned at address 0x10945A942 ('node_kerberos::spnego_mech_oid' + 4 from /private/tmp/m/boxednode/<REDACTED:notary_signing_key_name>/node-v24.12.0/out/Release/kerberos.a(kerberos_unix.o))
[2026/01/15 12:18:51.115] ld: unaligned pointer(s) for architecture x86_64
[2026/01/15 12:18:51.115] clang++: error: linker command failed with exit code 1 (use -v to see invocation)
This comment was marked as spam.
This comment was marked as spam.
durran
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes
As described in the ticket, this fixes mongosh's build on x64 macOS with Node.js 24, even though we haven't fully investigated why that is the case.
Making these variables
staticis a good idea anyway since they are not meant to be used by other compilation units or loaded from the kerberos addon.Without this patch, we receive:
Notes for Reviewers
What is the motivation for this change?
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript