Skip to content
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

MacPorts build fails on M2 Mac Mini (2023) when ffmpeg is installed #3169

Closed
2 tasks done
jmou opened this issue Sep 10, 2024 · 8 comments · Fixed by #3182
Closed
2 tasks done

MacPorts build fails on M2 Mac Mini (2023) when ffmpeg is installed #3169

jmou opened this issue Sep 10, 2024 · 8 comments · Fixed by #3182
Labels
os:macOS OS is macOS

Comments

@jmou
Copy link
Contributor

jmou commented Sep 10, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • 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

sudo port install sunshine

Using https://github.com/LizardByte/Sunshine/releases/download/v2024.910.123325/Portfile

Expected Behavior

build succeeds

Additional Context

main.log

I have looked for similar issues and seen #2482 and #3052 but they seem to describe different failures.

Host Operating System

macOS

Operating System Version

14.6.1

Architecture

arm

Sunshine commit or version

8098df6

Package

macOS - Portfile

GPU Type

Apple Silicon

GPU Model

Apple M2

GPU Driver/Mesa Version

n/a

Capture Method

None

Config

n/a

Apps

No response

Relevant log output

full main.log attached above

--- snip ---
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:6:
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/cbs_h264.h:25:
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/cbs.h:28:
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/codec_par.h:206:5: error: unknown type name 'AVChannelLayout'
:info:build     AVChannelLayout ch_layout;
:info:build     ^
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:9:
:info:build /opt/local/include/libavcodec/avcodec.h:227:6: error: redefinition of 'AVDiscard'
:info:build enum AVDiscard{
:info:build      ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/defs.h:210:6: note: previous definition is here
:info:build enum AVDiscard{
:info:build      ^
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:9:
:info:build /opt/local/include/libavcodec/avcodec.h:239:6: error: redefinition of 'AVAudioServiceType'
:info:build enum AVAudioServiceType {
:info:build      ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/defs.h:222:6: note: previous definition is here
:info:build enum AVAudioServiceType {
:info:build      ^
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:9:
:info:build /opt/local/include/libavcodec/avcodec.h:424:16: error: redefinition of 'AVPanScan'
:info:build typedef struct AVPanScan {
:info:build                ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/defs.h:240:16: note: previous definition is here
:info:build typedef struct AVPanScan {
:info:build                ^
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:9:
:info:build /opt/local/include/libavcodec/avcodec.h:453:16: error: redefinition of 'AVCPBProperties'
:info:build typedef struct AVCPBProperties {
:info:build                ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/defs.h:269:16: note: previous definition is here
:info:build typedef struct AVCPBProperties {
:info:build                ^
:info:build In file included from /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/cbs.cpp:9:
:info:build /opt/local/include/libavcodec/avcodec.h:503:16: error: redefinition of 'AVProducerReferenceTime'
:info:build typedef struct AVProducerReferenceTime {
:info:build                ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/third-party/build-deps/ffmpeg/macos-aarch64/include/cbs/defs.h:318:16: note: previous definition is here
:info:build typedef struct AVProducerReferenceTime {
:info:build                ^
--- snip ---
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/upnp.cpp:112:21: error: no matching function for call to 'UPNP_GetValidIGD'
:info:build       auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
:info:build                     ^~~~~~~~~~~~~~~~
:info:build /opt/local/include/miniupnpc/miniupnpc.h:122:1: note: candidate function not viable: requires 7 arguments, but 5 were provided
:info:build UPNP_GetValidIGD(struct UPNPDev * devlist,
:info:build ^
:info:build /opt/local/var/macports/build/_Users_joe_.dotfiles_macmini_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/upnp.cpp:334:23: error: no matching function for call to 'UPNP_GetValidIGD'
:info:build         auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
:info:build                       ^~~~~~~~~~~~~~~~
:info:build /opt/local/include/miniupnpc/miniupnpc.h:122:1: note: candidate function not viable: requires 7 arguments, but 5 were provided
:info:build UPNP_GetValidIGD(struct UPNPDev * devlist,
:info:build ^
:info:build 2 errors generated.
--- snip ---
@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@TheKidThatCodes
Copy link

brew sunshine-beta also fails with cmake saying theres no cmake list or smth

@Pheggas
Copy link

Pheggas commented Sep 13, 2024

Also fails on homebrew on Mac M3 Air. Mention me here so I will provide logs.

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Sep 13, 2024

Here's the brew issues. #3139 (comment)

All of these issues are due to the user's environment, as we are having successful builds across macOS-12,13,14 with both homebrew and macports in our CI.

@ReenigneArcher
Copy link
Member

Sorry, I had the wrong issue. Updated now.

Also, no idea what's wrong with your environment. I'm just pointing on that a clean system doesn't have these issues.

@ReenigneArcher
Copy link
Member

Closing in favor of a consolidated issue: #3180

Please add any pertinent information to that issue.

@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
@ReenigneArcher ReenigneArcher added the os:macOS OS is macOS label Sep 13, 2024
@jmou
Copy link
Contributor Author

jmou commented Sep 13, 2024

This was helpful! I uninstalled ffmpeg and Sunshine now builds. It looks like this issue is that the system-wide /opt/local/include/libavcodec/avcodec.h is included rather than the vendored third-party/build-deps/ffmpeg/Darwin-arm64/include/libavcodec/avcodec.h.

I think the consolidated issue #3180 has build failures from different root causes. Ultimately I'm happy to discuss this wherever makes the most sense for the project, but I think there might be crosstalk if the issues are unrelated as they appear to be from the logs.

@jmou jmou changed the title MacPorts build fails on M2 Mac Mini (2023) MacPorts build fails on M2 Mac Mini (2023) when ffmpeg is installed Sep 13, 2024
@ReenigneArcher
Copy link
Member

It's okay if they have different root causes. It's just too overwhelming to have new macOS build issues opened daily. So this one aims to reduce the influx.

Can you post that info about system ffmpeg header on the open issue? Or a PR would also be welcome.

@jmou
Copy link
Contributor Author

jmou commented Sep 13, 2024

Looks like you beat me to posting a comment. I'm not sure how to fix it but I'll make a PR if I figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:macOS OS is macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants