Sunshine
Sunshine copied to clipboard
Error passing argument 4 of notify_notification_add_action
Is there an existing issue for this?
- [x] I have searched the existing issues
Is your issue described in the documentation?
- [x] I have read the documentation
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Describe the Bug
/tmp/sunshine-git/src/Sunshine/third-party/tray/src/tray_linux.c: In function ‘tray_update_internal’:
/tmp/sunshine-git/src/Sunshine/third-party/tray/src/tray_linux.c:103:87: error: passing argument 4 of ‘notify_notification_add_action’ from incompatible pointer type [-Wincompatible-pointer-types]
103 | notify_notification_add_action(currentNotification, "default", "Default", tray->notification_cb, NULL, NULL);
| ~~~~^~~~~~~~~~~~~~~~~
| |
| void (*)(void)
In file included from /usr/include/libnotify/notify.h:27,
from /tmp/sunshine-git/src/Sunshine/third-party/tray/src/tray_linux.c:19:
/usr/include/libnotify/notification.h:202:85: note: expected ‘NotifyActionCallback’ {aka ‘void (*)(NotifyNotification *, char *, void *)’} but argument is of type ‘void (*)(void)’
202 | NotifyActionCallback callback,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/include/libnotify/notification.h:120:19: note: ‘NotifyActionCallback’ declared here
120 | typedef void (*NotifyActionCallback) (NotifyNotification *notification,
| ^~~~~~~~~~~~~~~~~~~~
Expected Behavior
Expected sunshine master to compile.
Additional Context
I build master regularly, this is a recently intruduced issue. I suspect the interface of libnotify changed.
Host Operating System
Linux
Operating System Version
Arch Linux, kernel 6.14.4
Architecture
amd64/x86_64
Sunshine commit or version
8ef838b
Package
other (self built)
GPU Type
NVIDIA
GPU Model
4090
GPU Driver/Mesa Version
570.144
Capture Method
KMS (Linux)
Config
resolutions = [
1280x720,
1920x1080,
1920x1200,
2880x1920,
3840x2160,
7680x4320
]
fps = [30,60]
origin_web_ui_allowed = pc
min_log_level = info
Apps
n/a
Relevant log output
n/a
Try gcc 14 or lower, you need a lower version for nvidia/cuda support as well.
@rubin55 if you're using our linux build script this should be resolved by https://github.com/LizardByte/Sunshine/pull/3846
This issue should probably remain open though until Sunshine is compatible with gcc 15.
Just to confirm; I was able to build tagged version v2025.122.141614 perfectly fine on Fedora 42, using GCC-14:
cmake -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_ASM_COMPILER=gcc-14 -DBUILD_DOCS=off -B build -G Ninja -S .
I did have to disable the building of the documentation as per https://github.com/LizardByte/Sunshine/issues/3852 to get it to succeed.
Can confirm that building with gcc 14.x works as expected.
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!