lwizchz / vince

A rack synth
MIT License
7 stars 0 forks source link

Build error on Arch Linux #1

Closed a-1219 closed 3 months ago

a-1219 commented 4 months ago

Hi, I fell into the following error while running cargo run --release racks/:

error: failed to run custom build command for `v4l2-sys-mit v0.2.0`

Caused by:
  process didn't exit successfully: `~/Multimedia/Algorave/rust/vince/target/release/build/v4l2-sys-mit-4057644005bbc204/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.67/src/fallback.rs:774:9:
  "v4l2_pix_format_union_(anonymous_at_/usr/include/linux/videodev2_h_500_2)" is not a valid Ident
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lwizchz commented 4 months ago

Hi thanks for being interested in this! Lately I've been building on MacOS but let me take a look and see what I can do to get it to work on Linux again :) It may be that I need to remove support for the desktop video capture module (or maybe just change libraries) but it's been a little buggy since it was added so we'll see

a-1219 commented 4 months ago

You're welcome! Thanks for sharing it. If I knew how to code I would sure help, but I can be here testing it

lwizchz commented 4 months ago

Okay after some debugging, can you make sure you have the following dependencies installed?

https://github.com/nashaofu/xcap/?tab=readme-ov-file#linux-system-requirements

If so, then I may need to disable the VideoIn module temporarily since I attempted to upgrade the following dependency: screenshots 0.7.3 -> xcap 0.0.9 (renamed by the creator) and the new version requires the latest version of the image crate which appears to be incompatible with nokhwa 0.10.4 which I'm using for webcam capture :(

If I'm unable to resolve this, then I would eventually attempt to fork nokhwa and update it since it appears to be somewhat abandoned but I don't currently have a whole lot of time to dedicate to this. Luckily the VideoIn module isn't strictly necessary and is only really used if you want screen capture or webcam capture to mix with your generated video. These days I actually use a hardware video mixer (specifically the Focus Enhancements MX-4) instead of doing it in software but I know those are hard to come by these days.

a-1219 commented 4 months ago

Yes, all the dependencies were met. Although I think it would be cool to use the screen capture feature, I was actually wanting to use it as an audio-reactive video synth in the same vein as Hydra Video Synth, but with the built-in sound synthesis functionalities.

lwizchz commented 3 months ago

Sorry I've been quite busy and on vacation a bit but I just pushed commit fe5cf17 which should get things compiling for you! Let me know if you're still having trouble but otherwise I'll close this issue and begin work on updating the dependencies since bevy is now two versions behind (soon to be three). After that I'll see what can be done about re-enabling the VideoIn module :)

a-1219 commented 3 months ago

No problem, I'm all over the place myself. It seems like the program quitted right after starting. This is the error I get:

    Finished `release` profile [optimized] target(s) in 0.51s
     Running `target/release/vince racks/`
2024-06-14T15:55:48.550880Z  INFO bevy_winit::system: Creating new window "Vince Audio-Video Synth" (0v0)
2024-06-14T15:55:48.551435Z  INFO log: Guessed window scale factor: 1    
2024-06-14T15:55:48.761321Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon Vega 8 Graphics (RADV RAVEN)", vendor: 4098, device: 5592, device_type: IntegratedGpu, driver: "radv", driver_info: "Mesa 24.1.1-arch1.1", backend: Vulkan }
2024-06-14T15:55:48.811935Z  WARN bevy_asset::asset_server: no `AssetLoader` found
2024-06-14T15:55:48.813466Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux rolling Arch Linux", kernel: "6.9.3-lqx1-2-lqx", cpu: "AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx", core_count: "4", memory: "9.6 GiB" }
2024-06-14T15:55:48.815947Z  INFO bevy_framepace: Frametime limit changed to: 16.666667ms
2024-06-14T15:55:48.815964Z ERROR vince: Invalid file path: racks/
2024-06-14T15:55:48.815992Z ERROR vince: Check whether you need to enable a feature

I had to run cargo +nightly run --release racks/ about three times because different crates were failing during build, but insisting on it solved this particular issue 😅 I used the nightly channel because both stable and beta give the following error:

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:58:1
   |
58 | #![feature(type_alias_impl_trait)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:59:1
   |
59 | #![feature(impl_trait_in_assoc_type)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:60:1
   |
60 | #![feature(iter_array_chunks)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:61:1
   |
61 | #![feature(extract_if)]
   | ^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:62:1
   |
62 | #![feature(path_file_prefix)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:60:12
   |
60 | #![feature(iter_array_chunks)]
   |            ^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:61:12
   |
61 | #![feature(extract_if)]
   |            ^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
  --> src/main.rs:62:12
   |
62 | #![feature(path_file_prefix)]
   |            ^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `vince` (bin "vince") due to 8 previous errors

I started to learn rust, hope one day I can be more helpful for this project and the rust creative coding ecosystem.

lwizchz commented 3 months ago

Ahh I've been running with the following symbolic link for a while to help with subfolder tab-completion and I guess at some point running without the link got broken! Try this from the main folder:

$ ln -s assets/racks/ racks
a-1219 commented 3 months ago

This worked for me, thanks! Is it possible to run both audio and video?

Edit: I was able to run an audiovisual rack. Feel free to close the issue

lwizchz commented 3 months ago

Ok yayy! I'll close this but lmk if you have any more questions/bugs/feature requests!