fschutt/azul

Build failed with "failed to resolve: could not find `IoReader` in `bincode`" error

ThisIsRex opened this issue ยท 27 comments

Description

warning: build failed, waiting for other jobs to finish... error: build failed PS L:\R\Coding\Rust\my_first_azul_app> cargo run Compiling webrender_api v0.60.0 error[E0433]: failed to resolve: could not find 'IoReader' in 'bincode' --> C:\Users\Admin\.cargo\registry\src\github.com-1ecc6299db9ec823\webrender_api-0.60.0\src\display_list.rs:270:35 | 270 | let reader = bincode::IoReader::new(UnsafeReader::new(&mut self.data)); | ^^^^^^^^ could not find 'IoReader' in 'bincode' error: aborting due to previous error For more information about this error, try 'rustc --explain E0433.
error: could not compile 'webrender_api.

Version / OS

  • azul version: 0.1

  • Operating system: Windows 10

  • Windowing system (X11 or Wayland, Linux only):

Steps to Reproduce

cargo run

Additional Information

CMake installed, default toolchain is stable-x86_64-pc-windows-msvc, MSVC installed

It's pretty obvious but i have the same issue when using stable-x86_64-pc-windows-gnu

I'm on macOS 10.15 with Azul 0.1 experiencing the same issue

I'm on macOS 10.15.6 and this error disappeared after I switch to WIP branch but I got another error: azul-dll missing.

Same issue here on Linux Mint Debian Edition 4. I get the same error as @xudesheng is stating when switching to the WIP branch.
Visiting the Travis CI build history I was not able to find a last successful build.

Does someone know a commit that builds successfully?

I'm win10 stable-x86_64-pc-windows-msvc with Azul 0.1 experiencing the same issue

I am using Ubuntu 20.04 LTS (Rust toolchain stable-x86_64-unknown-linux-gnu) and I am experiencing the same issue.

Facing same issue with win10 stable-x86_64-pc-windows-msvc and Azul 0.1

I was able to build it by changing the webrender dependency to "*" in cargo/azul/Cargo.toml.
I will do further testing later this afternoon.

I tried the examples and they are building and starting on

but somehow the styling is not working properly.

I was able to build it by changing the webrender dependency to "*" in cargo/azul/Cargo.toml.
I will do further testing later this afternoon.

I set as you said and got these errors:

   Compiling azul v0.1.0 (C:\Users\Admin\Desktop\azul-master\cargo\azul)
error[E0428]: the name `wr_translate_font_instance_platform_options` is defined multiple times
   --> cargo\azul\../../azul\wr_translate.rs:646:1
    |
