-
-
Notifications
You must be signed in to change notification settings - Fork 65
node-datachannel Prebuilt Binaries Missing RTTI and Wrong Architecture #332
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
Comments
Hello @akhileshthite, Thank you for the detailed description. I remember this error. And it should already be solved in newer versions. Could you please try the new version? I will say we are not using this flag We can add the flag (which I think is there by default). |
Hey @murat-dogan, cc @achingbrain |
Thanks for the info. I added and created a PR. Thanks. |
Thanks! |
I tested the |
@akhileshthite I think you may have your PR comments still in draft, I don't think there's anything from you on #343 |
Sorry, forgot to submit the review. |
I am a little bit lost here. And you said you can solve it with --frtti compiler flag. The wrong arch is another story. |
Yes, I will look into that arch issue and resolve it. Let's merge the PR. |
Hello, |
We are using Electron with @libp2p/[email protected] which depends on [email protected]. We encountered two major issues:
The native module fails with an undefined RTTI symbol error:
This appears to be due to the binary being built with RTTI disabled (likely via
-fno-rtti
).When running the app on an Intel Mac, we see:
This indicates that the prebuilt binary is compiled for arm64 instead of x86_64.
Workaround
We were able to work around these issues locally by:
We modified the build configuration (in
cmake/toolchain/ci.cmake
) to ensure that the C++ compiler flags include-frtti
(enabling RTTI).https://github.com/ipshipyard/js-node-datachannel/blob/844e1dd9e5467b3fe5d85af23c29751371192d67/cmake/toolchain/ci.cmake#L23
We ran:
This resulted in a freshly built
node_datachannel.node
with the correct RTTI support.Why it's important?
The current approach to work around these problems involves manually patching node-datachannel’s build configuration and explicitly rebuilding the module from source (e.g., using
npm rebuild node-datachannel --build-from-source
and settingnpm_config_arch=x64
on Intel Macs). This process requires custom CI scripts and local workarounds, which is not ideal. Ideally, the prebuilt binaries should be compiled correctly for Electron:RTTI Enabled: Ensuring that the module is built with RTTI support (i.e. without
-fno-rtti
).PR:
p2plabsxyz/peersky-browser#18
The text was updated successfully, but these errors were encountered: