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

Can't build with khronos-egl as dependency #498

Closed
dpogorzelski opened this issue Oct 24, 2023 · 3 comments
Closed

Can't build with khronos-egl as dependency #498

dpogorzelski opened this issue Oct 24, 2023 · 3 comments

Comments

@dpogorzelski
Copy link

dpogorzelski commented Oct 24, 2023

Hey, I'm running into the following issue when building a project that has khronos-egl as dependency:

error[E0433]: failed to resolve: could not find `Library` in `libloading`
    --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/khronos-egl-4.1.0/src/lib.rs:2191:27
     |
2191 |                   let lib = libloading::Library::new(filename).map_err(LoadError::Library)?;
     |                                         ^^^^^^^ could not find `Library` in `libloading`
...
2210 | / api! {
2211 | |     EGL1_0 : "1_0" {
2212 | |         fn eglChooseConfig(
2213 | |             display: EGLDisplay,
...    |
2362 | |     }
2363 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `api` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is an enum variant `LoadError::Library`; try using the variant's enum
     |
2191 |                 let lib = LoadError(filename).map_err(LoadError::Library)?;

any suggestion as to what could be the problem?
Outside of hermit target everything builds just fine.

@dpogorzelski
Copy link
Author

I guess the reason is because https://docs.rs/libloading/latest/libloading/struct.Library.html is only available for unix and windows

@mkroening
Copy link
Member

Thanks for your interest!

Hermit does not support loading dynamic libraries yet.

You might want to check out Unikraft instead. I think, they might have dynamic library support. Also, I am working on Rust application support on Unikraft with an example application coming soon. This is currently blocked on unikraft/kraftkit#703, though.

@dpogorzelski
Copy link
Author

Thanks for the info. I the meantime I managed to get rid of the dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants