You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I am trying to build libnode such that it produces a statically linkable library I can embed within my application.
It's okay for system dependencies that the Nodejs CLI links dynamically to remain dynamic (like openssl) - I don't need them to be statically included because I am essentially recreating the Nodejs CLI.
I want to produce libraries for macos-x64macos-arm64linux-x64linux-arm64 and windows-x64.
I have tried several approaches without success, namely:
./configure --shared --fully-static --enable-static
make -j16
# Patch node.gyp to build in static
sed -i "s/'type': 'executable',/'type': 'static_library',/g" ./node.gyp
./configure
make -j16
And combinations of the flags/patches
# Patch node.gyp to build in static
sed -i "s/'type': 'executable',/'type': 'static_library',/g" ./node.gyp
./configure --shared --fully-static --enable-static
make -j16
I have tried this on Fedora 41 without success so I also tried running these commands within docker containers:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, I am trying to build libnode such that it produces a statically linkable library I can embed within my application.
It's okay for system dependencies that the Nodejs CLI links dynamically to remain dynamic (like openssl) - I don't need them to be statically included because I am essentially recreating the Nodejs CLI.
I want to produce libraries for
macos-x64
macos-arm64
linux-x64
linux-arm64
andwindows-x64
.I have tried several approaches without success, namely:
And combinations of the flags/patches
I have tried this on Fedora 41 without success so I also tried running these commands within docker containers:
Once I figure it out I will repeat these steps on MacOS and Windows.
References
Beta Was this translation helpful? Give feedback.
All reactions