fix(environment): Add libnode-dev for Ubuntu/Debian to fix Node loader build#732
Closed
0xShubhamSolanki wants to merge 0 commit into
Closed
fix(environment): Add libnode-dev for Ubuntu/Debian to fix Node loader build#7320xShubhamSolanki wants to merge 0 commit into
0xShubhamSolanki wants to merge 0 commit into
Conversation
Member
|
Provide a test for reproducing the issue before sending the patch. |
Member
|
Also, is it related to this? |
6d30833 to
2e9f680
Compare
2e9f680 to
9fc28cf
Compare
0xShubhamSolanki
added a commit
to 0xShubhamSolanki/core
that referenced
this pull request
Mar 28, 2026
Add post-install check in sub_nodejs() to ensure libnode-dev package is correctly installed on Ubuntu/Debian systems. Prevents silent failures where CMake falls back to broken source build on Ubuntu 24+. Fixes metacall#732
0xShubhamSolanki
added a commit
to 0xShubhamSolanki/core
that referenced
this pull request
Mar 28, 2026
- Add libnode-dev to package list in sub_nodejs() for Debian/Ubuntu - Add post-install verification check that fails fast if package missing - Add test script tools/test/check-node-headers.sh to verify Node build env - Prevents CMake from falling back to broken source build on Ubuntu 24+ Test reproduces the issue: run ./tools/test/check-node-headers.sh on fresh Ubuntu 24 without libnode-dev - it will fail. After running environment script with this patch, it will pass. Fixes metacall#732
0xShubhamSolanki
added a commit
to 0xShubhamSolanki/core
that referenced
this pull request
Mar 28, 2026
- Add libnode-dev to package list in sub_nodejs() - Add post-install verification check - Add test script tools/test/check-node-headers.sh Fixes metacall#732
16 tasks
0xShubhamSolanki
added a commit
to 0xShubhamSolanki/core
that referenced
this pull request
Mar 29, 2026
…r build Without libnode-dev, CMake cannot find Node.js shared library and headers, falling back to source build which fails on Ubuntu 24+ (Python 3.12 removed distutils). Fixes metacall#732
0xShubhamSolanki
added a commit
to 0xShubhamSolanki/core
that referenced
this pull request
Mar 29, 2026
…r build Without libnode-dev, CMake cannot find Node.js shared library and headers, falling back to source build which fails on Ubuntu 24+ (Python 3.12 removed distutils). Fixes metacall#732
16 tasks
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.
Problem
On Ubuntu 24.04, the build fails because
libnode-devis not installed by the environment script. This causes CMake to fall back to building Node from source, which fails due to Python 3.12 incompatibility (distutils removal).Without the development headers,
FindNodeJS.cmakecannot detect the system Node, triggering a broken source build fallback.Solution
Add
libnode-devto the package list insub_nodejs()for Debian/Ubuntu. This ensures Node development headers are available, allowing MetaCall to properly detect and link against the system Node.Manual Testing Performed
./tools/metacall-environment.sh base python nodejs rpcdpkg -l | grep libnode-devContext
Discussed in Discord #general channel with community members facing the same issue on Ubuntu 24.
Type of change
Checklist:
make testorctest -VV -R <test-name>)../docker-compose.sh test &> outputand attached the output.OPTION_BUILD_ADDRESS_SANITIZERor./docker-compose.sh test-address-sanitizer &> outputandOPTION_TEST_MEMORYCHECK.OPTION_BUILD_THREAD_SANITIZERor./docker-compose.sh test-thread-sanitizer &> output.Helgrindin case my code works with threading.make clang-formatin order to format my code and my code follows the style guidelines.