-
Notifications
You must be signed in to change notification settings - Fork 977
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
Linking Errors. #493
Comments
Thank you for the report! |
I double-checked it now, and I was wrong - the symbols are totally missing:
|
And here they are fully exposed by wgpu-core: #[no_mangle]
pub unsafe extern "C" fn wgpu_compute_pass_set_pipeline(
pass: &mut RawPass,
pipeline_id: id::ComputePipelineId,
) {
pass.encode(&ComputeCommand::SetPipeline(pipeline_id));
} So what might be happening is that the linker doesn't realize that C functions from dependent crates (going from wgpu-native) also need to be exposed? |
Here is the Preceding Output: |
Possibly relevant: |
github.com/mozilla/cbindgen/issues/49 |
@ZKing1000 thanks for the links!
It's annoying and strange that we'd need to put it on each and every function. Edit: it doesn't work:
|
I'm not very Familiar with Rust, but I can try to help.. |
This is the same issue as this then right? rust-lang/rust#50007 |
Looks like it. |
rust-lang/rust#29603
|
This looks like the commit that makes it not work: rust-lang/rust@7376ddb |
I think I fixed... The symbols are present in libwgpu_native.a, but not .so. examples/triangle/build/CMakeCache.txt:WGPU_LIBRARY:FILEPATH=/home/holden/Desktop/work/forks/wgpu/target/debug/libwgpu_native.a FROM .so but now there are issues with libm (math library) |
Built it: |
I compiled this binary on Manjaro Linux with the -g flag. Edit: Compute Example compiles and runs fine. |
Same on Windows. I dump exports in .lib file, they are exported but with undersocre prefix.
|
@elgunhuseynli this looks like a different issue. Underscores could very well be expected there - a subject of calling convention. The original problem with linking was about routines exported from |
@kvark If underscores are expected why I'm getting unresolved external symbol error in Visual Studio? Maybe am I doing something wrong? :/ |
@elgunhuseynli are you seeing the same symbols unresolved as the original issue? If not, let's have a separate one. |
@kvark I get unresolved external symbol errors for all symbols even for |
@elgunhuseynli please file another issue, it looks like nothing links for you at all. |
Going to remove that from blockers for the release. First, because Rust users aren't affected. And second, because all is good as long as we provide the binary builds. |
Seems this issue is external to us. If there is another issue, feel free to re-file. |
493: Use BCn textures if possible in skybox example r=kvark a=cwfitzgerald This converts the skybox to using compressed textures if available. I have designed the code to be extensible to other compressed formats as they are added. Additionally I added srgb to the texture types, as we were using a srgb framebuffer without properly converting into linear on the texture reads. Co-authored-by: Connor Fitzgerald <[email protected]>
[ 33%] Linking C executable triangle /usr/bin/ld: CMakeFiles/triangle.dir/main.c.o: in function
main':/home/holden/Desktop/work/forks/wgpu/examples/triangle/main.c:260: undefined reference to
wgpu_render_pass_set_pipeline' /usr/bin/ld: /home/holden/Desktop/work/forks/wgpu/examples/triangle/main.c:261: undefined reference to
wgpu_render_pass_set_bind_group'/usr/bin/ld: /home/holden/Desktop/work/forks/wgpu/examples/triangle/main.c:262: undefined reference to
wgpu_render_pass_draw' collect2: error: ld returned 1 exit status make[3]: *** [CMakeFiles/triangle.dir/build.make:101: triangle] Error 1 make[3]: Leaving directory '/run/media/holden/45993E4516E8C2C4/Git/forks/wgpu/examples/triangle/build' make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/triangle.dir/all] Error 2 make[2]: Leaving directory '/run/media/holden/45993E4516E8C2C4/Git/forks/wgpu/examples/triangle/build' make[1]: *** [Makefile:84: all] Error 2 make[1]: Leaving directory '/run/media/holden/45993E4516E8C2C4/Git/forks/wgpu/examples/triangle/build' make: *** [Makefile:108: example-triangle] Error 2
The text was updated successfully, but these errors were encountered: