Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: add support for locally installed headers #2964

Merged
merged 7 commits into from
Jan 29, 2024

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Jan 19, 2024

Checklist
  • npm install && npm run lint && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

Some linux distros allow headers to be installed through tools like rpm. If the runtime sets
process.config.variables.use_prefix_to_find_headers, look for matching headers based on the directory set for the prefix in process.config.variables.prefix

Some linux distros allow headers to be installed through
tools like rpm. If the runtime sets
process.config.variables.use_prefix_to_find_headers, look
for matching headers based on the directory set for the
prefix in process.config.variables.prefix

Signed-off-by: Michael Dawson <midawson@redhat.com>
@mhdawson
Copy link
Member Author

Not sure if this should be added to doc, if so just let me know and I'll look for the right place.

@mhdawson
Copy link
Member Author

Upstream PR in Node.js to allow setting use_prefix_to_find_headers - nodejs/node#51525

@mhdawson
Copy link
Member Author

Note that the addition to test/test-configure-python.js was needed so that the tests would run ok when applied to other streams, and does not adversely affect testing in head

@mhdawson
Copy link
Member Author

From the test failure on windows, I do see the test is too linux specific will take a look.

Signed-off-by: Michael Dawson <midawson@redhat.com>
@mhdawson
Copy link
Member Author

Guess it was more than just the path, spinning up a windows machine to investigate on.

Signed-off-by: Michael Dawson <midawson@redhat.com>
@mhdawson
Copy link
Member Author

Ok, windows all fixed up :)

lib/configure.js Outdated Show resolved Hide resolved
Copy link
Member

@lukekarrys lukekarrys left a comment

Choose a reason for hiding this comment

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

LGTM! One minor suggestion to only expose readFileSync.

lib/configure.js Outdated Show resolved Hide resolved
lib/configure.js Outdated Show resolved Hide resolved
lib/configure.js Outdated Show resolved Hide resolved
@lukekarrys lukekarrys merged commit 3298731 into nodejs:main Jan 29, 2024
35 checks passed
lukekarrys added a commit that referenced this pull request Dec 2, 2024
Some linux distros allow headers to be installed through
tools like rpm. If the runtime sets
process.config.variables.use_prefix_to_find_headers, look
for matching headers based on the directory set for the
prefix in process.config.variables.prefix

Signed-off-by: Michael Dawson <midawson@redhat.com>
Co-authored-by: Luke Karrys <luke@lukekarrys.com>
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.

3 participants