Skip to content

Error: "failed to run custom build command for `ffmpeg-sys-next v4.4.0" #198

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

Closed
FriendlyUser10 opened this issue Oct 21, 2021 · 2 comments
Closed

Comments

@FriendlyUser10
Copy link

FriendlyUser10 commented Oct 21, 2021

Is it possible to get the video feature from:

cargo install gifski --features=video

…without using Rust/cargo? I've been on the Rust board, faced several errors (artifacts in folders it creates from installation?) and none seem to fix the issue from simply running the .exe file given for Windows users.

I'm just trying to make the app as convenient for myself as the Mac version was/is now that I have a Windows machine; the conversion of videos to png files being tedious and the inability to then downsample the fps has made using the app almost punishing. Just confused to why the feature wouldn't be in the normal .exe on the website and how to add it without trying to work with Rust/cargo, which is obviously not meshing well with my stupid brain.

`cargo install gifski --features=video
    Updating crates.io index
  Installing gifski v1.5.1
warning: output filename collision.
The bin target `gifski` in package `gifski v1.5.1` has the same output filename as the lib target `gifski` in package `gifski v1.5.1`.
Colliding filename is: C:\Users\...\AppData\Local\Temp\cargo-installX2OD2e\release\gifski.pdb
The targets should have unique names.
Consider changing their names to be unique or compiling them separately.
This may become a hard error in the future; see <https://github.com/rust-lang/cargo/issues/6313>.
   Compiling libc v0.2.104
   Compiling version_check v0.9.3
   Compiling cc v1.0.71
   Compiling winapi v0.3.9
   Compiling cfg-if v1.0.0
   Compiling glob v0.3.0
   Compiling memchr v2.4.1
   Compiling proc-macro2 v1.0.30
   Compiling unicode-xid v0.2.2
   Compiling regex-syntax v0.6.25
   Compiling bindgen v0.54.0
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling once_cell v1.8.0
   Compiling bytemuck v1.7.2
   Compiling bitflags v1.3.2
   Compiling lazycell v1.3.0
   Compiling rustc-hash v1.1.0
   Compiling shlex v0.1.1
   Compiling peeking_take_while v0.1.2
   Compiling autocfg v1.0.1
   Compiling pkg-config v0.3.20
   Compiling vcpkg v0.2.15
   Compiling crossbeam-utils v0.8.5
   Compiling crc32fast v1.2.1
   Compiling adler v1.0.2
   Compiling color_quant v1.1.0
   Compiling ffmpeg-next v4.4.0
   Compiling weezl v0.1.5
   Compiling unicode-width v0.1.9
   Compiling imgref v1.9.1
   Compiling vec_map v0.8.2
   Compiling strsim v0.8.0
   Compiling quick-error v2.0.1
   Compiling dunce v1.0.2
   Compiling natord v1.0.9
   Compiling getrandom v0.2.3
   Compiling rgb v0.8.27
   Compiling nom v5.1.2
   Compiling ahash v0.7.6
   Compiling clang-sys v0.29.3
   Compiling textwrap v0.11.0
   Compiling miniz_oxide v0.4.4
   Compiling gif v0.11.3
   Compiling wild v2.0.4
   Compiling gif-dispose v3.1.1
   Compiling num_cpus v1.13.0
   Compiling libloading v0.5.2
   Compiling imagequant-sys v3.1.0+sys2.16.0
   Compiling gifsicle v1.92.5
   Compiling regex v1.5.4
   Compiling crossbeam-channel v0.5.1
   Compiling quote v1.0.10
   Compiling hashbrown v0.11.2
   Compiling flate2 v1.0.22
   Compiling fallible_collections v0.4.3
   Compiling resize v0.7.2
   Compiling lodepng v3.4.6
   Compiling imagequant v3.1.0
   Compiling cexpr v0.4.0
   Compiling atty v0.2.14
   Compiling time v0.1.43
   Compiling clap v2.33.3
   Compiling pbr v1.0.4
   Compiling ffmpeg-sys-next v4.4.0
error: failed to compile `gifski v1.5.1`, intermediate artifacts can be found at `C:\Users\...\AppData\Local\Temp\cargo-installX2OD2e`

Caused by:
  failed to run custom build command for `ffmpeg-sys-next v4.4.0`

Caused by:
  process didn't exit successfully: `C:\Users\...\AppData\Local\Temp\cargo-installX2OD2e\release\build\ffmpeg-sys-next-b4bbd485d19d26f3\build-script-build` (exit code: 101)
  --- stdout
  Could not find ffmpeg with vcpkg: Could not find Vcpkg tree: No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'
  cargo:rerun-if-env-changed=LIBAVUTIL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Command { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"libavutil\"", cause: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." } }', C:\Users\...\.cargo\registry\src\github.com-1ecc6299db9ec823\ffmpeg-sys-next-4.4.0\build.rs:701:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace`
@kornelski
Copy link
Member

kornelski commented Oct 21, 2021

The error is sadly too verbose (rust-lang/cargo#10159), but the relevant bits are command: "\"pkg-config\"…The system cannot find the file specified."

which means you don't have pkg-config command installed. You will also need to install ffmpeg and a C compiler, if you haven't already.

@NatoBoram
Copy link

NatoBoram commented Feb 7, 2022

I was also having troubles with this package.

Here's the dependencies I was missing:

sudo apt install libavutil-dev libavformat-dev libavfilter-dev llvm libclang-dev

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

3 participants