-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
build(linux): Add support for openSUSE Tumbleweed #3676
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -152,6 +152,34 @@ function add_ubuntu_deps() { | |||||||||||||
) | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
function add_opensuse_deps() { | ||||||||||||||
dependencies+=( | ||||||||||||||
"git" | ||||||||||||||
"gcc-c++" | ||||||||||||||
"libappindicator3-devel" | ||||||||||||||
"libcap-devel" | ||||||||||||||
"libcurl-devel" | ||||||||||||||
"libdrm-devel" | ||||||||||||||
"libevdev-devel" | ||||||||||||||
"libminiupnpc-devel" | ||||||||||||||
"libnotify-devel" | ||||||||||||||
"libnuma-devel" | ||||||||||||||
"libopenssl-devel" | ||||||||||||||
"libopus-devel" | ||||||||||||||
"libpulse-devel" | ||||||||||||||
"ninja" | ||||||||||||||
"nodejs" | ||||||||||||||
"rpm-build" | ||||||||||||||
"udev" | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
if [ "$skip_libva" == 0 ]; then | ||||||||||||||
dependencies+=( | ||||||||||||||
"libva-devel" # VA-API | ||||||||||||||
) | ||||||||||||||
fi | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
function add_fedora_deps() { | ||||||||||||||
dependencies+=( | ||||||||||||||
"cmake" | ||||||||||||||
|
@@ -248,6 +276,9 @@ function check_version() { | |||||||||||||
installed_version=$(dpkg -s "$package_name" 2>/dev/null | grep '^Version:' | awk '{print $2}') | ||||||||||||||
elif [ "$distro" == "fedora" ]; then | ||||||||||||||
installed_version=$(rpm -q --queryformat '%{VERSION}' "$package_name" 2>/dev/null) | ||||||||||||||
elif [ "$distro" == "opensuse" ]; then | ||||||||||||||
# avoid using system packages on openSUSE - boost and doxygen versions cause errors | ||||||||||||||
return 1 | ||||||||||||||
Comment on lines
+279
to
+281
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of the code is just supposed to check what the installed version is. |
||||||||||||||
else | ||||||||||||||
echo "Unsupported Distro" | ||||||||||||||
return 1 | ||||||||||||||
|
@@ -283,6 +314,8 @@ function run_install() { | |||||||||||||
"-DSUNSHINE_ENABLE_DRM=ON" | ||||||||||||||
) | ||||||||||||||
|
||||||||||||||
cmake_args+=("-DSUNSHINE_BUILD_DISTRO='${distro}'") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how I feel about this cmake arg yet, but it should be in the array above. It doesn't need to use the |
||||||||||||||
|
||||||||||||||
if [ "$appimage_build" == 1 ]; then | ||||||||||||||
cmake_args+=("-DSUNSHINE_BUILD_APPIMAGE=ON") | ||||||||||||||
fi | ||||||||||||||
|
@@ -308,6 +341,8 @@ function run_install() { | |||||||||||||
elif [ "$distro" == "fedora" ]; then | ||||||||||||||
add_fedora_deps | ||||||||||||||
${sudo_cmd} dnf group install "Development Tools" -y | ||||||||||||||
elif [ "$distro" == "opensuse" ]; then | ||||||||||||||
add_opensuse_deps | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
# Install the dependencies | ||||||||||||||
|
@@ -395,6 +430,8 @@ function run_install() { | |||||||||||||
install_cuda | ||||||||||||||
cmake_args+=("-DSUNSHINE_ENABLE_CUDA=ON") | ||||||||||||||
cmake_args+=("-DCMAKE_CUDA_COMPILER:PATH=${build_dir}/cuda/bin/nvcc") | ||||||||||||||
else | ||||||||||||||
cmake_args+=("-DSUNSHINE_ENABLE_CUDA=OFF") | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
# Cmake stuff here | ||||||||||||||
|
@@ -408,7 +445,7 @@ function run_install() { | |||||||||||||
if [ "$skip_package" == 0 ]; then | ||||||||||||||
if [ "$distro" == "debian" ] || [ "$distro" == "ubuntu" ]; then | ||||||||||||||
cpack -G DEB --config ./build/CPackConfig.cmake | ||||||||||||||
elif [ "$distro" == "fedora" ]; then | ||||||||||||||
elif [ "$distro" == "fedora" ] || [ "$distro" == "opensuse" ]; then | ||||||||||||||
cpack -G RPM --config ./build/CPackConfig.cmake | ||||||||||||||
fi | ||||||||||||||
fi | ||||||||||||||
|
@@ -479,6 +516,11 @@ elif grep -q "Ubuntu 24.04" /etc/os-release; then | |||||||||||||
cuda_build="520.61.05" | ||||||||||||||
gcc_version="11" | ||||||||||||||
nvm_node=0 | ||||||||||||||
elif grep -q "opensuse-tumbleweed" /etc/os-release; then | ||||||||||||||
distro="opensuse" | ||||||||||||||
version="tumbleweed" | ||||||||||||||
package_update_command="${sudo_cmd} zypper dup" | ||||||||||||||
package_install_command="${sudo_cmd} zypper in -y" | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
It appears cuda should work just fine on opensuse. https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=OpenSUSE&target_version=15&target_type=runfile_local Although, it depends on the version of gcc you can get. If gcc is too new you can set the cuda_version and cuda_build to empty like the fedora 40 one. Also please set the gcc_version to whatever version is available. I know it's not used in the script for non debian distros, but it serves as a reference for us. |
||||||||||||||
else | ||||||||||||||
echo "Unsupported Distro or Version" | ||||||||||||||
exit 1 | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a comment about why this behavior is needed?