PolyMeilex / Neothesia

Flashy Synthesia Like Software For Linux,Windows and MacOs
GNU General Public License v3.0
1.01k stars 64 forks source link

Build Error #27

Closed matheusfillipe closed 2 years ago

matheusfillipe commented 2 years ago

I have rust 1.64, trying to build neothesia-cli from latest commit. This is my output:

$ make build-recorder
cargo build --release --no-default-features --features record
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.132
   Compiling proc-macro2 v1.0.43
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.3
   Compiling pkg-config v0.3.25
   Compiling bitflags v1.3.2
   Compiling syn v1.0.99
   Compiling version_check v0.9.4
   Compiling once_cell v1.13.1
   Compiling log v0.4.17
   Compiling cc v1.0.73
   Compiling scopeguard v1.1.0
   Compiling memchr v2.5.0
   Compiling smallvec v1.9.0
   Compiling xml-rs v0.8.4
   Compiling crossbeam-utils v0.8.11
   Compiling lazy_static v1.4.0
   Compiling parking_lot_core v0.9.3
   Compiling cty v0.2.2
   Compiling rayon-core v1.9.3
   Compiling rustc-hash v1.1.0
   Compiling termcolor v1.1.3
   Compiling glob v0.3.0
   Compiling unicode-width v0.1.9
   Compiling crc32fast v1.3.2
   Compiling ash v0.37.0+1.3.209
   Compiling minimal-lexical v0.2.1
   Compiling scoped-tls v1.0.0
   Compiling khronos-egl v4.1.0
   Compiling downcast-rs v1.2.0
   Compiling bit-vec v0.6.3
   Compiling unicode-xid v0.2.3
   Compiling cfg_aliases v0.1.1
   Compiling adler32 v1.2.0
   Compiling hexf-parse v0.2.1
   Compiling byteorder v1.4.3
   Compiling adler v1.0.2
   Compiling regex-syntax v0.6.27
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.2
   Compiling arrayref v0.3.6
   Compiling bindgen v0.58.1
   Compiling ttf-parser v0.15.2
   Compiling humantime v2.1.0
   Compiling foreign-types-shared v0.3.1
   Compiling ansi_term v0.12.1
   Compiling inplace_it v0.3.4
   Compiling glow v0.11.2
   Compiling renderdoc-sys v0.7.1
   Compiling profiling v1.0.6
   Compiling futures-core v0.3.23
   Compiling arrayvec v0.7.2
   Compiling either v1.8.0
   Compiling futures-channel v0.3.23
   Compiling ppv-lite86 v0.2.16
   Compiling shlex v1.1.0
   Compiling ab_glyph_rasterizer v0.1.5
   Compiling futures-task v0.3.23
   Compiling copyless v0.1.5
   Compiling arrayvec v0.5.2
   Compiling lazycell v1.3.0
   Compiling peeking_take_while v0.1.2
   Compiling futures-sink v0.3.23
   Compiling futures-util v0.3.23
   Compiling serde_derive v1.0.143
   Compiling xi-unicode v0.3.0
   Compiling pin-project-lite v0.2.9
   Compiling serde v1.0.143
   Compiling futures-io v0.3.23
   Compiling percent-encoding v2.1.0
   Compiling linked-hash-map v0.5.6
   Compiling pin-utils v0.1.0
   Compiling static_assertions v1.1.0
   Compiling memalloc v0.1.0
   Compiling base64 v0.13.0
   Compiling piano-math v0.1.0 (/home/matheus/Programs/Neothesia/piano-math)
   Compiling fps_ticker v1.0.0
   Compiling gpu-alloc-types v0.2.0
   Compiling gpu-descriptor-types v0.1.1
   Compiling wgpu-types v0.13.2
   Compiling libloading v0.7.3
   Compiling instant v0.1.12
   Compiling ahash v0.7.6
   Compiling slotmap v1.0.6
   Compiling nom v5.1.2
   Compiling memoffset v0.6.5
   Compiling num-traits v0.2.15
   Compiling crossbeam-epoch v0.9.10
   Compiling lock_api v0.4.7
   Compiling indexmap v1.9.1
   Compiling rayon v1.5.3
   Compiling num-integer v0.1.45
   Compiling slab v0.4.7
   Compiling num-bigint v0.4.3
   Compiling num-rational v0.4.1
   Compiling num-iter v0.1.43
   Compiling wayland-sys v0.29.4
   Compiling servo-fontconfig-sys v5.1.0
   Compiling crossfont v0.5.0
   Compiling smithay-client-toolkit v0.16.0
   Compiling x11-dl v2.20.0
   Compiling alsa-sys v0.3.1
   Compiling cmake v0.1.48
   Compiling raw-window-handle v0.4.3
   Compiling raw-window-handle v0.5.0
   Compiling codespan-reporting v0.11.1
   Compiling wgpu-core v0.13.2
   Compiling clang-sys v1.3.3
   Compiling bit-set v0.5.3
   Compiling deflate v1.0.0
   Compiling miniz_oxide v0.5.3
   Compiling textwrap v0.11.0
   Compiling fxhash v0.2.1
   Compiling owned_ttf_parser v0.15.1
   Compiling gpu-alloc v0.5.3
   Compiling dlib v0.5.0
   Compiling freetype-sys v0.13.1
   Compiling expat-sys v2.1.6
   Compiling ab_glyph v0.2.16
   Compiling nom v7.1.1
   Compiling aho-corasick v0.7.18
   Compiling png v0.17.5
   Compiling crossbeam-channel v0.5.6
   Compiling atty v0.2.14
   Compiling which v3.1.1
   Compiling num_cpus v1.13.1
   Compiling getrandom v0.2.7
   Compiling nix v0.22.3
   Compiling nix v0.24.2
   Compiling memmap2 v0.5.7
   Compiling nix v0.23.1
   Compiling mio v0.8.4
   Compiling regex v1.6.0
   Compiling spirv v0.2.0+1.5.4
   Compiling approx v0.5.1
   Compiling num-complex v0.4.2
   Compiling ordered-float v3.0.0
   Compiling clap v2.34.0
   Compiling xcursor v0.3.4
   Compiling rand_core v0.6.3
   Compiling cexpr v0.4.0
   Compiling crossbeam-deque v0.8.2
   Compiling parking_lot v0.12.1
   Compiling freetype-rs v0.26.0
   Compiling wayland-commons v0.29.4
   Compiling wayland-scanner v0.29.4
   Compiling env_logger v0.9.0
   Compiling alsa v0.6.0
   Compiling glyph_brush_layout v0.2.3
   Compiling env_logger v0.8.4
   Compiling hashbrown v0.12.3
   Compiling rand_chacha v0.3.1
   Compiling servo-fontconfig v0.5.1
   Compiling wayland-client v0.29.4
   Compiling wayland-protocols v0.29.4
   Compiling midir v0.8.0
   Compiling gpu-descriptor v0.2.3
   Compiling rand v0.8.5
   Compiling midi-io v0.1.0 (/home/matheus/Programs/Neothesia/midi-io)
   Compiling num v0.4.0
   Compiling thiserror-impl v1.0.32
   Compiling bytemuck_derive v1.2.1
   Compiling foreign-types-macros v0.2.2
   Compiling futures-macro v0.3.23
   Compiling midi v0.1.0
   Compiling twox-hash v1.6.3
   Compiling foreign-types v0.5.0
   Compiling bytemuck v1.12.1
   Compiling thiserror v1.0.32
   Compiling glyph_brush_draw_cache v0.1.5
   Compiling midly v0.5.2
   Compiling tiny-skia-path v0.7.0
   Compiling safe_arch v0.5.2
   Compiling naga v0.9.0
   Compiling calloop v0.10.1
   Compiling wayland-cursor v0.29.4
   Compiling ffmpeg-sys v4.3.3
   Compiling glyph_brush v0.7.5
   Compiling lib-midi v0.1.0 (/home/matheus/Programs/Neothesia/lib-midi)
   Compiling tiny-skia v0.7.0
   Compiling futures-executor v0.3.23
   Compiling wgpu-hal v0.13.2
   Compiling futures v0.3.23
   Compiling ron v0.8.0
   Compiling sctk-adwaita v0.4.2
   Compiling winit v0.27.2
   Compiling wgpu v0.13.1
   Compiling wgpu-jumpstart v0.1.0 (/home/matheus/Programs/Neothesia/wgpu-jumpstart)
   Compiling wgpu_glyph v0.17.0
   Compiling mpeg_encoder v0.2.1 (https://github.com/PolyMeilex/mpeg_encoder_next.git#0af42319)
error[E0432]: unresolved import `ffmpeg_sys::AVPicture`
  --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:16:77
   |
16 |     AVCodec, AVCodecContext, AVCodecID, AVFormatContext, AVFrame, AVPacket, AVPicture,
   |                                                                             ^^^^^^^^^ no `AVPicture` in the root

error[E0425]: cannot find function `av_register_all` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:105:29
    |
105 |                 ffmpeg_sys::av_register_all();
    |                             ^^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `avpicture_fill` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:213:33
    |
213 |             let _ = ffmpeg_sys::avpicture_fill(
    |                                 ^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `avcodec_encode_video2` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:256:31
    |
256 |             ret = ffmpeg_sys::avcodec_encode_video2(
    |                               ^^^^^^^^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `av_free_packet` in crate `ffmpeg_sys`
     --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:271:29
      |
271   |                   ffmpeg_sys::av_free_packet(&mut pkt);
      |                               ^^^^^^^^^^^^^^ help: a function with a similar name exists: `av_get_packet`
      |
     ::: /home/matheus/Programs/Neothesia/target/release/build/ffmpeg-sys-de143891d3f506c6/out/bindings.rs:16999:5
      |
16999 | /     pub fn av_get_packet(s: *mut AVIOContext, pkt: *mut AVPacket, size: libc::c_int)
17000 | |         -> libc::c_int;
      | |______________________- similarly named function `av_get_packet` defined here

error[E0425]: cannot find function `avpicture_get_size` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:490:44
    |
490 |             let nframe_bytes = ffmpeg_sys::avpicture_get_size(
    |                                            ^^^^^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `avpicture_fill` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:500:33
    |
500 |             let _ = ffmpeg_sys::avpicture_fill(
    |                                 ^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `avcodec_encode_video2` in crate `ffmpeg_sys`
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:574:39
    |
574 |                     ret = ffmpeg_sys::avcodec_encode_video2(
    |                                       ^^^^^^^^^^^^^^^^^^^^^ not found in `ffmpeg_sys`

error[E0425]: cannot find function `av_free_packet` in crate `ffmpeg_sys`
     --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:590:37
      |
590   |                           ffmpeg_sys::av_free_packet(&mut pkt);
      |                                       ^^^^^^^^^^^^^^ help: a function with a similar name exists: `av_get_packet`
      |
     ::: /home/matheus/Programs/Neothesia/target/release/build/ffmpeg-sys-de143891d3f506c6/out/bindings.rs:16999:5
      |
16999 | /     pub fn av_get_packet(s: *mut AVIOContext, pkt: *mut AVPacket, size: libc::c_int)
17000 | |         -> libc::c_int;
      | |______________________- similarly named function `av_get_packet` defined here

   Compiling neothesia-pipelines v0.1.0 (/home/matheus/Programs/Neothesia/neothesia-pipelines)
error[E0308]: mismatched types
   --> /home/matheus/.cargo/git/checkouts/mpeg_encoder_next-5ec055f06f12982c/0af4231/src/lib.rs:332:21
    |
332 |             codec = ffmpeg_sys::avcodec_find_encoder((*fmt).video_codec);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
    |
    = note: expected raw pointer `*mut AVCodec`
               found raw pointer `*const AVCodec`

Some errors have detailed explanations: E0308, E0425, E0432.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `mpeg_encoder` due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
make: *** [makefile:7: build-recorder] Error 101
PolyMeilex commented 2 years ago

Ok, I bumped the versions on master, did it do the trick?

matheusfillipe commented 2 years ago

Sorry, I didn't test building mpeg_encoder properly. It seems that the "build" feature is also needed for me. I've opened another PR in the mpeg repo.

PolyMeilex commented 2 years ago

Pushed a commit that enables build in neothesia: https://github.com/PolyMeilex/Neothesia/commit/02914748a8c45cac8d71028b943bb8ffb8b1f62c

matheusfillipe commented 2 years ago

Great thanks! Sorry for the confusion, it works now

PolyMeilex commented 2 years ago

Nice, no problem, thanks for pinpointing the issue.