Baezon / pof-tools

Program for manipulating the Freespace model format .pof
3 stars 8 forks source link

Error during compiling on Debian unstable #16

Closed tomimaki closed 2 years ago

tomimaki commented 2 years ago

I dont how much of info is needed, so copied all. Distribution: Debian unstable.

Updating crates.io index
  Downloaded bit_field v0.10.1
  Downloaded futures-core v0.3.21
  Downloaded color_quant v1.1.0
  Downloaded flate2 v1.0.22
  Downloaded gif v0.11.3
  Downloaded lebe v0.5.1
  Downloaded crc32fast v1.3.2
  Downloaded getrandom v0.2.5
  Downloaded pin-project v1.0.10
  Downloaded mio v0.8.1
  Downloaded inflate v0.4.5
  Downloaded deflate v1.0.0
  Downloaded pin-project-internal v1.0.10
  Downloaded scoped_threadpool v0.1.9
  Downloaded nanorand v0.7.0
  Downloaded jpeg-decoder v0.1.22
  Downloaded spin v0.9.2
  Downloaded futures-sink v0.3.21
  Downloaded flume v0.10.12
  Downloaded weezl v0.1.5
  Downloaded exr v1.4.1
  Downloaded png v0.17.5
  Downloaded rayon v1.5.1
  Downloaded num-iter v0.1.42
  Downloaded threadpool v1.8.1
  Downloaded num_cpus v1.13.1
  Downloaded nalgebra-glm v0.16.0
  Downloaded simba v0.7.1
  Downloaded miniz_oxide v0.5.1
  Downloaded half v1.8.2
  Downloaded adler32 v1.2.0
  Downloaded rayon-core v1.9.1
  Downloaded image v0.24.1
  Downloaded jpeg-decoder v0.2.2
  Downloaded nalgebra v0.30.1
  Downloaded tiff v0.7.1
  Downloaded dae-parser v0.8.4
  Downloaded 37 crates (4.5 MB) in 1.76s (largest was `tiff` at 1.4 MB)
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.105
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.30
   Compiling unicode-xid v0.2.2
   Compiling xml-rs v0.8.4
   Compiling lazy_static v1.4.0
   Compiling pkg-config v0.3.22
   Compiling bitflags v1.2.1
   Compiling syn v1.0.80
   Compiling log v0.4.14
   Compiling smallvec v1.7.0
   Compiling once_cell v1.8.0
   Compiling version_check v0.9.3
   Compiling memchr v2.4.1
   Compiling scopeguard v1.1.0
   Compiling scoped-tls v1.0.0
   Compiling downcast-rs v1.2.0
   Compiling khronos_api v3.1.0
   Compiling minimal-lexical v0.1.4
   Compiling serde_derive v1.0.130
   Compiling serde v1.0.130
   Compiling crossbeam-utils v0.8.5
   Compiling adler v1.0.2
   Compiling parking_lot_core v0.8.5
   Compiling cty v0.2.2
   Compiling bytemuck v1.7.2
   Compiling percent-encoding v2.1.0
   Compiling ttf-parser v0.12.3
   Compiling crossbeam-epoch v0.9.5
   Compiling winit v0.26.1
   Compiling ab_glyph_rasterizer v0.1.4
   Compiling typenum v1.14.0
   Compiling crc32fast v1.3.2
   Compiling cc v1.0.71
   Compiling rayon-core v1.9.1
   Compiling base64 v0.13.0
   Compiling nohash-hasher v0.2.0
   Compiling atomic_refcell v0.1.8
   Compiling futures-core v0.3.21
   Compiling either v1.6.1
   Compiling rawpointer v0.2.1
   Compiling gimli v0.25.0
   Compiling paste v1.0.5
   Compiling adler32 v1.2.0
   Compiling ref-cast v1.0.6
   Compiling rustc-demangle v0.1.21
   Compiling futures-sink v0.3.21
   Compiling crossbeam-queue v0.3.2
   Compiling webbrowser v0.5.5
   Compiling weezl v0.1.5
   Compiling fnv v1.0.7
   Compiling takeable-option v0.5.0
   Compiling same-file v1.0.6
   Compiling lebe v0.5.1
   Compiling half v1.8.2
   Compiling bit_field v0.10.1
   Compiling color_quant v1.1.0
   Compiling jpeg-decoder v0.1.22
   Compiling byteorder v1.4.3
   Compiling scoped_threadpool v0.1.9
   Compiling libloading v0.7.1
   Compiling instant v0.1.12
   Compiling lock_api v0.4.5
   Compiling memoffset v0.6.4
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling miniz_oxide v0.4.4
   Compiling num-rational v0.4.0
   Compiling rayon v1.5.1
   Compiling num-iter v0.1.42
   Compiling wayland-sys v0.29.4
   Compiling wayland-sys v0.28.6
   Compiling x11-dl v2.19.1
   Compiling smithay-client-toolkit v0.15.3
   Compiling nom v7.0.0
   Compiling ahash v0.7.6
   Compiling miniz_oxide v0.5.1
   Compiling raw-window-handle v0.4.2
   Compiling safe_arch v0.6.0
   Compiling matrixmultiply v0.3.1
   Compiling deflate v1.0.0
   Compiling inflate v0.4.5
   Compiling owned_ttf_parser v0.12.1
   Compiling walkdir v2.3.2
   Compiling gif v0.11.3
   Compiling dlib v0.5.0
   Compiling spin v0.9.2
   Compiling backtrace v0.3.62
   Compiling addr2line v0.16.0
   Compiling ab_glyph v0.2.11
   Compiling wide v0.7.1
   Compiling gl_generator v0.14.0
   Compiling quote v1.0.10
   Compiling object v0.27.1
   Compiling quick-xml v0.20.0
   Compiling crossbeam-channel v0.5.1
   Compiling png v0.17.5
   Compiling quick-xml v0.22.0
   Compiling wayland-scanner v0.29.4
   Compiling wayland-scanner v0.28.6
   Compiling nix v0.22.3
   Compiling getrandom v0.2.5
   Compiling nix v0.20.2
   Compiling memmap2 v0.3.1
   Compiling dirs-sys-next v0.1.2
   Compiling mio v0.8.1
   Compiling num_cpus v1.13.1
   Compiling memmap2 v0.2.3
   Compiling shared_library v0.1.9
   Compiling time v0.1.43
   Compiling flate2 v1.0.22
   Compiling which v4.2.2
   Compiling num-complex v0.4.0
   Compiling approx v0.5.0
   Compiling minidom v0.13.0
   Compiling glutin_egl_sys v0.1.5
   Compiling glutin_glx_sys v0.1.7
   Compiling glium v0.31.0
   Compiling crossbeam-deque v0.8.1
   Compiling xcb v0.10.1
   Compiling nanorand v0.7.0
   Compiling xcursor v0.3.4
   Compiling directories-next v2.0.0
   Compiling dirs-next v2.0.0
   Compiling wayland-client v0.29.4
   Compiling wayland-protocols v0.29.4
   Compiling parking_lot v0.11.2
   Compiling wayland-client v0.28.6
   Compiling wayland-protocols v0.28.6
   Compiling threadpool v1.8.1
   Compiling osmesa-sys v0.1.2
   Compiling tiff v0.7.1
   Compiling chrono v0.4.19
   Compiling simba v0.7.1
   Compiling wayland-commons v0.29.4
   Compiling calloop v0.9.3
   Compiling crossbeam v0.8.1
   Compiling wayland-commons v0.28.6
   Compiling pin-project-internal v1.0.10
   Compiling nalgebra-macros v0.1.0
   Compiling ref-cast-impl v1.0.6
   Compiling thiserror-impl v1.0.30
   Compiling jpeg-decoder v0.2.2
   Compiling wayland-cursor v0.29.4
   Compiling wayland-egl v0.29.4
   Compiling pin-project v1.0.10
   Compiling wayland-cursor v0.28.6
   Compiling x11-clipboard v0.5.3
   Compiling thiserror v1.0.30
   Compiling nalgebra v0.30.1
   Compiling flume v0.10.12
   Compiling native-dialog v0.6.3
   Compiling exr v1.4.1
error[E0277]: expected a `Fn<(char,)>` closure, found `[char; 2]`
  --> /home/tomi/.cargo/registry/src/github.com-1ecc6299db9ec823/native-dialog-0.6.3/src/dialog_impl/gnu/message.rs:62:18
   |
62 |         .replace(&[' ', '\t'], "&nbsp;")
   |          ------- ^^^^^^^^^^^^ expected an `Fn<(char,)>` closure, found `[char; 2]`
   |          |
   |          required by a bound introduced by this call
   |
   = help: the trait `Fn<(char,)>` is not implemented for `[char; 2]`
   = note: required because of the requirements on the impl of `FnOnce<(char,)>` for `&[char; 2]`
   = note: required because of the requirements on the impl of `Pattern<'_>` for `&[char; 2]`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `native-dialog` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
Baezon commented 2 years ago

I've committed my Cargo.lock file to ensure we have identical build processes. Pull again, and give it another go.

Baezon commented 2 years ago

If that doesn't work try updating Rust ('rustup update' in the terminal), similar code had the same error for me until I updated from 1.56 to 1.59.

tomimaki commented 2 years ago

Seems Rust 1.57 is on Debian.

Baezon commented 2 years ago

Use rustup.rs instead of something like apt, its sometimes a bit out of date.

