Opened 20 months ago
Last modified 5 months ago
#67183 new defect
Error while installing sunshine with local source
Reported by: | andrygamer06 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | andrygamer06 | |
Port: |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
To whom it may concern,
I have been struggling in the last few hours with this and I am sorry if it's a dumb thing easy to solve. I have been following this guide: https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/installation.html to be able to get the software sunshine to work on my m1 MacBook. As stated in the guide I add the local source in the following file: /opt/local/etc/macports/sources.conf. After I add the source the file looks like this (I edited it with the terminal using this command: sudo nano /opt/local/etc/macports/sources.conf
):
# # To change how MacPorts fetches base, see rsync_server and rsync_dir in # macports.conf. # To add a local source, add a "file://" entry. # # Example: file:///Users/landonf/misc/MacPorts/ports # # To prevent a source from synchronizing when `port sync` is used, # append "[nosync]" at the end. # # Example: file:///Users/landonf/misc/MacPorts/ports [nosync] # # Note that MacPorts parses source URLs in order; when a port appears in # multiple sources, it installs the first occurrence. For local sources # to shadow remote ones, "file://" URLs must come before other URLs. # A list of rsync mirrors is available at # https://trac.macports.org/wiki/Mirrors#Portfiles. # # If an "rsync://" URL points to a .tar file, a signed .rmd160 file must # exist in the same directory on the server and will be used to verify # its integrity. # # For proper functionality of various resources (port groups, mirror # sites, etc.), the primary MacPorts source must always be tagged # "[default]", even if switched from the default "rsync://" URL. rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default] file:///Users/andrei******/ports (family name censored here)
Everything works fine until I type the command sudo port install sunshine
, which leads to the following error: Error: Port sunshine not found
. I really do not know hoe to upload files here but this is the directory of the Portfile, maybe it helps: /Users/andrei*******/ports/multimedia/sunshine/Portfile
This are the contents of the Portfile:
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # initial PR into macports: https://github.com/macports/macports-ports/pull/15143 PortSystem 1.0 PortGroup cmake 1.1 PortGroup github 1.0 PortGroup boost 1.0 name @PROJECT_NAME@ version @PROJECT_VERSION@ revision 0 categories multimedia emulators games platforms darwin license GPL-3 maintainers @LizardByte description @PROJECT_DESCRIPTION@ # long_description will not be split into multiple lines as it's configured by CMakeLists long_description @PROJECT_LONG_DESCRIPTION@ homepage @PROJECT_HOMEPAGE_URL@ master_sites https://github.com/lizardbyte/sunshine/releases compiler.cxx_standard 2017 fetch.type git git.url @GITHUB_CLONE_URL@ git.branch @GITHUB_COMMIT@ post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init --recursive" } depends_lib port:avahi \ port:curl \ port:libopus \ port:npm9 \ port:pkgconfig boost.version 1.80 configure.args -DCMAKE_INSTALL_PREFIX=${prefix} \ -DSUNSHINE_ASSETS_DIR=etc/sunshine/assets startupitem.create yes startupitem.executable "${prefix}/bin/{$name}" startupitem.location LaunchDaemons startupitem.name ${name} startupitem.netchange yes platform darwin { if { ${os.major} < 20 } { # See: https://github.com/LizardByte/Sunshine/discussions/117#discussioncomment-2513494 notes-append "Port is limited to software encoding, when used with macOS releases prior to Big Sur." } } pre-build { system -W ${worksrcpath} "npm install" } notes-append "Run @PROJECT_NAME@ by executing 'sunshine <path to user config>', e.g. 'sunshine ~/sunshine.conf' " notes-append "The config file will be created if it doesn't exist." notes-append "It is recommended to set a location for the apps file in the config." notes-append "See our documentation at 'https://docs.lizardbyte.dev/projects/sunshine/en/v@PROJECT_VERSION@/' for further info."
If it is ok for you I can upload every screenshot on google drive (even as a pdf) so you can take a look at them,
I hope you can tell me how to fix this issue,
Regards,
Andrei
Change History (11)
comment:1 Changed 20 months ago by andrygamer06
Cc: | andrygamer06 added |
---|
comment:2 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | Sunshine Help Local source removed |
Milestone: | MacPorts Future |
Priority: | High → Normal |
comment:3 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)
It looks like they publish a configured Portfile here:
https://github.com/LizardByte/Sunshine/releases/latest
so you could download that instead of having to run cmake yourself.
comment:4 Changed 20 months ago by andrygamer06
Greetings, I have successfully installed that program and I have to thank you for helping me out here. I got stuck to the point where they said that I had to download the Portfile, because they do not provide any link there, and just searched through the .dmg downloaded file to see if they included the Portfile there. Despite me fixing that issue there with your help, another issue popped up while trying to run the program. This is of course not related to macports but maybe you have an idea of how I could fix this: Error: Failed to create client: Daemon not running. Now, what daemon is it talking about? I don't know.
comment:5 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)
Googling that error, this appears to be referring to the avahi daemon. Running port notes avahi
should tell you how to start it.
comment:6 follow-up: 7 Changed 20 months ago by andrygamer06
After doing that the daemon starts but I still get the same error. This is my terminal window log. Thanks again for helping me:
Last login: Tue Apr 4 18:38:06 on ttys000 andreic***@Andreis-MBP ~ % port notes avahi Warning: /opt/local/etc/macports/sources.conf specifies invalid source '/Users/andreic/Desktop# MacPorts system-wide configuration file for ports tree sources.', ignored. ---> avahi has the following notes: Startup items (named 'avahi-dnsconfd, avahi-daemon') have been generated that will aid in starting avahi with launchd. They are disabled by default. Execute the following command to start them, and to cause them to launch at startup: sudo port load avahi andreic@Andreis-MBP ~ % sudo port load avahi Password: Warning: /opt/local/etc/macports/sources.conf specifies invalid source '/Users/an/Desktop# MacPorts system-wide configuration file for ports tree sources.', ignored. ---> Loading startupitem 'avahi-dnsconfd' for avahi ---> Loading startupitem 'avahi-daemon' for avahi andrei@Andreis-MBP ~ % sunshine [2023:04:05:10:19:29]: Info: Sunshine version: 0.19.1 [2023:04:05:10:19:29]: Info: system_tray() is not yet implemented for this platform. [2023:04:05:10:19:29]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. // [2023:04:05:10:19:29]: Info: Trying encoder [videotoolbox] [2023:04:05:10:19:29]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:29]: Info: Color range: [JPEG] [2023:04:05:10:19:30]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:30]: Info: Color range: [JPEG] [2023:04:05:10:19:30]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:30]: Info: Color range: [JPEG] [2023:04:05:10:19:30]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:30]: Info: Color range: [JPEG] [2023:04:05:10:19:30]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:30]: Info: Color range: [JPEG] [2023:04:05:10:19:31]: Info: SDR color coding [Rec. 709] [2023:04:05:10:19:31]: Info: Color range: [JPEG] [2023:04:05:10:19:31]: Info: SDR color coding [Rec. 709] [2023:04:05:10:19:31]: Info: Color range: [JPEG] [2023:04:05:10:19:31]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:31]: Info: Color range: [JPEG] [2023:04:05:10:19:31]: Info: SDR color coding [Rec. 601] [2023:04:05:10:19:31]: Info: Color range: [JPEG] [2023:04:05:10:19:31]: Warning: videotoolbox: h264: replacing nalu prefix data [2023:04:05:10:19:31]: Info: [2023:04:05:10:19:31]: Info: // Ignore any errors mentioned above, they are not relevant. // [2023:04:05:10:19:31]: Info: [2023:04:05:10:19:31]: Info: Found encoder videotoolbox: [h264_videotoolbox, hevc_videotoolbox] [2023:04:05:10:19:31]: Error: Failed to create client: Daemon not running [2023:04:05:10:19:31]: Info: Configuration UI available at [https://localhost:47990]
comment:7 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to andrygamer06:
After doing that the daemon starts but I still get the same error. This is my terminal window log. Thanks again for helping me:
Warning: /opt/local/etc/macports/sources.conf specifies invalid source '/Users/andreic/Desktop# MacPorts system-wide configuration file for ports tree sources.', ignored.
You'll want to fix this by removing the /Users/andreic/Desktop
you inserted at the beginning of line 1 of sources.conf.
[2023:04:05:10:19:31]: Error: Failed to create client: Daemon not running
After investigating what loading avahi is supposed to do, I think you will need to sudo port load dbus
too, however I still don't think avahi is running on my system after doing that, so there may be more steps. I can look into it a bit more later.
comment:8 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)
There is supposed to be a system component of dbus and a component that runs as your user. After loading the dbus port, I'm seeing the former running on my system but not the latter. It may be necessary to log out of macOS and log back in to get the user part running. It's not convenient for me to try that right now but let me know if that works for you.
comment:9 Changed 19 months ago by andrygamer06
Greetings,
Sorry for the late reply but after doing the command you mentioned then trying to run the daemon again and then logging out and back in didn't work either. The people in the discord community of this app say that the daemon is not necessary and the app may run without it, but unfortunately this doesn't work for me. If you have more ideas please let me know and thanks again for the help
comment:10 Changed 19 months ago by ryandesign (Ryan Carsten Schmidt)
Which daemon do they say is not required—the avahi daemon? the dbus daemon? some other daemon? What do they say should happen after the message "Error: Failed to create client: Daemon not running" appears, or do they say that the message should not appear?
comment:11 Changed 5 months ago by Fred-Zi (Fred Zi)
I don't know if it is too late to answer, but i met this problem today. However I found that the error actually occurred before using "port install sunshine", the error was that we didn't install CMAKE during portindex stp, so we could do port install sunshine after port install cmake, and the error could be fixed.
This isn't really our bug since this port is not in the macports-ports repository.
In the instructions you referred to, I don't see an explanation of where to get the Portfile from. It appears you used the copy of the Portfile available here: https://github.com/LizardByte/Sunshine/blob/master/packaging/macos/Portfile
That won't work because it appears to be just a template. Note the placeholders like
@PROJECT_NAME@
and@PROJECT_VERSION@
. Those would need to be replaced with real values. It appears that the sunshine cmake configuration process might do this for you, so try doing that. It probably won't replace the placeholders in the template; it will create a new Portfile somewhere else in which the placeholders have been filled in. That new file is the one you would put in your ~/ports/... directory.It is weird of them to have a Portfile in their repository. The correct thing to do is to submit the Portfile to the macports-ports repository, which is where it would be maintained from that point on. As noted in a comment in the Portfile text, they did do this in https://github.com/macports/macports-ports/pull/15143 but the request was closed without explanation.