Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with 'video' feature enabled #331

Open
DemonikGH opened this issue May 28, 2024 · 3 comments
Open

Fails to build with 'video' feature enabled #331

DemonikGH opened this issue May 28, 2024 · 3 comments

Comments

@DemonikGH
Copy link

DemonikGH commented May 28, 2024

Trying to build gifski with cargo install --features=video but it fails when building ffmpeg-sys-next. Setting FFMPEG_DIR to installed ffmpeg doesn't help, using vcpkg installed ffmpeg doesn't work either.

Output (with either FFMPEG_DIR or vcpkg installed ffmpeg, adding -v doesn't change it either):

error: failed to run custom build command for `ffmpeg-sys-next v6.1.0`

Caused by:
  process didn't exit successfully: `C:\Users\Nikolay\AppData\Local\Temp\cargo-installlR4jPA\release\build\ffmpeg-sys-next-9ecc509337a9dc9f\build-script-build` (exit code: 101)
error: failed to compile `gifski v1.32.0`, intermediate artifacts can be found at `C:\Users\Nikolay\AppData\Local\Temp\cargo-installlR4jPA`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Using stable-x86_64-pc-windows-msvc rust toolchain.

@kornelski
Copy link
Member

This is expected. Building ffmpeg on Windows is a major challenge only for the brave. I never managed to make it work, but the closest way to working is getting it pre-built via vcpkg and then somehow convincing the sys crates to link to it.

@DemonikGH
Copy link
Author

I used to be able to build with features=video enabled on my previous desktop but it was with version 1.12, I did not build ffmpeg itself, I was using FFMPEG_DIR environment variable which makes build script use system installed FFmpeg. Now it doesn't work and I can't figure out why, there is nothing logged in the console. I tried doing with vcpkg (it correctly downloaded and built ffmpeg) but it resulted in same error.

@DemonikGH
Copy link
Author

DemonikGH commented May 28, 2024

It's not ffmpeg that fails to build, it's Rust crate ffmpeg-sys-next. I thought it might be caused by having newer FFmpeg installed on my system but downgrading from 7.0 to 6.1 (same as the version of crate) didn't change anything. Also not sure if problem is with the crate itself or because of the slightly dated version of the crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants