alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.52k stars 488 forks source link

I cannot compile Alvr or Alvr-git #1486

Closed wereretot closed 1 year ago

wereretot commented 1 year ago

Description

The compiler will always throw "./configure --prefix=/home/rexommendation/.cache/yay/alvr/src/alvr/deps/linux/ffmpeg/alvr_build --enable-gpl --enable-version3 --enable-static --enable-shared --disable-programs --disable-doc --disable-avdevice --disable-avformat --disable-swresample --disable-postproc --disable-network --enable-lto --disable-everything --enable-encoder=h264_vaapi --enable-encoder=hevc_vaapi --enable-encoder=libx264 --enable-encoder=libx264rgb --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-filter=scale --enable-filter=scale_vaapi --enable-libx264 --enable-vulkan --enable-libdrm --enable-pic --enable-rpath ERROR: libdrm not found using pkg-config

If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. thread 'main' panicked at 'called Result::unwrap() on an Err value: command exited with non-zero code ./configure --prefix=/home/rexommendation/.cache/yay/alvr/src/alvr/deps/linux/ffmpeg/alvr_build --enable-gpl --enable-version3 --enable-static --enable-shared --disable-programs --disable-doc --disable-avdevice --disable-avformat --disable-swresample --disable-postproc --disable-network --enable-lto --disable-everything --enable-encoder=h264_vaapi --enable-encoder=hevc_vaapi --enable-encoder=libx264 --enable-encoder=libx264rgb --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-filter=scale --enable-filter=scale_vaapi --enable-libx264 --enable-vulkan --enable-libdrm --enable-pic --enable-rpath: 1', alvr/xtask/src/dependencies.rs:205:14 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace ==> ERROR: A failure occurred in build(). Aborting... -> error making: alvr " After compiling every other thing fine.

General Troubleshooting

Environment

Hardware

Note: for Linux, an upload to the hw-probe database is preferred: hw-probe -all -upload

CPU: AMD Ryzen 5 2600 Six-Core Processor

GPU: XFX AMD Radeon™ RX 5500 XT 8GB GDDR6 THICC II Pro

Audio: Pipewire

Installation

ALVR Version: alvr-19.1.0.r0.g969899c7-1

SteamVR Version: Not Applicable.

Install Type:

OS Name and Version (winver on Windows or grep PRETTY_NAME /etc/os-release on most Linux distributions): Manjaro Linux

galister commented 1 year ago

ERROR: libdrm not found using pkg-config

Do you have libdrm installed?

sudo pacman -S libdrm

wereretot commented 1 year ago

@galister Yes, it still errors ./configure --prefix=/home/rexommendation/.cache/yay/alvr/src/alvr/deps/linux/ffmpeg/alvr_build --enable-gpl --enable-version3 --enable-static --enable-shared --disable-programs --disable-doc --disable-avdevice --disable-avformat --disable-swresample --disable-postproc --disable-network --enable-lto --disable-everything --enable-encoder=h264_vaapi --enable-encoder=hevc_vaapi --enable-encoder=libx264 --enable-encoder=libx264rgb --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-filter=scale --enable-filter=scale_vaapi --enable-libx264 --enable-vulkan --enable-libdrm --enable-pic --enable-rpath ERROR: libdrm not found using pkg-config

ultrablazed commented 1 year ago

Having the same issue when trying to build on my steamdeck I do have libdrm installed

Mithras commented 1 year ago

