Skip to content
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

__dso_handle error when using 3rd-party Rust crate in host #1157

Open
rtfeldman opened this issue Apr 6, 2021 · 0 comments
Open

__dso_handle error when using 3rd-party Rust crate in host #1157

rtfeldman opened this issue Apr 6, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@rtfeldman
Copy link
Sponsor Contributor

rtfeldman commented Apr 6, 2021

In e052938 I tried actually using a 3rd-party Rust crate (reqwest - possibly relevantly, alongside openssl = { version = "0.10", features = ["vendored"] } to have openssl be built statically during Rust build time; when I swiwtched from reqwest and openssl to the pure-Rust ureq crate this stopped happening). Previously, I'd had reqwest and openssl as dependencies, but was not actually calling anything from them. (I also tried reqwest without openssl but then the crate failed to install because it said it couldn't find libssl on my system.)

As soon as I added the call and ran cargo run run examples/cli/HttpGet.roc, the host started failing to link, with this error:

ld: /home/rtfeldman/code/roc/examples/cli/platform/host.o:(.data._rust_extern_with_linkage___dso_handle+0x0): undefined reference to `__dso_handle'
ld: /usr/lib/x86_64-linux-gnu/libc_nonshared.a(atexit.oS): in function `atexit':
(.text+0x7): undefined reference to `__dso_handle'
ld: /usr/lib/x86_64-linux-gnu/libc_nonshared.a(pthread_atfork.oS): in function `__pthread_atfork':
(.text+0x7): undefined reference to `__dso_handle'
ld: /home/rtfeldman/code/roc/examples/cli/http-get: hidden symbol `__dso_handle' isn't defined
ld: final link failed: bad value

An old Rust issue (which is actually just someone's question) seems relevant here since I am building on a Linux system that has g++ installed, although I'm not sure how to resolve the error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant