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

Fix compilation on M1 macOS #1162

Merged
merged 3 commits into from
Oct 31, 2021
Merged

Fix compilation on M1 macOS #1162

merged 3 commits into from
Oct 31, 2021

Conversation

Absolucy
Copy link

Homebrew on M1 uses /opt/homebrew instead of /usr/local

In addition, I added support for Procursus, which uses apt and installs in /opt/procursus on both x86_64 and M1.

export CMAKE_PREFIX_PATH="/opt/procursus:$QT_PATH:$CMAKE_PREFIX_PATH"
export LD_LIBRARY_PATH="/opt/procursus/lib:$LD_LIBRARY_PATH"
export CPATH="/opt/procursus/include:$CPATH"
export PKG_CONFIG_PATH="/opt/procursus/lib/pkgconfig:$PKG_CONFIG_PATH"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know little about Procursus, but it seems strange to include Pocursus paths when Homebrew is detected.

@OKNoah
Copy link

OKNoah commented Jun 20, 2021

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

Keep up the great effort

@yan12125
Copy link

Looks like this PR only attempts to fix building but not to create universal binaries. Also, Homebrew does not seems to support universal binaries, either. Homebrew/brew#10307

@yan12125
Copy link

There are now conflicting files as part of this PR is covered by #1207

@fdelucchijr
Copy link

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

I get Mach-O 64-bit executable arm64 for all 3 binaries, so, I think is ready 🤔.
The problem at this point look more as a signing error, look at #960
Cheers!

@fdelucchijr
Copy link

fdelucchijr commented Sep 1, 2021

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

I get Mach-O 64-bit executable arm64 for all 3 binaries, so, I think is ready 🤔.
The problem at this point look more as a signing error, look at #960
Cheers!

For anyone facing this, use this comment command.

Also, I think this PR should be merged, Barrier running native Apple Arch in M1 MBA here!

@shymega
Copy link

shymega commented Oct 23, 2021

I've updated CI to build on Big Sur, but I want to make this PR use a conditional for compiling on M1. I still want older macOS releases to be supported by Barrier...

@Absolucy
Copy link
Author

@shymega universal binaries work on pretty much all versions of macOS, they've been a thing since the powerpc days

@shymega
Copy link

shymega commented Oct 23, 2021

@Absolucy OK. As long as Mojave, Catalina, and Big Sur are supported, I'm happy to merge.

@SiliconSausage
Copy link

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

I get Mach-O 64-bit executable arm64 for all 3 binaries, so, I think is ready 🤔.
The problem at this point look more as a signing error, look at #960
Cheers!

For anyone facing this, use this comment command.

Also, I think this PR should be merged, Barrier running native Apple Arch in M1 MBA here!

Could you share a zip of the app please? I haven't got it to work. Thanks.

@fdelucchijr
Copy link

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

I get Mach-O 64-bit executable arm64 for all 3 binaries, so, I think is ready 🤔.
The problem at this point look more as a signing error, look at #960
Cheers!

For anyone facing this, use this comment command.
Also, I think this PR should be merged, Barrier running native Apple Arch in M1 MBA here!

Could you share a zip of the app please? I haven't got it to work. Thanks.

Of course! Here is my build.
https://we.tl/t-jHlDF34qcV

@SiliconSausage
Copy link

SiliconSausage commented Oct 31, 2021

Running file on all 3 executables shows they are not yet universal

file Barrier.app/Contents/MacOS/barrier 
Contents/MacOS/barrier: Mach-O 64-bit executable x86_64

I get Mach-O 64-bit executable arm64 for all 3 binaries, so, I think is ready 🤔.
The problem at this point look more as a signing error, look at #960
Cheers!

For anyone facing this, use this comment command.
Also, I think this PR should be merged, Barrier running native Apple Arch in M1 MBA here!

Could you share a zip of the app please? I haven't got it to work. Thanks.

Of course! Here is my build. https://we.tl/t-jHlDF34qcV

Thank you SO much🙏🏾

I had to run CHMOD-X on the each of the three executables in the MacOS folder in the app package but now it's working perfectly.

@shymega
Copy link

shymega commented Oct 31, 2021

@Absolucy Could you merge master onto this PR, or at least, commit: a53380d

The reason for that is because CI has been updated to build on Big Sur, and I wanted to be sure your PR works. Cheers.

@Absolucy
Copy link
Author

i don't even know how this PR is open anymore considering that my fork is deleted

@shymega
Copy link

shymega commented Oct 31, 2021

Nor do I - do you still want it merged? I can checkout the PR and merge it myself if you want?

@Absolucy
Copy link
Author

Yeah, feel free.

@shymega shymega merged commit fca18b6 into debauchee:master Oct 31, 2021
@shymega
Copy link

shymega commented Oct 31, 2021

Right, OK, that's been merged. Thanks for the PR, its a welcome addition to our macOS support, both local builds and CI!

@fdelucchijr
Copy link

Thanks, @Absolucy!

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

Successfully merging this pull request may close these issues.

6 participants