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
The environment I'm trying to embed metacall into and use it with nodejs loader already has v8 libraries. The process itself is a Counter-Strike 2 server, which is closed source and unfortunately I can't just "turn off" the existing v8 version.
NodeJs (libnode) uses a slightly modified version of v8 internally and it is impossible to build nodejs with the --shared-v8 flag (nodejs/help#3302).
Describe the solution you'd like
It would be cool to be able to use metacall in my environment, but that requires building libnode and linking it to an existing version of v8.
Describe alternatives you've considered
Turning off the existing v8 leads to a server crash, apparently it is tied to many features of the source 2 engine (counter-strike engine).
Additional context
The problem is not metacall itself, rather libnode and a conflict between two different versions of v8 libraries. However, it may be possible to use metacall to build the necessary version of libnode for my environment.
When trying to load files (metacall_load_from_file) I get segfault when libnode is mounted:
#0 0x00007fa4db302e1a in _GLOBAL__sub_I_token.cc () from ../../csgo/addons/resourcemod/node_modules/resourcemod/bin/metacall/libnode.so.115
I have tried to build nodejs itself and metacall differently, however I always run into this exact problem.
Here's everything related to already installed v8 libraries, libnode should be linked to this libraries. They are located right next to executable in the same folder. v8-related.zip
This issue can be solved by patching the NodeJS build system, which is something that we are already doing so I have no fear about doing this again for this special use case.
🚀 Feature
The environment I'm trying to embed metacall into and use it with nodejs loader already has v8 libraries. The process itself is a Counter-Strike 2 server, which is closed source and unfortunately I can't just "turn off" the existing v8 version.
NodeJs (libnode) uses a slightly modified version of v8 internally and it is impossible to build nodejs with the --shared-v8 flag (nodejs/help#3302).
Describe the solution you'd like
It would be cool to be able to use metacall in my environment, but that requires building libnode and linking it to an existing version of v8.
Describe alternatives you've considered
Turning off the existing v8 leads to a server crash, apparently it is tied to many features of the source 2 engine (counter-strike engine).
Additional context
The problem is not metacall itself, rather libnode and a conflict between two different versions of v8 libraries. However, it may be possible to use metacall to build the necessary version of libnode for my environment.
When trying to load files (metacall_load_from_file) I get segfault when libnode is mounted:
I have tried to build nodejs itself and metacall differently, however I always run into this exact problem.
ldd
output of libnode:Here's all injected libraries (dl_walk):
Open
Here's everything related to already installed v8 libraries, libnode should be linked to this libraries. They are located right next to executable in the same folder.
v8-related.zip
NodeJS v20.11.1 uses v8 version: 11.3.244.8-node.17
NodeJS v19.X.X uses v8 version 10.7.X.X-node.X
NodeJS v18.19.1 uses v8 version: 10.2.154.26-node.28
Valve v8 version: 10.6.194.17
OS: Ubuntu 22
The text was updated successfully, but these errors were encountered: