-
Notifications
You must be signed in to change notification settings - Fork 156
Description
Hey guys, I've been waiting to try out hardware decoding that was introduced in #698 . I was previously on version 0.3.10 which was working fine. After upgrading to 0.3.13, my program is not able to compile. It fails while compiling webrtc-sys. I get a bunch of warnings followed by the error
Error logs
warning: webrtc-sys@0.3.10: from /usr/include/c++/15/x86_64-redhat-linux/bits/c++config.h:2641,
warning: webrtc-sys@0.3.10: from /usr/include/c++/15/bits/requires_hosted.h:31,
warning: webrtc-sys@0.3.10: from /usr/include/c++/15/vector:62,
warning: webrtc-sys@0.3.10: from src/nvidia/nvidia_encoder_factory.h:6,
warning: webrtc-sys@0.3.10: from src/nvidia/nvidia_encoder_factory.cpp:1:
warning: webrtc-sys@0.3.10: /usr/include/features.h:435:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
warning: webrtc-sys@0.3.10: 435 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
warning: webrtc-sys@0.3.10: | ^~~~~~~
warning: webrtc-sys@0.3.10: In file included from src/nvidia/nvidia_encoder_factory.h:11:
warning: webrtc-sys@0.3.10: src/nvidia/cuda_context.h:4:10: fatal error: cuda.h: No such file or directory
warning: webrtc-sys@0.3.10: 4 | #include <cuda.h>
warning: webrtc-sys@0.3.10: | ^~~~~~~~
warning: webrtc-sys@0.3.10: compilation terminated.
warning: webrtc-sys@0.3.10: ToolExecError: command did not execute successfully (status code exit status: 1): LC_ALL="C" "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/crate" "-I" "./include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/abseil-cpp/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/libyuv/include/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/libc++/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/sdk/objc" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/sdk/objc/base" "-I/usr/local/cuda/include" "-Isrc/nvidia/NvCodec/include" "-Isrc/nvidia/NvCodec/NvCodec" "-Wno-deprecated-declarations" "-std=c++2a" "-DWEBRTC_APM_DEBUG_DUMP=0" "-DUSE_UDEV" "-DUSE_AURA=1" "-DUSE_GLIB=1" "-DUSE_OZONE=1" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D_FORTIFY_SOURCE=2" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-D_LARGEFILE64_SOURCE" "-D_GNU_SOURCE" "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" "-D_GLIBCXX_ASSERTIONS=1" "-DCR_SYSROOT_KEY=20230611T210420Z-2" "-DNDEBUG" "-DNVALGRIND" "-DDYNAMIC_ANNOTATIONS_ENABLED=0" "-DWEBRTC_ENABLE_PROTOBUF=0" "-DWEBRTC_STRICT_FIELD_TRIALS=0" "-DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" "-DRTC_USE_LIBAOM_AV1_ENCODER" "-DRTC_ENABLE_VP9" "-DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY" "-DWEBRTC_HAVE_SCTP" "-DWEBRTC_USE_H264" "-DWEBRTC_ENABLE_LIBEVENT" "-DWEBRTC_LIBRARY_IMPL" "-DWEBRTC_ENABLE_AVX2" "-DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0" "-DWEBRTC_POSIX" "-DWEBRTC_LINUX" "-DABSL_ALLOCATOR_NOTHROW=1" "-DLIBYUV_DISABLE_NEON" "-DLIBYUV_DISABLE_LSX" "-DLIBYUV_DISABLE_LASX" "-DLIVEKIT_TEST" "-o" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/2ee355bf7ce3640b-nvidia_encoder_factory.o" "-c" "src/nvidia/nvidia_encoder_factory.cpp"cargo:warning=In file included from src/nvidia/cuda_context.cpp:1:
warning: webrtc-sys@0.3.10: src/nvidia/cuda_context.h:4:10: fatal error: cuda.h: No such file or directory
warning: webrtc-sys@0.3.10: 4 | #include <cuda.h>
warning: webrtc-sys@0.3.10: | ^~~~~~~~
warning: webrtc-sys@0.3.10: compilation terminated.
warning: webrtc-sys@0.3.10: ToolExecError: command did not execute successfully (status code exit status: 1): LC_ALL="C" "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/crate" "-I" "./include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/abseil-cpp/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/libyuv/include/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/third_party/libc++/" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/sdk/objc" "-I" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/sdk/objc/base" "-I/usr/local/cuda/include" "-Isrc/nvidia/NvCodec/include" "-Isrc/nvidia/NvCodec/NvCodec" "-Wno-deprecated-declarations" "-std=c++2a" "-DWEBRTC_APM_DEBUG_DUMP=0" "-DUSE_UDEV" "-DUSE_AURA=1" "-DUSE_GLIB=1" "-DUSE_OZONE=1" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D_FORTIFY_SOURCE=2" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-D_LARGEFILE64_SOURCE" "-D_GNU_SOURCE" "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" "-D_GLIBCXX_ASSERTIONS=1" "-DCR_SYSROOT_KEY=20230611T210420Z-2" "-DNDEBUG" "-DNVALGRIND" "-DDYNAMIC_ANNOTATIONS_ENABLED=0" "-DWEBRTC_ENABLE_PROTOBUF=0" "-DWEBRTC_STRICT_FIELD_TRIALS=0" "-DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" "-DRTC_USE_LIBAOM_AV1_ENCODER" "-DRTC_ENABLE_VP9" "-DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY" "-DWEBRTC_HAVE_SCTP" "-DWEBRTC_USE_H264" "-DWEBRTC_ENABLE_LIBEVENT" "-DWEBRTC_LIBRARY_IMPL" "-DWEBRTC_ENABLE_AVX2" "-DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0" "-DWEBRTC_POSIX" "-DWEBRTC_LINUX" "-DABSL_ALLOCATOR_NOTHROW=1" "-DLIBYUV_DISABLE_NEON" "-DLIBYUV_DISABLE_LSX" "-DLIBYUV_DISABLE_LASX" "-DLIVEKIT_TEST" "-o" "/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/2ee355bf7ce3640b-cuda_context.o" "-c" "src/nvidia/cuda_context.cpp"cargo:warning=In file included from /usr/include/dlfcn.h:22,
warning: webrtc-sys@0.3.10: from src/nvidia/implib/libcuda.so.init.c:20:
warning: webrtc-sys@0.3.10: /usr/include/features.h:435:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
warning: webrtc-sys@0.3.10: 435 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
warning: webrtc-sys@0.3.10: | ^~~~~~~
warning: webrtc-sys@0.3.10: In file included from /usr/include/dlfcn.h:22,
warning: webrtc-sys@0.3.10: from src/nvidia/implib/libnvcuvid.so.init.c:20:
warning: webrtc-sys@0.3.10: /usr/include/features.h:435:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
warning: webrtc-sys@0.3.10: 435 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
warning: webrtc-sys@0.3.10: | ^~~~~~~
warning: webrtc-sys@0.3.10: In file included from /usr/include/bits/libc-header-start.h:33,
warning: webrtc-sys@0.3.10: from /usr/include/stdint.h:26,
warning: webrtc-sys@0.3.10: from /usr/lib/gcc/x86_64-redhat-linux/15/include/stdint.h:11,
warning: webrtc-sys@0.3.10: from src/nvidia/NvCodec/NvCodec/NvEncoder/NvEncoder.h:14,
warning: webrtc-sys@0.3.10: from src/nvidia/NvCodec/NvCodec/NvEncoder/NvEncoder.cpp:12:
warning: webrtc-sys@0.3.10: /usr/include/features.h:435:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
warning: webrtc-sys@0.3.10: 435 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
warning: webrtc-sys@0.3.10: | ^~~~~~~
error: failed to run custom build command for `webrtc-sys v0.3.10`
Caused by:
process didn't exit successfully: `/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-c75af5ecd190140c/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=LK_DEBUG_WEBRTC
cargo:rerun-if-env-changed=LK_CUSTOM_WEBRTC
cargo:CXXBRIDGE_PREFIX=webrtc-sys
cargo:CXXBRIDGE_DIR0=/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/include
cargo:CXXBRIDGE_DIR1=/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/crate
cargo:rustc-link-search=native=/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/lib
cargo:rustc-link-lib=static=webrtc
cargo:rustc-link-lib=dylib=rt
cargo:rustc-link-lib=dylib=dl
cargo:rustc-link-lib=dylib=pthread
cargo:rustc-link-lib=dylib=m
OUT_DIR = Some(/home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out)
OPT_LEVEL = Some(0)
TARGET = Some(x86_64-unknown-linux-gnu)
HOST = Some(x86_64-unknown-linux-gnu)
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
CXX_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
CXX_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(true)
CARGO_CFG_TARGET_FEATURE = Some(fxsr,sse,sse2)
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
CXXFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
CXXFLAGS_x86_64-unknown-linux-gnu = None
CARGO_ENCODED_RUSTFLAGS = Some()
cargo:warning=In file included from /usr/include/c++/15/x86_64-redhat-linux/bits/os_defines.h:39,
cargo:warning= from /usr/include/c++/15/x86_64-redhat-linux/bits/c++config.h:2641,
cargo:warning= from /usr/include/c++/15/bits/requires_hosted.h:31,
cargo:warning= from /usr/include/c++/15/string:40,
cargo:warning= from /home/vr7bd/rxsample/sample/src-tauri/target/debug/build/scratch-5eb8b14d669c2179/out/livekit_webrtc/livekit/linux-x64-release-webrtc-ed96590/linux-x64-release/include/api/rtc_error.h:17,
cargo:warning= from ./include/livekit/rtc_error.h:19,
cargo:warning= from /home/vr7bd/rxsample/sample/src-tauri/target/debug/build/webrtc-sys-93930abbb8ec2cda/out/cxxbridge/sources/webrtc-sys/src/peer_connection.rs.cc:1:
My system doesn't have an NVIDIA GPU. I have installed the required packages on my system: libva, libva-devel, libdrm and libdrm-devel.
System details
Hardware model: N95
Processor: Intel(R) N95
OS: Fedora Linux 42 (Workstation Edition)
Rust: 1.88 (2024 Edition)
I also tried cloning the repo and commenting out the section where NVIDIA files are linked
builder
.flag("-I/usr/local/cuda/include")
.flag("-Isrc/nvidia/NvCodec/include")
.flag("-Isrc/nvidia/NvCodec/NvCodec")
.file("src/nvidia/NvCodec/NvCodec/NvDecoder/NvDecoder.cpp")
.file("src/nvidia/NvCodec/NvCodec/NvEncoder/NvEncoder.cpp")
.file("src/nvidia/NvCodec/NvCodec/NvEncoder/NvEncoderCuda.cpp")
.file("src/nvidia/h264_encoder_impl.cpp")
.file("src/nvidia/h264_decoder_impl.cpp")
.file("src/nvidia/nvidia_decoder_factory.cpp")
.file("src/nvidia/nvidia_encoder_factory.cpp")
.file("src/nvidia/cuda_context.cpp")
.file("src/nvidia/implib/libcuda.so.init.c")
.file("src/nvidia/implib/libcuda.so.tramp.S")
.file("src/nvidia/implib/libnvcuvid.so.init.c")
.file("src/nvidia/implib/libnvcuvid.so.tramp.S")
.flag("-Wno-deprecated-declarations");But that too i failing.
Any idea what's wrong?