For me it's when trying to build alvr-git:

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-Wl,--version-script=/tmp/rustcNtLmni/list" "-m64" "/tmp/rustcNtLmni/symbols.o" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/deps/alvr_server.alvr_server.c0fe0894-cgu.15.rcgu.o" "-Wl,--as-needed" "-L" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/deps" "-L" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/alvr_server-36f65f31bf7fe16e/out" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/alvr/server/cpp/openvr/lib" "-L" "/usr/lib" "-L" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/tinyfiledialogs-c89499688b9f36eb/out" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/home/mithras/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-lbindings" "-Wl,-Bdynamic" "-lstdc++" "-lavutil" "-lavfilter" "-lavcodec" "-lopenvr_api" "-lvulkan" "-Wl,-Bstatic" "/tmp/rustcNtLmni/libtinyfiledialogs-0f64d5819b6bc52a.rlib" "/home/mithras/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-7f2d6606c0ceff89.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lfreetype" "-lfontconfig" "-lfreetype" "-lexpat" "-lfreetype" "-ldl" "-ljack" "-ldl" "-lasound" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/mithras/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/deps/libalvr_server.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs" "-Wl,--no-undefined"
  = note: /usr/bin/ld: /home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/alvr_server-36f65f31bf7fe16e/out/libbindings.a(EncodePipelineSW.o): in function `alvr::EncodePipelineSW::~EncodePipelineSW()':
          EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWD2Ev+0x33): undefined reference to `x264_encoder_close'
          /usr/bin/ld: /home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/alvr_server-36f65f31bf7fe16e/out/libbindings.a(EncodePipelineSW.o): in function `alvr::EncodePipelineSW::PushFrame(unsigned long, bool)':
          EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSW9PushFrameEmb+0x96): undefined reference to `x264_encoder_encode'
          /usr/bin/ld: /home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/alvr_server-36f65f31bf7fe16e/out/libbindings.a(EncodePipelineSW.o): in function `alvr::EncodePipelineSW::SetParams(FfiDynamicEncoderParams)':
          EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSW9SetParamsE23FfiDynamicEncoderParams+0xc2): undefined reference to `x264_encoder_reconfig'
          /usr/bin/ld: /home/mithras/.cache/paru/clone/alvr-git/src/alvr/target/release/build/alvr_server-36f65f31bf7fe16e/out/libbindings.a(EncodePipelineSW.o): in function `alvr::EncodePipelineSW::EncodePipelineSW(Renderer*, unsigned int, unsigned int)':
          EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWC2EP8Rendererjj+0xbc): undefined reference to `x264_param_default_preset'
          /usr/bin/ld: EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWC2EP8Rendererjj+0xcc): undefined reference to `x264_param_apply_profile'
          /usr/bin/ld: EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWC2EP8Rendererjj+0x183): undefined reference to `x264_encoder_open_164'
          /usr/bin/ld: EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWC2EP8Rendererjj+0x19d): undefined reference to `x264_picture_init'
          /usr/bin/ld: EncodePipelineSW.cpp:(.text._ZN4alvr16EncodePipelineSWC2EP8Rendererjj+0x1b8): undefined reference to `x264_picture_init'
          collect2: error: ld returned 1 exit status

  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

warning: `alvr_server` (lib) generated 3 warnings
error: could not compile `alvr_server` due to previous error; 3 warnings emitted
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'alvr-git-r2361.1845b3ba-1': 
error: packages failed to build: alvr-git-r2361.1845b3ba-1

alvr builds just fine.

zmerp commented 1 year ago

@Mithras i think this is caused by the last merged change. You need to install x264

Mithras commented 1 year ago

There is also this on AUR alvr-git: image

wereretot commented 1 year ago

There is also this on AUR alvr-git: image

I tried this but I get this: thread 'main' panicked at 'called Result::unwrap() on an Err value: "pkg-config" "--libs" "--cflags" "cuda" did not exit successfully: exit status: 1 error: could not find system library 'cuda' required by the 'alvr_xtask' crate

--- stderr Package cuda was not found in the pkg-config search path. Perhaps you should add the directory containing cuda.pc' to the PKG_CONFIG_PATH environment variable Package 'cuda', required by 'virtual:world', not found ', alvr/xtask/src/dependencies.rs:167:64 note: run withRUST_BACKTRACE=1` environment variable to display a backtrace

wereretot commented 1 year ago

ALVR now compiles

Mithras commented 1 year ago

alvr-git doesn't