tomimaki commented 2 years ago

I have to uninstall rust from system first.

tomimaki commented 2 years ago

Installed 1.59 and I got 3 different errors:

   Compiling dae-parser v0.8.4
   Compiling pof v0.1.0 (/home/tomi/pof-tools/pof)
   Compiling pof-tools v0.9.0 (/home/tomi/pof-tools)
error[E0432]: unresolved import `glium::glutin::platform::windows`
 --> src/main.rs:7:50
  |
7 |     glutin::{self, event::WindowEvent, platform::windows::WindowBuilderExtWindows, window::Icon},
  |                                                  ^^^^^^^ could not find `windows` in `platform`

error[E0599]: no method named `with_taskbar_icon` found for struct `WindowBuilder` in the current scope
  --> src/main.rs:29:10
   |
29 |         .with_taskbar_icon(Some(Icon::from_rgba(include_bytes!("icon.raw").to_vec(), 32, 32).unwrap()));
   |          ^^^^^^^^^^^^^^^^^ method not found in `WindowBuilder`

error[E0283]: type annotations needed
   --> src/main.rs:27:10
    |
27  |         .with_inner_size(glutin::dpi::LogicalSize { width: 800.0, height: 600.0 })
    |          ^^^^^^^^^^^^^^^ cannot infer type for type `{float}`
    |
    = note: multiple `impl`s satisfying `{float}: Pixel` found in the `winit` crate:
            - impl Pixel for f32;
            - impl Pixel for f64;
    = note: required because of the requirements on the impl of `From<LogicalSize<{float}>>` for `Size`
    = note: required because of the requirements on the impl of `Into<Size>` for `LogicalSize<{float}>`
note: required by a bound in `WindowBuilder::with_inner_size`
   --> /home/tomi/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.26.1/src/window.rs:229:31
    |
229 |     pub fn with_inner_size<S: Into<Size>>(mut self, size: S) -> Self {
    |                               ^^^^^^^^^^ required by this bound in `WindowBuilder::with_inner_size`

Some errors have detailed explanations: E0283, E0432, E0599.
For more information about an error, try `rustc --explain E0283`.
Baezon commented 2 years ago

You've reminded me I should set up CI, so I've run into those too. If you pull again they should be fixed.

tomimaki commented 2 years ago

It works. Thanks.