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

FreeBSD Compilation errored by pkg-config #40

Open
jaw-sh opened this issue May 25, 2022 · 1 comment
Open

FreeBSD Compilation errored by pkg-config #40

jaw-sh opened this issue May 25, 2022 · 1 comment

Comments

@jaw-sh
Copy link

jaw-sh commented May 25, 2022

# cargo test
   Compiling ring v0.16.20
   Compiling rustls v0.20.6
   Compiling zstd-safe v4.1.6+zstd.1.5.2
   Compiling zstd-sys v1.6.3+zstd.1.5.2
   Compiling blake3 v1.3.1
   Compiling ffmpeg-sys-next v5.0.1
error: failed to run custom build command for `ffmpeg-sys-next v5.0.1`

Caused by:
  process didn't exit successfully: `/usr/local/ruforo/target/debug/build/ffmpeg-sys-next-b8cd01aafd053925/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBAVUTIL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-freebsd
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_freebsd
  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-unknown-freebsd
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_freebsd
  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-unknown-freebsd
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_freebsd
  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-unknown-freebsd
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_freebsd
  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: Could not run `"pkg-config" "--libs" "--cflags" "libavutil"`
  The pkg-config command could not be found.

  Most likely, you need to install a pkg-config package for your OS.
  Try `apt install pkg-config`, or `yum install pkg-config`,
  or `pkg install pkg-config` depending on your distribution.

  If you've already installed it, ensure the pkg-config command is one of the
  directories in the PATH environment variable.

  If you did not expect this build to link to a pre-installed system library,
  then check documentation of the ffmpeg-sys-next crate for an option to
  build the library from source, or disable features or dependencies
  that require pkg-config.', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ffmpeg-sys-next-5.0.1/build.rs:711:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The issue is that pkg-config has not existed in BSD for supposedly 10 years. The work around is here:
https://forums.freebsd.org/threads/port-pkg-config-deleted-no-alternative.65273/

I'm not sure if this can be dealt with by the crate, but it would be nice if it could.

@jaw-sh
Copy link
Author

jaw-sh commented May 25, 2022

After posting this, the compilation halted much later.

error[E0432]: unresolved imports `libc::ENODATA`, `libc::ENOSR`, `libc::ENOSTR`, `libc::ETIME`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ffmpeg-next-5.0.3/src/util/error.rs:20:22
   |
20 |     ENFILE, ENOBUFS, ENODATA, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG,
   |                      ^^^^^^^ no `ENODATA` in the root
21 |     ENOPROTOOPT, ENOSPC, ENOSR, ENOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE,
   |                          ^^^^^  ^^^^^^ no `ENOSTR` in the root
   |                          |
   |                          no `ENOSR` in the root
22 |     ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EOWNERDEAD, EPERM, EPIPE, EPROTO,
23 |     EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, ETIME, ETIMEDOUT, ETXTBSY,
   |                                                                ^^^^^ no `ETIME` in the root
   |
help: a similar name exists in the module
   |
21 |     ENOPROTOOPT, ENOSPC, ENOSR, NOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE,
   |                                 ~~~~~
help: a similar name exists in the module
   |
23 |     EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, VTIME, ETIMEDOUT, ETXTBSY,
   |                                                                ~~~~~

For more information about this error, try `rustc --explain E0432`.
error: could not compile `ffmpeg-next` due to previous error

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

1 participant