Skip to content

Conversation

@addaleax
Copy link
Contributor

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 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)
Notes for Reviewers

What is the motivation for this change?

Release Highlight

Release notes highlight

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

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)
@addaleax addaleax requested a review from a team as a code owner January 15, 2026 14:20
@dylanjabdiel-creator

This comment was marked as spam.

@tadjik1 tadjik1 self-assigned this Jan 19, 2026
@tadjik1 tadjik1 added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 19, 2026
Copy link
Contributor

@tadjik1 tadjik1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tadjik1 tadjik1 requested a review from a team January 19, 2026 18:18
@tadjik1 tadjik1 added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jan 19, 2026
@tadjik1 tadjik1 merged commit 11a15bb into main Jan 20, 2026
21 checks passed
@tadjik1 tadjik1 deleted the 7395-dev branch January 20, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Review Needs review from team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants