juj / wasm_webgpu

System headers for interfacing WebGPU from C programs compiled via Emscripten to WebAssembly
BSD 3-Clause "New" or "Revised" License
331 stars 26 forks source link

Error while Building the Samples #37

Closed PalashGarg19 closed 1 year ago

PalashGarg19 commented 1 year ago

i am trying to build the samples following the instructions that you provided here, but it is throwing the following errors:

Consolidate compiler generated dependencies of target webgpu [ 15%] Built target webgpu Consolidate compiler generated dependencies of target hello_triangle_minimal Consolidate compiler generated dependencies of target clear_screen Consolidate compiler generated dependencies of target clear_screen_sync Consolidate compiler generated dependencies of target hello_triangle_verbose Consolidate compiler generated dependencies of target vertex_buffer [ 21%] Linking CXX executable clear_screen.html [ 31%] Linking CXX executable clear_screen_sync.html [ 31%] Linking CXX executable hello_triangle_minimal.html [ 36%] Linking CXX executable hello_triangle_verbose.html [ 42%] Linking CXX executable vertex_buffer.html em++: error: Invalid parameter (do not use "=" with "--" options) em++: error: Invalid parameter (do not use "=" with "--" options) em++: error: Invalid parameter (do not use "=" with "--" options) em++: error: Invalid parameter (do not use "=" with "--" options) em++: error: Invalid parameter (do not use "=" with "--" options) make[2]: [CMakeFiles/clear_screen.dir/build.make:101: clear_screen.html] Error 1 make[2]: [CMakeFiles/vertex_buffer.dir/build.make:101: vertex_buffer.html] Error 1 make[2]: [CMakeFiles/hello_triangle_verbose.dir/build.make:101: hello_triangle_verbose.html] Error 1 make[1]: [CMakeFiles/Makefile2:125: CMakeFiles/clear_screen.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:203: CMakeFiles/hello_triangle_verbose.dir/all] Error 2 make[2]: [CMakeFiles/clear_screen_sync.dir/build.make:101: clear_screen_sync.html] Error 1 make[1]: [CMakeFiles/Makefile2:229: CMakeFiles/vertex_buffer.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:151: CMakeFiles/clear_screen_sync.dir/all] Error 2 make[2]: [CMakeFiles/hello_triangle_minimal.dir/build.make:101: hello_triangle_minimal.html] Error 1 make[1]: [CMakeFiles/Makefile2:177: CMakeFiles/hello_triangle_minimal.dir/all] Error 2 make: [Makefile:91: all] Error 2

For reference i am using an older version of emsdk i.e., 2.0.6

juj commented 1 year ago

This is due to old Emscripten version. Try updating to the latest version to fix.

PalashGarg19 commented 1 year ago

@juj thanks for the reply, i got it build using the latest version of emscripten as you mentioned above, but still when i try to open html files on browser(Chrome beta version 113) a blank page is opening. Following is the Screenshot of Console Screenshot from 2023-04-19 17-25-56 Is it unable to find GPU device on my PC?

juj commented 1 year ago

The print "Failed to create WebGPU Context Provider" is something that is not printed from the code in this repository, but probably comes from Chrome browser internally.

Try visiting some WebGPU sample pages on the web: https://webgpu.github.io/webgpu-samples/samples/helloTriangle to see if any of them work?

PalashGarg19 commented 1 year ago

@juj thanks for the help, Found out webGPU is not currently supported by chrome browser on Linux, had to build on mac and its running perfectly. And also I would like to reach out to you for further understanding of this repo, can you share a way of contact, if you dont mind? Actually I am also trying to build a webGPU application using WASM, I will be grateful for your help.

juj commented 1 year ago

Best way to discuss this repo is definitely via this tracker, feel free to open non-bug report related tickets.

Another place to discuss would be the gpuweb repository Discussions tab, which has been quite lively for a while now: https://github.com/gpuweb/gpuweb/discussions . There are a lot of developers there who are much more familiar with WebGPU programming itself - I largely develop only the bindings to Wasm, and have not actually developed any WebGPU based renderers yet.

juj commented 1 year ago

Closing resolved issues.