russelltg / wl-screenrec

High performance wlroots screen recording, featuring hardware encoding
Apache License 2.0
305 stars 9 forks source link

Fails to compile (Arch Linux) #4

Closed theoparis closed 1 year ago

theoparis commented 1 year ago
.....
  cargo:ffmpeg_5_0=true
  cargo:rustc-cfg=feature="ffmpeg_5_1"
  cargo:ffmpeg_5_1=true

  --- stderr
  thread 'main' panicked at '"enum_(unnamed_at_/usr/include/math_h_934_1)" is not a valid Ident', /home/theo/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.51/src/fallback.rs:752:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `wl-screenrec v0.1.0 (https://github.com/russelltg/wl-screenrec#ccfc6def)`, intermediate artifacts can be found at `/tmp/cargo-installkeKv4a`

Additional Information

Kernel version:

-> uname -r
6.2.2-arch1-1

Rust version:

rustc 1.70.0-nightly (f15f0ea73 2023-03-04)
russelltg commented 1 year ago

I can't seem to repro on 1.70.0-nightly (f63ccaf25 2023-03-06), arch as well. Can you try installing through my AUR package?

russelltg commented 1 year ago

Closing this unless I get more info here

fcard commented 1 year ago

I ran into this as well on Ubuntu Mate (jammy), same error message. The version being sourced is probably the one I compiled from source:

$ ffmpeg.x -version
ffmpeg version N-108709-g3bd0bf76fb Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 13.0.0 (GCC) 20220823 (experimental)
configuration: --enable-version3 --enable-gmp --enable-gnutls --enable-libass --enable-libopus --enable-libcaca --enable-libcodec2 --enable-libmp3lame --enable-openal --enable-opencl --enable-libzimg --enable-libopenjpeg --enable-libpulse --enable-libxml2 --enable-opengl --enable-shared --libdir=/usr/lib/x86_64-linux-gnu/
libavutil      57. 39.101 / 57. 39.101
libavcodec     59. 50.101 / 59. 50.101
libavformat    59. 34.101 / 59. 34.101
libavdevice    59.  8.101 / 59.  8.101
libavfilter     8. 49.101 /  8. 49.101
libswscale      6.  8.112 /  6.  8.112
libswresample   4.  9.100 /  4.  9.100

Although I only did that to compile OBS and I mostly use the one that comes with Snap, and I have no idea how to pass that to cargo, hehe.

EDIT: I came here from a google search and thought this was the ffmpeg-next github repo, but since it wasn't mentioned, this error happens while building the ffmpeg-next-sys dependency.

russelltg commented 1 year ago

It seems FFMPEG_DIR env var can be used to use a custom ffmpeg