LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
15.41k stars 743 forks source link

Sunshine build fails from AUR on upnp.cpp.o #2775

Closed pfych closed 1 day ago

pfych commented 3 days ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the latest beta/pre-release?

None

Describe the Bug

The build fails when attempting to build upnp.cpp.o

==> Making package: sunshine 0.23.1-1 (Sun 30 Jun 2024 14:22:57)
==> Retrieving sources...
  -> Cloning sunshine git repo...
Cloning into bare repository '/home/pfych/.cache/yay/sunshine/sunshine'...
remote: Enumerating objects: 32744, done.
remote: Counting objects: 100% (233/233), done.
remote: Compressing objects: 100% (164/164), done.
remote: Total 32744 (delta 116), reused 114 (delta 67), pack-reused 32511
Receiving objects: 100% (32744/32744), 38.46 MiB | 12.85 MiB/s, done.
Resolving deltas: 100% (22120/22120), done.
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    sunshine ... Skipped
:: (1/1) Parsing SRCINFO: sunshine
==> Making package: sunshine 0.23.1-1 (Sun 30 Jun 2024 14:23:02)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating sunshine git repo...
==> Validating source files with sha256sums...
    sunshine ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of sunshine git repo...
Cloning into 'sunshine'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
Submodule 'packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp' (https://github.com/flathub/org.flatpak.Builder.BaseApp) registered for path 'packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp'
Submodule 'packaging/linux/flatpak/deps/shared-modules' (https://github.com/flathub/shared-modules) registered for path 'packaging/linux/flatpak/deps/shared-modules'
Submodule 'third-party/Simple-Web-Server' (https://gitlab.com/eidheim/Simple-Web-Server.git) registered for path 'third-party/Simple-Web-Server'
Submodule 'third-party/TPCircularBuffer' (https://github.com/michaeltyson/TPCircularBuffer) registered for path 'third-party/TPCircularBuffer'
Submodule 'third-party/ViGEmClient' (https://github.com/LizardByte/Virtual-Gamepad-Emulation-Client.git) registered for path 'third-party/ViGEmClient'
Submodule 'third-party/build-deps' (https://github.com/LizardByte/build-deps.git) registered for path 'third-party/build-deps'
Submodule 'third-party/googletest' (https://github.com/google/googletest/) registered for path 'third-party/googletest'
Submodule 'third-party/moonlight-common-c' (https://github.com/moonlight-stream/moonlight-common-c.git) registered for path 'third-party/moonlight-common-c'
Submodule 'third-party/nanors' (https://github.com/sleepybishop/nanors.git) registered for path 'third-party/nanors'
Submodule 'third-party/nv-codec-headers' (https://github.com/FFmpeg/nv-codec-headers) registered for path 'third-party/nv-codec-headers'
Submodule 'third-party/nvapi-open-source-sdk' (https://github.com/LizardByte/nvapi-open-source-sdk) registered for path 'third-party/nvapi-open-source-sdk'
Submodule 'third-party/tray' (https://github.com/LizardByte/tray) registered for path 'third-party/tray'
Submodule 'third-party/wayland-protocols' (https://gitlab.freedesktop.org/wayland/wayland-protocols) registered for path 'third-party/wayland-protocols'
Submodule 'third-party/wlr-protocols' (https://gitlab.freedesktop.org/wlroots/wlr-protocols) registered for path 'third-party/wlr-protocols'
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/packaging/linux/flatpak/deps/shared-modules'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/Simple-Web-Server'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/TPCircularBuffer'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/ViGEmClient'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/build-deps'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/googletest'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/moonlight-common-c'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/nanors'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/nv-codec-headers'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/nvapi-open-source-sdk'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/tray'...
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wayland-protocols'...
warning: redirecting to https://gitlab.freedesktop.org/wayland/wayland-protocols.git/
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wlr-protocols'...
warning: redirecting to https://gitlab.freedesktop.org/wlroots/wlr-protocols.git/
Submodule path 'packaging/linux/flatpak/deps/org.flatpak.Builder.BaseApp': checked out '5532d4354e05ccfc3421e670fcb4e7fa5512ab39'
Submodule path 'packaging/linux/flatpak/deps/shared-modules': checked out 'ec91811777c655b6a3091d60f1eadd79e0fbc957'
Submodule path 'third-party/Simple-Web-Server': checked out '27b41f5ee154cca0fce4fe2955dd886d04e3a4ed'
Submodule path 'third-party/TPCircularBuffer': checked out '8833b3a73fab6530cc51e2063a85cced01714cfb'
Submodule path 'third-party/ViGEmClient': checked out '8d71f6740ffff4671cdadbca255ce528e3cd3fef'
Submodule path 'third-party/build-deps': checked out 'efd3a380113e8ae98ae68cc1d73fd7c4b54b03c6'
Submodule path 'third-party/googletest': checked out 'f8d7d77c06936315286eb55f8de22cd23c188571'
Submodule path 'third-party/moonlight-common-c': checked out 'cbd0ec1b25edfb8ee8645fffa49ff95b6e04c70e'
Submodule 'enet' (https://github.com/cgutman/enet.git) registered for path 'third-party/moonlight-common-c/enet'
Cloning into '/home/pfych/.cache/yay/sunshine/src/sunshine/third-party/moonlight-common-c/enet'...
Submodule path 'third-party/moonlight-common-c/enet': checked out '04e27590670a87a7cd40f5a05cda97467e4e25a3'
Submodule path 'third-party/nanors': checked out 'e9e242e98e27037830490b2a752895ca68f75f8b'
Submodule path 'third-party/nv-codec-headers': checked out '22441b505d9d9afc1e3002290820909846c24bdc'
Submodule path 'third-party/nvapi-open-source-sdk': checked out 'c0f5f7b64d2ef13b1155f078a2eec156611f2415'
Submodule path 'third-party/tray': checked out '4d8b798cafdd11285af9409c16b5f792968e0045'
Submodule path 'third-party/wayland-protocols': checked out '08d1c7276d41379acfea353b5c739b72d51827e2'
Submodule path 'third-party/wlr-protocols': checked out '2b8d43325b7012cc3f9b55c08d26e50e42beac7d'
==> Sources are ready.
==> Making package: sunshine 0.23.1-1 (Sun 30 Jun 2024 14:23:46)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
-- The C compiler identification is GNU 14.1.1
-- The CXX compiler identification is GNU 14.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
Got from CI master branch and version 0.23.1
-- Looking for fcntl
-- Looking for fcntl - found
-- Looking for ioctl
-- Looking for ioctl - found
-- Looking for poll
-- Looking for poll - found
-- Looking for getaddrinfo
-- Looking for getaddrinfo - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for gethostbyname_r
-- Looking for gethostbyname_r - found
-- Looking for gethostbyaddr_r
-- Looking for gethostbyaddr_r - found
-- Looking for inet_pton
-- Looking for inet_pton - found
-- Looking for inet_ntop
-- Looking for inet_ntop - found
-- Performing Test HAS_MSGHDR_FLAGS
-- Performing Test HAS_MSGHDR_FLAGS - Success
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Check size of QOS_FLOWID
-- Check size of QOS_FLOWID - failed
-- Check size of PQOS_FLOWID
-- Check size of PQOS_FLOWID - failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Boost: /usr/lib/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.53.0") found components: system
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.3.1")
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.1.1")
-- Checking for module 'libcurl'
--   Found libcurl, version 8.8.0
-- Checking for module 'miniupnpc'
--   Found miniupnpc, version 2.2.8
-- Found Boost: /usr/lib/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: locale log filesystem program_options
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- Checking for module 'libdrm'
--   Found libdrm, version 2.4.122
-- Found LIBDRM: /usr/lib/libdrm.so
-- Checking for module 'libcap'
--   Found libcap, version 2.70
-- Found LIBCAP: /usr/lib/libcap.so
-- Checking for module 'libevdev'
--   Found libevdev, version 1.13.2
-- Checking for module 'libva'
--   Found libva, version 1.21.0
-- Checking for module 'libva-drm'
--   Found libva-drm, version 1.21.0
-- Found Libva: /usr/include
-- Found Wayland: /usr/lib/libwayland-client.so;/usr/lib/libwayland-server.so;/usr/lib/libwayland-egl.so;/usr/lib/libwayland-cursor.so
wayland-scanner private-code /home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml /home/pfych/.cache/yay/sunshine/src/build/generated-src/xdg-output-unstable-v1.c
wayland-scanner client-header /home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wayland-protocols/unstable/xdg-output/xdg-output-unstable-v1.xml /home/pfych/.cache/yay/sunshine/src/build/generated-src/xdg-output-unstable-v1.h
wayland-scanner private-code /home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wlr-protocols/unstable/wlr-export-dmabuf-unstable-v1.xml /home/pfych/.cache/yay/sunshine/src/build/generated-src/wlr-export-dmabuf-unstable-v1.c
wayland-scanner client-header /home/pfych/.cache/yay/sunshine/src/sunshine/third-party/wlr-protocols/unstable/wlr-export-dmabuf-unstable-v1.xml /home/pfych/.cache/yay/sunshine/src/build/generated-src/wlr-export-dmabuf-unstable-v1.h
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Checking for module 'ayatana-appindicator3-0.1'
--   Found ayatana-appindicator3-0.1, version 0.5.93
-- Checking for module 'libnotify'
--   Found libnotify, version 0.8.3
-- Found Python3: /usr/bin/python3.12 (found version "3.12.4") found components: Interpreter
-- Could NOT find Python (missing: Python_EXECUTABLE Interpreter) (Required is exact version "3.11")
    Reason given by package: 
        Interpreter: Wrong version for the interpreter "/sbin/python"

-- Found Python: /usr/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.9") found components: Interpreter
-- Python found, tests dependent on Python will be enabled
-- Checking for module 'systemd'
--   Found systemd, version 256
-- Checking for module 'udev'
--   Found udev, version 256
-- Configuring done (3.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/pfych/.cache/yay/sunshine/src/build
make: Entering directory '/home/pfych/.cache/yay/sunshine/src/build'
[  0%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/callbacks.c.o
[  1%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/compress.c.o
[  2%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/host.c.o
[  3%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/list.c.o
[  4%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/packet.c.o
[  5%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/peer.c.o
[  6%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/protocol.c.o
[  7%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/unix.c.o
[  8%] Building C object third-party/moonlight-common-c/enet/CMakeFiles/enet.dir/win32.c.o
[  9%] Linking C static library libenet.a
[  9%] Built target enet
[ 10%] Building C object CMakeFiles/sunshine.dir/third-party/nanors/rs.c.o
[ 11%] Building C object CMakeFiles/sunshine.dir/third-party/moonlight-common-c/src/RtspParser.c.o
[ 12%] Building CXX object CMakeFiles/sunshine.dir/src/upnp.cpp.o
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp: In member function ‘bool upnp::deinit_t::create_ipv6_pinholes()’:
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp:112:37: error: too few arguments to function ‘int UPNP_GetValidIGD(UPNPDev*, UPNPUrls*, IGDdatas*, char*, int, char*, int)’
  112 |       auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
      |                     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp:5:
/usr/include/miniupnpc/miniupnpc.h:122:1: note: declared here
  122 | UPNP_GetValidIGD(struct UPNPDev * devlist,
      | ^~~~~~~~~~~~~~~~
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp: In member function ‘void upnp::deinit_t::upnp_thread_proc()’:
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp:334:39: error: too few arguments to function ‘int UPNP_GetValidIGD(UPNPDev*, UPNPUrls*, IGDdatas*, char*, int, char*, int)’
  334 |         auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
      |                       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/miniupnpc/miniupnpc.h:122:1: note: declared here
  122 | UPNP_GetValidIGD(struct UPNPDev * devlist,
      | ^~~~~~~~~~~~~~~~
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp: At global scope:
/home/pfych/.cache/yay/sunshine/src/sunshine/src/upnp.cpp:47:3: error: ‘std::string_view upnp::status_string(int)’ defined but not used [-Werror=unused-function]
   47 |   status_string(int status) {
      |   ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/sunshine.dir/build.make:104: CMakeFiles/sunshine.dir/src/upnp.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: CMakeFiles/sunshine.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
make: Leaving directory '/home/pfych/.cache/yay/sunshine/src/build'
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: sunshine-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
sunshine - exit status 4

Expected Behavior

No response

Additional Context

Attempting to run after installing sunshine-bin:

[~] sunshine                           
sunshine: error while loading shared libraries: libminiupnpc.so.17: cannot open shared object file: No such file or directory

Host Operating System

Linux

Operating System Version

6.9.7-arch1-1

Architecture

64 bit

Sunshine commit or version

0.23.1-1 (Sun 30 Jun 2024 14:22:57)

Package

Linux - AUR (Third Party)

GPU Type

AMD

GPU Model

nil

GPU Driver/Mesa Version

nil

Capture Method

None

Config

nil

Apps

No response

Relevant log output

nil
Podter commented 3 days ago

I also got same issue on Arch Linux. Seems like the latest update to miniupnpc on Arch Linux just broke the package. My workaround is downgrading miniupnpc to 2.2.7-2. You can downgrade miniupnpc with downgrade bash script. You can read more here: https://wiki.archlinux.org/title/Downgrading_packages#Automation

pyamsoft commented 2 days ago

Hi!

Similarly, this PR if approved and merged will also fix the problem. You can update the PKGBUILD you are using to also pull in this diff as a srcfile and apply the patch manually in the prepare stage if you don't want to downgrade

kelvie commented 2 days ago

If you are referring to sunshine-git on the AUR, I've patched it in the meantime, so it should build.