618 | const fn wr_translate_font_instance_platform_options(fio: FontInstancePlatformOptions) -> WrFontInstancePlatformOptions {
    | ----------------------------------------------------------------------------------------------------------------------- previous definition of the value `wr_translate_font_instance_platform_options` here
...
646 | fn wr_translate_font_instance_platform_options(fio: FontInstancePlatformOptions) -> WrFontInstancePlatformOptions {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `wr_translate_font_instance_platform_options` redefined here
    |
    = note: `wr_translate_font_instance_platform_options` must be defined only once in the value namespace of this module

error[E0432]: unresolved imports `webrender::api::LayoutSize`, `webrender::api::DeviceIntSize`
  --> cargo\azul\../../azul\app.rs:19:9
   |
19 |         LayoutSize as WrLayoutSize,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSize` in `api`
20 |         DeviceIntSize as WrDeviceIntSize,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntSize` in `api`

error[E0432]: unresolved import `webrender::api::WorldPoint`
  --> cargo\azul\../../azul\app.rs:60:22
   |
60 | use webrender::api::{WorldPoint, HitTestFlags};
   |                      ^^^^^^^^^^ no `WorldPoint` in `api`

error[E0432]: unresolved imports `webrender::api::DeviceIntRect`, `webrender::api::DeviceIntPoint`
    --> cargo\azul\../../azul\app.rs:1645:26
     |
1645 |     use webrender::api::{DeviceIntRect, DeviceIntPoint};
     |                          ^^^^^^^^^^^^^  ^^^^^^^^^^^^^^ no `DeviceIntPoint` in `api`
     |                          |
     |                          no `DeviceIntRect` in `api`

error[E0432]: unresolved import `webrender::api::DeviceIntSize`
  --> cargo\azul\../../azul\window.rs:11:9
   |
11 |         DeviceIntSize as WrDeviceIntSize,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntSize` in `api`

error[E0432]: unresolved import `crate::glutin::platform::unix`
    --> cargo\azul\../../azul\window.rs:1007:34
     |
1007 |     use crate::glutin::platform::unix::EventLoopWindowTargetExtUnix;
     |                                  ^^^^ could not find `unix` in `platform`

error[E0432]: unresolved imports `webrender::ExternalImageHandler`, `webrender::ExternalImage`, `webrender::ExternalImageSource`, `webrender::api::TexelRect`, `webrender::api::DevicePoint`
 --> cargo\azul\../../azul\compositor.rs:2:5
  |
2 |     ExternalImageHandler as WrExternalImageHandler,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ExternalImageHandler` in the root
3 |     ExternalImage as WrExternalImage,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ExternalImage` in the root
4 |     ExternalImageSource as WrExternalImageSource,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ExternalImageSource` in the root
5 |     api::{
6 |         TexelRect as WrTexelRect,
  |         ^^^^^^^^^^^^^^^^^^^^^^^^ no `TexelRect` in `api`
7 |         DevicePoint as WrDevicePoint,
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DevicePoint` in `api`

error[E0432]: unresolved imports `webrender::api::LayoutPrimitiveInfo`, `webrender::api::LayoutSideOffsets`, `webrender::api::LayoutSize`, `webrender::api::LayoutPoint`, `webrender::api::LayoutRect`, `webrender::api::ImageDirtyRect`, `webrender::api::FontLCDFilter`, `webrender::api::FontHinting`
  --> cargo\azul\../../azul\wr_translate.rs:8:5
   |
8  |     LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`
...
22 |     LayoutSideOffsets as WrLayoutSideOffsets,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSideOffsets` in `api`
...
28 |     LayoutSize as WrLayoutSize,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSize` in `api`
29 |     LayoutPoint as WrLayoutPoint,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPoint` in `api`
30 |     LayoutRect as WrLayoutRect,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutRect` in `api`
...
47 |     ImageDirtyRect as WrImageDirtyRect,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `ImageDirtyRect` in `api`
...
53 |     FontLCDFilter as WrFontLCDFilter,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FontLCDFilter` in `api`
54 |     FontHinting as WrFontHinting,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `FontHinting` in `api`

error[E0432]: unresolved import `webrender::api::DeviceIntSize`
   --> cargo\azul\../../azul\wr_translate.rs:574:9
    |
574 |     use webrender::api::DeviceIntSize;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntSize` in `api`

error[E0432]: unresolved imports `webrender::api::DeviceIntRect`, `webrender::api::DeviceIntPoint`, `webrender::api::DeviceIntSize`
   --> cargo\azul\../../azul\wr_translate.rs:958:9
    |
958 |         DeviceIntRect as WrDeviceIntRect,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntRect` in `api`
959 |         DeviceIntPoint as WrDeviceIntPoint,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntPoint` in `api`
960 |         DeviceIntSize as WrDeviceIntSize,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `DeviceIntSize` in `api`

error[E0432]: unresolved import `webrender::api::LayoutPrimitiveInfo`
    --> cargo\azul\../../azul\wr_translate.rs:1151:9
     |
1151 |         LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`

error[E0432]: unresolved imports `webrender::api::LayoutPrimitiveInfo`, `webrender::api::LayoutSize`, `webrender::api::LayoutRect`
    --> cargo\azul\../../azul\wr_translate.rs:1198:9
     |
1198 |         LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`
1199 |         LayoutSize as WrLayoutSize,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSize` in `api`
1200 |         LayoutRect as WrLayoutRect,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutRect` in `api`

error[E0432]: unresolved import `webrender::api::LayoutPrimitiveInfo`
    --> cargo\azul\../../azul\wr_translate.rs:1496:9
     |
1496 |         LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`

error[E0432]: unresolved import `webrender::api::LayoutSize`
    --> cargo\azul\../../azul\wr_translate.rs:1521:13
     |
1521 |         use webrender::api::LayoutSize as WrLayoutSize;
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSize` in `api`

error[E0432]: unresolved import `webrender::api::LayoutPrimitiveInfo`
    --> cargo\azul\../../azul\wr_translate.rs:1549:9
     |
1549 |         LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`

error[E0432]: unresolved imports `webrender::api::LayoutRect`, `webrender::api::LayoutPoint`, `webrender::api::LayoutVector2D`
    --> cargo\azul\../../azul\wr_translate.rs:1750:30
     |
1750 |         use webrender::api::{LayoutRect, LayoutPoint, LayoutVector2D};
     |                              ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^^^ no `LayoutVector2D` in `api`
     |                              |           |
     |                              |           no `LayoutPoint` in `api`
     |                              no `LayoutRect` in `api`

error[E0432]: unresolved imports `webrender::api::LayoutSideOffsets`, `webrender::api::LayoutPrimitiveInfo`
    --> cargo\azul\../../azul\wr_translate.rs:1825:9
     |
1825 |         LayoutSideOffsets as WrLayoutSideOffsets,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutSideOffsets` in `api`
1826 |         BorderDetails as WrBorderDetails,
1827 |         LayoutPrimitiveInfo as WrLayoutPrimitiveInfo,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `LayoutPrimitiveInfo` in `api`

I also tried to run the examples from the forked azul and they launched but with glitches

I'm Having the same issues, I still haven't tried the solution suggested by @emirror-de . But I have to express my consern since I'm learning the language and planned a project and was looking for a gui framework and I saw the "are we gui ready yet" website and saw azul first, I was hoping it would work. but for a first impression it disapoints me very much. not that I don't understand that it's not that ready but I was hoping it would be usable at least one of the examples.

On Ubuntu 20.04
I followed the instructions listed here https://github.com/maps4print/azul/wiki/Installation :
and followed the hello world example still had issues compiling

 Compiling plane-split v0.13.9
   Compiling webrender_api v0.60.0
error[E0433]: failed to resolve: could not find `IoReader` in `bincode`
   --> /home/ant/.cargo/registry/src/github.com-1ecc6299db9ec823/webrender_api-0.60.0/src/display_list.rs:270:35
    |
270 |             let reader = bincode::IoReader::new(UnsafeReader::new(&mut self.data));
    |                                   ^^^^^^^^ could not find `IoReader` in `bincode`

   Compiling smithay-client-toolkit v0.6.6
   Compiling azul-text-layout v0.1.0 (https://github.com/maps4print/azul#7ed96030)
   Compiling azul-widgets v0.1.0 (https://github.com/maps4print/azul#7ed96030)
   Compiling azul-layout v0.1.0 (https://github.com/maps4print/azul#7ed96030)
   Compiling winit v0.20.0
error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: could not compile `webrender_api`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

thanks in advance

For some reason webrender-0.60.0 broke, which isn't a problem since azul has already been upgraded to webrender-0.61.0 on the wip branch. The master branch is severely outdated, the wip branch works though.

I just came back from vacation, so I didn't do anything last month. The documentation + installation instructions are horribly outdated, which is why I pushed the README to reflect that.

No, you currently can't use Azul to build applications, it's broken. I'll fix it (on the wip branch) but that still needs time.

@fschutt is there anything I can do to help you out ?

@fschutt when i am pointing to wip branch, i am getting different erros.

[dependencies]
azul = { git = "https://github.com/maps4print/azul", branch = "wip"}
divya@divyaPC:~/temp/my_first_azul_app$ cargo run
   Compiling azul v0.0.1 (https://github.com/maps4print/azul?branch=wip#58cff962)
error: couldn't read /home/divya/.cargo/lib/azul-dll-0.0.1/target/release/libazul.so: No such file or directory (os error 2)
    --> /home/divya/.cargo/git/checkouts/azul-f3b1e21a5e685cad/58cff96/azul/src/rust/dll.rs:7250:30
     |
7250 | ...u8] = include_bytes!(concat!(env!("CARGO_HOME"), "/lib/", "azul-dll-", env!("CARGO_PKG_VERSION"), "/target/release/libazul.so")); /* !...
     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

@fschutt when i am pointing to wip branch, i am getting different erros.

[dependencies]
azul = { git = "https://github.com/maps4print/azul", branch = "wip"}
divya@divyaPC:~/temp/my_first_azul_app$ cargo run
   Compiling azul v0.0.1 (https://github.com/maps4print/azul?branch=wip#58cff962)
error: couldn't read /home/divya/.cargo/lib/azul-dll-0.0.1/target/release/libazul.so: No such file or directory (os error 2)
    --> /home/divya/.cargo/git/checkouts/azul-f3b1e21a5e685cad/58cff96/azul/src/rust/dll.rs:7250:30
     |
7250 | ...u8] = include_bytes!(concat!(env!("CARGO_HOME"), "/lib/", "azul-dll-", env!("CARGO_PKG_VERSION"), "/target/release/libazul.so")); /* !...
     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

@gnusiva Did you find a fix for the error?

@jim4067 The solution for your error is

cd azul-dll && cargo install --path .

You need to install the azul.so library first. Building and linking azul takes a long time, which is why azul uses pre-built binary DLLs (also to provide interop for C / other languages). If there is no azul.so (or azul.dll on Windows) in the ~/.cargo/lib/azul-dll-0.1.0/target/release/ folder, it won't work.

The error message also says that, but it's cut off because your terminal isn't wide enough.

@fschutt How do I install the azul.so. I also do not have a /lib directory in the ~/.cargo directory, so azul.so is not there.

@jim4067 cd azul-dll && cargo install --path . as I said.

I'm on Linux lite experiencing the same issue

@fschutt As of today, cloning azul and cd azul-dll && cargo install --path . results to:

file ~/.cargo/bin/azul-dll    
~/.cargo/bin/azul-dll: ELF 64-bit LSB shared object ....

Not the expected ~/.cargo/lib/azul-dll-0.0.1/target/release/libazul.so

(Debian GNU/Linux 9.13 (stretch) using clang++-7 as C++17+ compiler and rust 1.49.0)

A minimal example is "building" with a symlink but this is far-fetched and the simplest examples/hello_world/hello_world.rs doesn't compile.

Not usable for now.

I'm facing the same issue on Ubuntu and Windows

Same problem on linux

I've experienced the same issue on OSX and Windows. I tried each of the fixes posted above with no success.

(edit: should have specified, Windows 10 and OSX v 10.15.6)

The master branch is not developed, only the new_old_layout branch is. The new branch has a build.py script.

Please just do:

# install llvm / clang: https://releases.llvm.org/download.html#11.1.0
# linux only: install libxcb, libfontconfig and libfreetype6!
git checkout -b new_old_layout
python3 ./build.py

This will generate the API, build the .dll, azul and all examples that are currently working (public and table example). Once the crate is released, installing will also work by just doing cargo install azul-dll, but right now it doesn't seem to work locally.

Azul now builds fine and clang is not required (at least for now)

git clone https://github.com/fschutt/azul
cd azul/azul-dll
cargo build --release

Webrender has been updated, the dependency issues have been resolved. At least on Windows and Linux, the above now builds without issues. Reopen if this issue still exists (it shouldn't since webrender was updated).