iced
iced copied to clipboard
Unable to run on Linux Virtualbox Ubuntu 18.04.3 LTS or Ubuntu 21.04
Is there an existing issue for this?
- [X] I have searched the existing issues.
Is this issue related to iced?
- [X] My hardware is compatible and my graphics drivers are up-to-date.
What happened?
$ cargo run --package clock
Finished dev [unoptimized + debuginfo] target(s) in 0.14s
Running target/debug/clock
libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)
What is the expected behavior?
a window appears
Version
master
Operative System
Linux
Do you have any log output?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Do the wgpu
examples work for you?
$ cargo run --package geometry
Compiling iced_futures v0.3.0 (/data/enclone/iced/futures)
Compiling iced_native v0.4.0 (/data/enclone/iced/native)
Compiling iced_graphics v0.2.0 (/data/enclone/iced/graphics)
Compiling iced_winit v0.3.0 (/data/enclone/iced/winit)
Compiling iced_wgpu v0.4.0 (/data/enclone/iced/wgpu)
Compiling iced v0.3.0 (/data/enclone/iced)
Compiling geometry v0.1.0 (/data/enclone/iced/examples/geometry)
Finished dev [unoptimized + debuginfo] target(s) in 33.51s
Running `target/debug/geometry`
libEGL warning: DRI2: failed to authenticate
Segmentation fault (core dumped)
and the next one:
$ cargo run --package integration_wgpu
Downloading 6 crates
Downloaded humantime v2.1.0
Downloaded env_logger v0.8.4
Downloaded atty v0.2.14
Downloaded regex v1.5.5
Downloaded regex-syntax v0.6.25
Downloaded aho-corasick v0.7.18
Downloaded 6 crates (699.9 KB) in 0.46s
Compiling log v0.4.16
Compiling regex-syntax v0.6.25
Compiling humantime v2.1.0
Compiling aho-corasick v0.7.18
Compiling atty v0.2.14
Compiling calloop v0.9.3
Compiling naga v0.8.5
Compiling iced_futures v0.3.0 (/data/enclone/iced/futures)
Compiling mio v0.8.2
Compiling glyph_brush v0.7.3
Compiling iced_native v0.4.0 (/data/enclone/iced/native)
Compiling smithay-client-toolkit v0.15.4
Compiling regex v1.5.5
Compiling iced_graphics v0.2.0 (/data/enclone/iced/graphics)
Compiling smithay-clipboard v0.6.5
Compiling winit v0.26.0 (https://github.com/iced-rs/winit?rev=02a12380960cec2f351c09a33d6a7cc2789d96a6#02a12380)
Compiling env_logger v0.8.4
Compiling clipboard_wayland v0.2.0
Compiling window_clipboard v0.2.2
Compiling iced_winit v0.3.0 (/data/enclone/iced/winit)
Compiling wgpu-hal v0.12.5
Compiling wgpu-core v0.12.2
Compiling wgpu v0.12.0
Compiling wgpu_glyph v0.16.0
Compiling iced_wgpu v0.4.0 (/data/enclone/iced/wgpu)
Compiling integration_wgpu v0.1.0 (/data/enclone/iced/examples/integration_wgpu)
Finished dev [unoptimized + debuginfo] target(s) in 36.52s
Running `target/debug/integration_wgpu`
thread 'main' panicked at 'No suitable GPU adapters found on the system!', examples/integration_wgpu/src/main.rs:81:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
On a different Ubuntu, this time 20.04 without a discrete GPU:
$ cargo run --package integration_wgpu
Downloaded atty v0.2.14
Downloaded env_logger v0.8.4
Downloaded aho-corasick v0.7.18
Downloaded humantime v2.1.0
Downloaded regex v1.5.5
Downloaded regex-syntax v0.6.25
Downloaded 6 crates (699.9 KB) in 0.23s
Compiling log v0.4.16
Compiling regex-syntax v0.6.25
Compiling humantime v2.1.0
Compiling atty v0.2.14
Compiling aho-corasick v0.7.18
Compiling calloop v0.9.3
Compiling naga v0.8.5
Compiling iced_futures v0.3.0 (/home/user/iced/futures)
Compiling mio v0.8.2
Compiling glyph_brush v0.7.3
Compiling iced_native v0.4.0 (/home/user/iced/native)
Compiling smithay-client-toolkit v0.15.4
Compiling regex v1.5.5
Compiling iced_graphics v0.2.0 (/home/user/iced/graphics)
Compiling smithay-clipboard v0.6.5
Compiling winit v0.26.0 (https://github.com/iced-rs/winit?rev=02a12380960cec2f351c09a33d6a7cc2789d96a6#02a12380)
Compiling clipboard_wayland v0.2.0
Compiling env_logger v0.8.4
Compiling window_clipboard v0.2.2
Compiling iced_winit v0.3.0 (/home/user/iced/winit)
Compiling wgpu-hal v0.12.5
Compiling wgpu-core v0.12.2
Compiling wgpu v0.12.0
Compiling wgpu_glyph v0.16.0
Compiling iced_wgpu v0.4.0 (/home/user/iced/wgpu)
Compiling integration_wgpu v0.1.0 (/home/user/iced/examples/integration_wgpu)
Finished dev [unoptimized + debuginfo] target(s) in 18.58s
Running `target/debug/integration_wgpu`
Segmentation fault (core dumped)
(base) user@LS3:~/iced$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
On the same computer as previously, which has 2 NVIDIA GPUs (4Gb):
$ RUST_BACKTRACE=1 && cargo run --package integration_wgpu
Finished dev [unoptimized + debuginfo] target(s) in 0.19s
Running `target/debug/integration_wgpu`
thread 'main' panicked at 'No suitable GPU adapters found on the system!', examples/integration_wgpu/src/main.rs:81:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
avilella@TSP720a:/data/enclone/iced$ chimera
On this same computer, I can open window-based applications without a problem, such as chimera
(https://www.cgl.ucsf.edu/chimera/).
You didn't answer my question. What about the examples en the wgpu
repository?
If those don't work, then this an upstream issue!
Adding info from the wgpu repo on the Ubuntu 21.04 machine (the other one is too old to have the right cargo version):
$mkdir -p trace && WGPU_TRACE=trace cargo run --features trace --example hello
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21150:18
|
21150 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_458\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21168:18
|
21168 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_extension_459\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21186:18
|
21186 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_460\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21204:18
|
21204 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_461\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21226:18
|
21226 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_462\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21244:18
|
21244 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_463\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 461 previous errors
error: could not compile `ash`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Trying the cube
one gives a similar error in trying to compile ash
:
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:20934:18
|
20934 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_COREAVI_extension_446\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:20952:18
|
20952 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_COREAVI_extension_447\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:20970:18
|
20970 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_SEC_extension_448\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:20988:18
|
20988 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_SEC_extension_449\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21006:18
|
21006 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_SEC_extension_450\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21024:18
|
21024 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_SEC_extension_451\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21042:18
|
21042 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_452\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21060:18
|
21060 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_extension_453\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21078:18
|
21078 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_GOOGLE_extension_454\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21096:18
|
21096 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_GOOGLE_extension_455\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21114:18
|
21114 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_NV_extension_456\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21132:18
|
21132 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_457\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21150:18
|
21150 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_458\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21168:18
|
21168 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_ARM_extension_459\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21186:18
|
21186 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_460\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21204:18
|
21204 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_461\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21226:18
|
21226 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_462\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `CStr::from_bytes_with_nul_unchecked` is not yet stable as a const fn
--> /home/petmedix/.cargo/registry/src/github.com-1ecc6299db9ec823/ash-0.37.0+1.3.209/src/vk/extensions.rs:21244:18
|
21244 | unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(b"VK_EXT_extension_463\0") }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 461 previous errors
error: could not compile `ash`
To learn more, run the command again with --verbose.
Hi Albert,
The working hypothesis here is that there is a flaw in the wgpu
crate. Therefore two things:
- Update to the latest
cargo
. Something like this might work:
- sudo apt remove cargo
- sudo apt autoremove cargo
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- go with option 1
- need ~/.cargo/bin to be in path
- If
wgpu
compiles, and you still get an error, then it would make sense to file an issue on thewgpu
repo. Conversely, if there is no error, then possibly there is a problem iniced
, and we can continue here.
Here is the result for hello
:
user@L340-WS5:~/wgpu$ cargo run --example hello
Compiling wgpu v0.12.0 (/home/user/wgpu/wgpu)
Finished dev [unoptimized + debuginfo] target(s) in 5.54s
Running `target/debug/examples/hello`
libEGL warning: DRI2: failed to create dri screen
[2022-04-22T09:11:09Z ERROR wgpu_hal::gles::egl] EGL 'eglInitialize' code 0x3001: DRI2: failed to create screen
AdapterInfo { name: "GeForce GTX 1650", vendor: 4318, device: 8081, device_type: DiscreteGpu, backend: Vulkan }
And here it is for cube
:
user@L340-WS5:~/wgpu$ RUST_BACKTRACE=1 cargo run --example cube
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running `target/debug/examples/cube`
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/mod.rs:619:9
stack backtrace:
0: rust_begin_unwind
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
2: winit::platform_impl::platform::EventLoop<T>::new_any_thread
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/mod.rs:619:9
3: winit::platform_impl::platform::EventLoop<T>::new
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/platform_impl/linux/mod.rs:574:9
4: winit::event_loop::EventLoop<T>::with_user_event
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/event_loop.rs:134:25
5: winit::event_loop::EventLoop<()>::new
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.0/src/event_loop.rs:120:9
6: cube::framework::setup::{{closure}}
at ./wgpu/examples/cube/../framework.rs:83:22
7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/future/mod.rs:84:19
8: pollster::block_on
at /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/pollster-0.2.4/src/lib.rs:132:15
9: cube::framework::run
at ./wgpu/examples/cube/../framework.rs:375:17
10: cube::main
at ./wgpu/examples/cube/main.rs:399:5
11: core::ops::function::FnOnce::call_once
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Running glxinfo | grep Accelerated
yields Accelerated: no
. Thus this appears to be a Linux GPU configuration problem that transcends both iced
and wgpu
. It's not clear how this should be resolved. Even though this is not an iced
problem per se, it is possible that it could be a problem for other users of iced
applications under Linux.
This will be properly addressed once we tackle #1071 and #1199.