plotters-rs / plotters

A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely 🦀 📈🚀
https://plotters-rs.github.io/home/
MIT License
3.88k stars 281 forks source link

[BUG] 0.3.1 build failed in rustc 1.60.0 #348

Closed corper closed 2 years ago

corper commented 2 years ago

Describe the bug

error[E0432]: unresolved import `core_foundation::mach_port`
 --> /Users/***/.cargo/registry/src/github.com-1ecc6299db9ec823/core-graphics-0.22.3/src/event.rs:4:5
  |
4 |     mach_port::{CFMachPort, CFMachPortRef},
  |     ^^^^^^^^^ could not find `mach_port` in `core_foundation`

Version Information macOS Monterey 12.3.1

plotters = "0.3.1"

> rustup check
stable-x86_64-apple-darwin - Up to date : 1.60.0 (7737e0b5c 2022-04-04)
rustup - Up to date : 1.24.3
38 commented 2 years ago

Hi there, this seems related to some buggy core-fundation crate. I don't have osx machine for testing. would you mind copy paste the package version you are using, like use cargo tree

That would be very helpful for us to address the issue.

Thanks!

corper commented 2 years ago
├── plotters v0.3.1
│   ├── chrono v0.4.19 (*)
│   ├── font-kit v0.10.1
│   │   ├── bitflags v1.2.1
│   │   ├── byteorder v1.4.3
│   │   ├── core-foundation v0.9.1
│   │   │   ├── core-foundation-sys v0.8.2
│   │   │   └── libc v0.2.94
│   │   ├── core-graphics v0.22.3
│   │   │   ├── bitflags v1.2.1
│   │   │   ├── core-foundation v0.9.1 (*)
│   │   │   ├── core-graphics-types v0.1.1
│   │   │   │   ├── bitflags v1.2.1
│   │   │   │   ├── core-foundation v0.9.1 (*)
│   │   │   │   ├── foreign-types v0.3.2 (*)
│   │   │   │   └── libc v0.2.94
│   │   │   ├── foreign-types v0.3.2 (*)
│   │   │   └── libc v0.2.94
│   │   ├── core-text v19.2.0
│   │   │   ├── core-foundation v0.9.1 (*)
│   │   │   ├── core-graphics v0.22.3 (*)
│   │   │   ├── foreign-types v0.3.2 (*)
│   │   │   └── libc v0.2.94
│   │   ├── dirs-next v2.0.0
│   │   │   ├── cfg-if v1.0.0
│   │   │   └── dirs-sys-next v0.1.2
│   │   │       └── libc v0.2.94
│   │   ├── float-ord v0.2.0
│   │   ├── lazy_static v1.4.0 (*)
│   │   ├── libc v0.2.94
│   │   ├── log v0.4.14 (*)
│   │   ├── pathfinder_geometry v0.5.1
│   │   │   ├── log v0.4.14 (*)
│   │   │   └── pathfinder_simd v0.5.1
│   │   │       [build-dependencies]
│   │   │       └── rustc_version v0.3.3
│   │   │           └── semver v0.11.0
│   │   │               └── semver-parser v0.10.2
│   │   │                   └── pest v2.1.3
│   │   │                       └── ucd-trie v0.1.3
│   │   ├── pathfinder_simd v0.5.1 (*)
│   │   └── walkdir v2.3.2
│   │       └── same-file v1.0.6
│   ├── image v0.23.14
│   │   ├── bytemuck v1.9.1
│   │   ├── byteorder v1.4.3
│   │   ├── color_quant v1.1.0
│   │   ├── jpeg-decoder v0.1.22
│   │   ├── num-iter v0.1.42
│   │   │   ├── num-integer v0.1.44 (*)
│   │   │   └── num-traits v0.2.14 (*)
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.0.1
│   │   ├── num-rational v0.3.2
│   │   │   ├── num-integer v0.1.44 (*)
│   │   │   └── num-traits v0.2.14 (*)
│   │   │   [build-dependencies]
│   │   │   └── autocfg v1.0.1
│   │   ├── num-traits v0.2.14 (*)
│   │   └── png v0.16.8
│   │       ├── bitflags v1.2.1
│   │       ├── crc32fast v1.2.1 (*)
│   │       ├── deflate v0.8.6
│   │       │   ├── adler32 v1.2.0
│   │       │   └── byteorder v1.4.3
│   │       └── miniz_oxide v0.3.7
│   │           └── adler32 v1.2.0
│   ├── lazy_static v1.4.0 (*)
│   ├── num-traits v0.2.14 (*)
│   ├── pathfinder_geometry v0.5.1 (*)
│   ├── plotters-backend v0.3.2
│   ├── plotters-bitmap v0.3.1
│   │   ├── gif v0.11.3
│   │   │   ├── color_quant v1.1.0
│   │   │   └── weezl v0.1.6
│   │   ├── image v0.23.14 (*)
│   │   └── plotters-backend v0.3.2
│   ├── plotters-svg v0.3.1
│   │   └── plotters-backend v0.3.2
│   └── ttf-parser v0.12.3
38 commented 2 years ago

Thanks, would you mind try to run cargo update and then compile again?

corper commented 2 years ago

Compiled successfully. Thank you.

38 commented 2 years ago

That means plotters was broken by upstream dependencies at thag time and now the upstream crate fixed the issue. Closing the issue for now and feel free to reopen it if you feel anything is wrong.