-
Notifications
You must be signed in to change notification settings - Fork 1k
Symbol not found: _node_module_register - during dynamic link with better-sqlite3 #1155
Comments
Same here. I think the prebuilt binary for |
I workaround the bug by reverting pkg to v4.5.1. The old prebuilt node binary |
Ran into this as well with note-fibers. Thanks for opening this issue so know I wasn't alone. Rolling back to 4.5.1 worked for me as well. As an aside, I attempted a manual re-compile with the same result just in case it was a one-off bad pre-compiled build but no luck, not sure what the resolution might be with 14.16.1 |
@erossignon any clue? |
Reproduced to me too - any idea how to resolve?
|
MacOS 10.15
with |
This issue has been resolved in 5.2.0. Please let me know if it is still relevant. |
With I make a simple script like this: const { WebMidi } = require('webmidi')
function onEnabled () {
console.log(WebMidi.inputs)
console.log(WebMidi.outputs)
}
WebMidi
.enable()
.then(onEnabled)
.catch(console.error) Build runs without error:
then I run it and get this:
Same issue if I put jazz.node in the same dir. |
I'm still getting same issue with
|
Got the same error: |
I got the same error using
The issue was caused (at least for me) by |
man ld -export_dynamic: ``` Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. ``` Bug: vercel/pkg#1155 Signed-off-by: Jesse Chan <jc@linux.com>
I am also getting this error for two different targets: ["node12-macos-x64", "node14-windows-x64"], the error looks to be getting thrown from my node modules. |
I also have been getting this problem with my module using pkg@5.3.1:
|
man ld -export_dynamic: ``` Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. ``` Bug: vercel/pkg#1155 Signed-off-by: Jesse Chan <jc@linux.com> PR-URL: #39839 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
man ld -export_dynamic: ``` Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. ``` Bug: vercel/pkg#1155 Signed-off-by: Jesse Chan <jc@linux.com> PR-URL: #39839 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
man ld -export_dynamic: ``` Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This option is used when a main executable may load a plug-in which requires certain symbols from the main executable. ``` Bug: vercel/pkg#1155 Signed-off-by: Jesse Chan <jc@linux.com> PR-URL: #39839 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
versions and tools invovled
asdf
Here is an example that fails - https://github.com/Light-Keeper/minimal-pkg
pkg --target node14-macos-x64 ./index.js
- executes well, createsindex
binary. But when I run it, there is an error:According to this output, the
.node
file has been found. but, it depends on_node_module_register
symbol that should be exported from node executable, but is not actually exported from the prebuilt node binary.Here are exported symbols from the app built with pkg:
The same for the original node binary:
I've tried renaming executable to
nodejs
and moving.node
file next to the executable, but it did not have any effect.Any ideas on how to overcome this?
The text was updated successfully, but these errors were encountered: