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

M1 arm64 MacOS Build #275

Open
mobedoor opened this issue Aug 13, 2023 · 7 comments
Open

M1 arm64 MacOS Build #275

mobedoor opened this issue Aug 13, 2023 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@mobedoor
Copy link

Hello. I'd like to request arm64 builds for the M1/M2 architecture.
Thank you.

@trickypr
Copy link
Member

I do not have an m# device to test / use. I am open to accepting a PR with m1 cross compiling.

@trickypr
Copy link
Member

We need CI setup for automated builds. Again, I would be happy to accept a PR that adds it to alpha.yml.

@arcoirislabs
Copy link

arcoirislabs commented Oct 28, 2023

What can we do to fix this

Machine:- M1Pro Mac OSX
OS - MacOS Sonoma

00:00:01 checking for vcs source checkout... git
00:00:01 checking for a shell... /bin/sh
00:00:01 checking for host system type... aarch64-apple-darwin23.0.0
00:00:01 checking for target system type... aarch64-apple-darwin23.0.0
00:00:01 checking whether cross compiling... no
00:00:01 checking for Python 3... /Users/ameyhk/.mozbuild/srcdirs/engine-63b365b29506/_virtualenvs/build/bin/python (3.9.6)
00:00:01 checking for git... /opt/local/bin/git
00:00:01 checking for Git version... 2.42.0
00:00:01 checking for sparse checkout... no
00:00:01 checking for wget... not found
00:00:01 checking for ccache... not found
00:00:01 Using target sysroot in /Users/ameyhk/.mozbuild/MacOSX14.0.sdk
00:00:01 Using host sysroot in /Users/ameyhk/.mozbuild/MacOSX14.0.sdk
00:00:01 checking for the target C compiler... /usr/bin/clang
00:00:04 checking whether the target C compiler can be used... yes
00:00:04 checking the target C compiler version... 14.0.0.or.more
00:00:04 checking the target C compiler works... yes
00:00:04 checking for the target C++ compiler... /usr/bin/clang++
00:00:04 checking whether the target C++ compiler can be used... yes
00:00:04 checking the target C++ compiler version... 14.0.0.or.more
00:00:04 checking the target C++ compiler works... yes
00:00:04 checking for the host C compiler... /usr/bin/clang
00:00:04 checking whether the host C compiler can be used... yes
00:00:04 checking the host C compiler version... 14.0.0.or.more
00:00:04 checking the host C compiler works... yes
00:00:04 checking for the host C++ compiler... /usr/bin/clang++
00:00:04 checking whether the host C++ compiler can be used... yes
00:00:04 checking the host C++ compiler version... 14.0.0.or.more
00:00:04 checking the host C++ compiler works... yes
00:00:05 checking for target linker...
00:00:05 DEBUG: Executing: `/usr/bin/clang -isysroot /Users/ameyhk/.mozbuild/MacOSX14.0.sdk -mmacosx-version-min=11.0 -std=gnu99 --target=arm64-apple-darwin -Wl,--version`
00:00:05 ERROR: Failed to find an adequate linker
00:00:05  Config object not found by mach.
00:00:05 *** Fix above errors and then restart with "./mach build"

00:00:05 Total build time: 5 seconds.
✨  Done in 6.07s.` 

@trickypr
Copy link
Member

You are missing a linker. I presume this is still distributed as some part of XCode, but I don't have a (modern) mac to debug.

@arcoirislabs
Copy link

We were able to fix it.
We simply used gluon cmd to create a new project and imported all the patches and ran gluon build.
We are able to build now for M1 ARM

Steps

  1. gluon setup-project. Select Firefox stable
  2. Copy the gluon.json in the directory. Also replace the src and configs
  3. For first time, run gluon download && gluon bootstrap && gluon import
  4. For subsequent builds run gluon build && gluon build --ui
  5. Then run gluon run

Cheers!!

@trickypr
Copy link
Member

trickypr commented Nov 6, 2023

We were able to fix it. We simply used gluon cmd to create a new project and imported all the patches and ran gluon build. We are able to build now for M1 ARM

Steps

1. `gluon setup-project`. Select Firefox stable

2. Copy the gluon.json in the directory. Also replace the src and configs

3. For first time, run `gluon download && gluon bootstrap && gluon import`

4. For subsequent builds run `gluon build && gluon build --ui`

5. Then run `gluon run`

Cheers!!

Whilst I appreciate the steps, we need a functional CI for building MacOS build. Please feel free to create a pr updating .github/workflows/alpha.yml to add a build for MacOS.

@trickypr trickypr added the help wanted Extra attention is needed label Nov 6, 2023
@letmefocus
Copy link

@arcoirislabs can you explain further? I'm trying to build on an M1 mac, and struggling to follow your steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants