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

MacOS - Compilation fails when using MacPorts for v0.23.1 on Mac M1 Pro #2482

Open
3 tasks done
usman-receeve opened this issue Apr 29, 2024 · 7 comments
Open
3 tasks done
Labels
os:macOS OS is macOS

Comments

@usman-receeve
Copy link

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 nightly release?

  • This issue is present in the nightly release

Describe the Bug

The compilation build process failed on macOS Sonoma 14.3
This is the main.log

Expected Behavior

No response

Additional Context

No response

Host Operating System

macOS

Operating System Version

Sonoma 14.3

Architecture

64 bit

Sunshine commit or version

0.23.1

Package

macOS - Portfile

GPU Type

n/a

GPU Model

Apple M2

GPU Driver/Mesa Version

Apple M2

Capture Method (Linux Only)

No response

Config

n/a - Sunshine never compiles

Apps

No response

Relevant log output

:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [tests/test_sunshine] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/build'
:info:build make[1]: *** [tests/CMakeFiles/test_sunshine.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/build" && /usr/bin/make -j10 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build Sunshine: command execution failed
:debug:build Error code: CHILDSTATUS 73900 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/main.log for details.
@ReenigneArcher ReenigneArcher added the os:macOS OS is macOS label Apr 29, 2024
@Hazer
Copy link
Member

Hazer commented May 13, 2024

@usman-receeve from your main.log, it seems macports is trying to install as x86 and not arm, can you try installing like this and report back if anything changes?

sudo arch -arm64 port install sunshine

@ReenigneArcher
Copy link
Member

ReenigneArcher commented May 13, 2024

We also fail on "warning", so this might be what you're facing.

:info:build /opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/platform/macos/av_audio.m:19:124: warning: 'AVCaptureDeviceTypeBuiltInMicrophone' is deprecated: first deprecated in macOS 14.0 [-Wdeprecated-declarations]
:info:build     AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[AVCaptureDeviceTypeBuiltInMicrophone,
:info:build                                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build                                                                                                                            AVCaptureDeviceTypeMicrophone
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:575:38: note: 'AVCaptureDeviceTypeBuiltInMicrophone' has been explicitly marked deprecated here
:info:build AVF_EXPORT AVCaptureDeviceType const AVCaptureDeviceTypeBuiltInMicrophone API_DEPRECATED_WITH_REPLACEMENT("AVCaptureDeviceTypeMicrophone", macos(10.15, 14.0), ios(10.0, 17.0), macCatalyst(14.0, 17.0)) API_UNAVAILABLE(tvos, visionos) API_UNAVAILABLE(watchos);
:info:build                                      ^
:info:build /opt/local/var/macports/build/_Users_usmanirale_ports_multimedia_sunshine/Sunshine/work/Sunshine-0.23.1/src/platform/macos/av_audio.m:20:7: warning: 'AVCaptureDeviceTypeExternalUnknown' is deprecated: first deprecated in macOS 14.0 [-Wdeprecated-declarations]
:info:build       AVCaptureDeviceTypeExternalUnknown]
:info:build       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build       AVCaptureDeviceTypeExternal
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDevice.h:563:38: note: 'AVCaptureDeviceTypeExternalUnknown' has been explicitly marked deprecated here
:info:build AVF_EXPORT AVCaptureDeviceType const AVCaptureDeviceTypeExternalUnknown API_DEPRECATED_WITH_REPLACEMENT("AVCaptureDeviceTypeExternal", macos(10.15, 14.0)) API_UNAVAILABLE(ios, macCatalyst, tvos, visionos) API_UNAVAILABLE(watchos);
:info:build                                      ^
:info:build [ 43%] Building CXX object CMakeFiles/sunshine.dir/src/platform/macos/display.mm.o
:info:build 2 warnings generated.

You can try changing this line in your portfile:

configure.args -DBUILD_WERROR=ON \

to

configure.args -DBUILD_WERROR=OFF \

I can't determine why you are getting those warnings though, and we don't get it in our CI... we both are using the same version of clang.

@Hazer
Copy link
Member

Hazer commented May 13, 2024

We also fail on "warning", so this might be what you're facing.

Oh. That may help, still weird that's building on Rosetta instead of arm, from what I can tell from our logs our CI is building arm just ok, and there's no specific arch on portfile config. Even if the builds succeed, it shouldn't build for x86_64. Seems like an env issue to me.

I can't determine why you are getting those warnings though, and we don't get it in our CI... we both are using the same version of clang.

@ReenigneArcher We are getting them too, it has to do with macOS 14+ framework, just kinda hidden on the CI, line 7000 or something of the "Install Sunshine" logs, but for some reason, not found in "build logs". I'll open a PR later to tackle those warnings, they are not an issue yet, but will be.

@ReenigneArcher
Copy link
Member

I've seen something similar to the main issue here, I think on discord.

I think that user had migrated their homebrew install from an x86_64 mac to an arm mac, and it was messing with things.

@ArcusMG
Copy link

ArcusMG commented May 31, 2024

I'm having an issue compiling using Homebrew on a M1 MacBook Pro. Should I start a new issue or add it here?

I've included the make file with the relevant error. It's complaining that:
"symbol(s) not found for architecture arm64"

But when I check homebrew config, it says it's using arm architecture.

If I need to start a new issue, I can definitely do that.
02.make.txt

@BarryDeng
Copy link

I'm having an issue compiling using Homebrew on a M1 MacBook Pro. Should I start a new issue or add it here?

I've included the make file with the relevant error. It's complaining that: "symbol(s) not found for architecture arm64"

But when I check homebrew config, it says it's using arm architecture.

If I need to start a new issue, I can definitely do that. 02.make.txt

Same logs as yours. It seems that x86_64 Homebrew had messed up the openssl library search path in my m1 mac.

$ file /usr/local/opt/openssl/lib/libcrypto.dylib
/usr/local/opt/openssl/lib/libcrypto.dylib: Mach-O 64-bit dynamically linked shared library x86_64

I solved the issue by unlinking the x86_64 openssl library, and maybe you can link the library back after the compilation.

$ arch -x86_64 zsh
$ brew unlink openssl

@ArcusMG
Copy link

ArcusMG commented Jun 5, 2024

I'm having an issue compiling using Homebrew on a M1 MacBook Pro. Should I start a new issue or add it here?
I've included the make file with the relevant error. It's complaining that: "symbol(s) not found for architecture arm64"
But when I check homebrew config, it says it's using arm architecture.
If I need to start a new issue, I can definitely do that. 02.make.txt

Same logs as yours. It seems that x86_64 Homebrew had messed up the openssl library search path in my m1 mac.

$ file /usr/local/opt/openssl/lib/libcrypto.dylib
/usr/local/opt/openssl/lib/libcrypto.dylib: Mach-O 64-bit dynamically linked shared library x86_64

I solved the issue by unlinking the x86_64 openssl library, and maybe you can link the library back after the compilation.

$ arch -x86_64 zsh
$ brew unlink openssl

I really appreciate the reply. Sadly, it doesn't look like that worked for me. I guess Homebrew is more messed up on this computer that I realized. This isn't my normal computer, I won't have access to that for a month or so. Guess I'll have to try again later.

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

No branches or pull requests

5 participants