alvr-org / ALVR

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

Unable to find nvcc under Fedora 37 #1603

Closed FuzzyWuggzy closed 1 year ago

FuzzyWuggzy commented 1 year ago

I've been trying to compile ALVR under

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

So I tried:

PKG_CONFIG_PATH=~/ALVR/packaging/deb/ cargo xtask prepare-deps --platform linux

(I know it's for Debian, but cuda.pc doesn't exist on my system and no package provides it)

This changed the error to:

ERROR: failed checking for nvcc.

If I had to guess it's looking for nvcc in /usr/local/cuda whereas it resides in /opt/cuda under Fedora, but I've tried pointing it to there and the error doesn't change.

Output of nvcc --version:

nvcc: NVIDIA (R) Cuda compiler drive Copyright (c) 2005-2022 NVIDIA Corporation Built on Mon_Oct_24_19:12:58_PDT_2022 Cuda compilation tools, release 12.0, V12.0.76 Build cuda_12.0.r12.0/compiler.31968024_0

I've tried installing nv-codec-headers from source and the fedora repo, no dice.

Do I have to remove the packaged version of ffmpeg then compile it from source with nvcc support? The build instructions don't mention it and I'd have to remove a lot of dependencies and give up on automated updates to do so.

My GPU is a GTX 1060 mobile, driver version 525.105.17

Thank you

galister commented 1 year ago

If I had to guess it's looking for nvcc in /usr/local/cuda whereas it resides in /opt/cuda under Fedora

Packages come with the aforementioned .pc for this very reason; so that the required files can be located regardless of where they reside on any given distro.

The PC files go into well-known folders and if the PC file is not present or not installed correctly, that should be reported to the maintainers of the cuda fedora package.

FuzzyWuggzy commented 1 year ago

I'm sure it's already been reported to the package maintainers as it's a long running issue, one that was brought up in this pull request:

https://github.com/alvr-org/ALVR/pull/906/files#

It seems like it used to compile under Fedora with cuda.pc in /packaging/rpm and a symbolic link from /opt/cuda to /usr/local/cuda, both things I have but it still won't compile.

I also didn't realise that there were nightly Linux builds, the head and controller tracking works but there's no video stream and ALVR Server returns error in encoder thread: Failed to initialize vulkan frame context: invalid argument, that's another issue entirely and I don't see an option for nvenc so I guess these are built without it, hence why I want to compile from source.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.