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

Native support for Apple Silicon (ARM64 architecture) #46299

Open
frozenpandaman opened this issue Nov 30, 2021 · 131 comments
Open

Native support for Apple Silicon (ARM64 architecture) #46299

frozenpandaman opened this issue Nov 30, 2021 · 131 comments
Labels
Build/Install Related to compiling or installing QGIS Feature Request macOS

Comments

@frozenpandaman
Copy link

Feature description

A build of QGIS that runs natively on M1 Macs would be great to see.

https://doesitarm.com/app/qgis/

Additional context

No response

@gioman gioman added the Build/Install Related to compiling or installing QGIS label Dec 1, 2021
@3nids 3nids added the macOS label Jan 19, 2022
@AtelierCartographique
Copy link

It would be great indeed! Any news on this?

@zadorozhko
Copy link

Just FYI: Rosetta2 is claimed to be REMOVED in OSX 11.3 beta 3 update in certain countries. I guess M1 owners will run QGIS in QEMU very soon.

@tsmcgrath
Copy link

I want to see QGIS run natively on the M1 Ultra with a Mac Studio.

@beginor
Copy link

beginor commented Mar 22, 2022

Is there anyone who can provide remote access to a M1 mac may be it's better to donate a M1 😊

@tsmcgrath
Copy link

@tsmcgrath
Copy link

But there are python performance issues on M1: https://developer.apple.com/forums/thread/695963

@felix-ht
Copy link

felix-ht commented May 3, 2022

@tsmcgrath this is not a generic python issue - but rather a issue with numpy. Python in general is actually really fast on a M1 - the issue is that the default numpy wheels seem to ship with a slow numerical library.

This can be fixed by compiling numpy from source. So this should not be a blocker.

@Mielie
Copy link

Mielie commented May 18, 2022

Any news/progress on this? Native M1 QGIS is something I would very much like to have.

@geodowd
Copy link

geodowd commented Jun 28, 2022

Just to add to this, I find QGIS quite slow to start and use on an M1 Mac as it is running under Rosetta. Native support would be very much appreciated.

@Smo-RBR
Copy link

Smo-RBR commented Jul 10, 2022

M1 multiprocessing support would be very, very great. Especially with large datasets, qgis will often not repsonding because 100% CPU usage :/

@zadorozhko
Copy link

zadorozhko commented Jul 18, 2022

In MacOS 13 Ventura Rosetta is not installed by default. QGIS still can be launched after installing it from command line:
softwareupdate --install-rosetta
Make your own conclusions.

@Mielie
Copy link

Mielie commented Jul 18, 2022

Rosetta 2 is not installed by default on Monterey either, it gives the user the option to install it when you try to launch an intel binary. Seems Ventura is getting additional translation support for intel binaries running within a linux VM as well, so it is hardly showing signs of going away.

@shaunakv1
Copy link

Native apple silicon build would be great to have! Is this on the roadmap?

@joaquinezcurra
Copy link

+1 for Apple Silicon M1 native support

@bryik
Copy link

bryik commented Aug 25, 2022

Edit: Turns out it is possible to run QGIS natively on M1 via MacPorts. See the discussion below, particularly this comment which gives a good idea of the steps required. Note that brew must be uninstalled since "You can’t have Homebrew and MacPorts running on the same Mac".


I'm not affiliated with QGIS, but was curious about M1 support.

tl;dr: QGIS needs to move to Qt 6. When that is done, native M1 support should be possible show up in binaries distributed by QGIS.org. This is on the roadmap and work is in-progress.

#46299 (comment)

From looking around Github issues:

Donations to QGIS partly go towards funding these kinds of grants.

@Veence
Copy link

Veence commented Aug 25, 2022

Well, I do have QGIS 3.26.2 running natively on my M1 MacBookPro. Everything is installed from source using MacPorts

@tudorbarascu
Copy link
Member

Just FYI if you use Asahi Linux on M1 macs QGIS runs natively out of the box.

@bryik
Copy link

bryik commented Aug 26, 2022

Well, I do have QGIS 3.26.2 running natively on my M1 MacBookPro. Everything is installed from source using MacPorts

Interesting. I guess I should have said "native M1 builds probably won't show up on QGIS.org until after the Qt 6 transition". Good to know MacPorts is an option.

It was hard to find official info on the state of Qt 5's support for M1. All I turned up was a blog post which mentions at the very end:

Some patches already went into Qt 5, so Qt 5.15.4 and above should build and run by passing -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 to configure. Note that this configuration is not tested in CI, and is hence unsupported at this point.

Sounds scary 😅

@beginor
Copy link

beginor commented Aug 26, 2022

Just FYI if you use Asahi Linux on M1 macs QGIS runs natively out of the box.

Would you like to share it? I think it is not easy to build qgis from source?

@tudorbarascu
Copy link
Member

tudorbarascu commented Aug 26, 2022

Just FYI if you use Asahi Linux on M1 macs QGIS runs natively out of the box.

Would you like to share it? I think it is not easy to build qgis from source?

Actually the latest QGIS comes with the packages.

If you want to run the LTR you can go to https://aur.archlinux.org/packages/qgis-ltr and click download from the snapshot of the build, after you unzip you go to that directory, edit the PKGBUILD file and change the architecture from arch=('x86_64') to arch=('aarch64'), after which you build the package with makepkg --clean --syncdeps --rmdeps -f. To install just run sudo pacman -U qgis-ltr-3.22.10-1-aarch64.pkg.tar.xz. So it's very easy.

Of course you need to install asahi linux first.

@Veence
Copy link

Veence commented Aug 26, 2022

For information, the only part of QT5 that doesn’t compile on M1 is Scintilla. We’re stuck at 2.13.1 currently, but that’s not a dealbreaker.

Does Qt6 uses Metal for 3D display?

@nyalldawson
Copy link
Collaborator

@Veence

Does Qt6 uses Metal for 3D display?

No, qgis requires OpenGL right now -- even for qt 6 builds.

@Mielie
Copy link

Mielie commented Aug 26, 2022

For information, the only part of QT5 that doesn’t compile on M1 is Scintilla. We’re stuck at 2.13.1 currently, but that’s not a dealbreaker.

Does Qt6 uses Metal for 3D display?

Any pointers for getting QGIS to install using MacPorts? I've tried installing with the -s option but the install fails because it can't build py310-pyqt5-scintilla (command execution failed).

@Veence
Copy link

Veence commented Aug 26, 2022

That’s exactly where the nub of the problem lies. I know there’s a way to install old versions, I’ll figure that out and post it here

@Mielie
Copy link

Mielie commented Aug 26, 2022

I can get the install past the error with pyqt5-scintilla by adding "use_xcode yes" to the portfile for py310-pyqt5-scintilla. Have now got it past all the dependencies but the QGIS build fails at 31%, still trying to figure that one out.

@Veence
Copy link

Veence commented Aug 26, 2022

Ah, nice, I knew there was a workaround, it had been discussed in the mailing list. I’m going to do that too, thanks for posting it.

@Mielie
Copy link

Mielie commented Aug 26, 2022

This is the output of my qgis build, any pointers would be appreciated. Not getting much more with the log file:

% sudo port -sp install qgis3
---> Computing dependencies for qgis3
---> Fetching distfiles for qgis3
---> Verifying checksums for qgis3
---> Extracting qgis3
---> Applying patches to qgis3
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/AssignProjection.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/fillnodata.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/gdal2tiles.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/gdal2xyz.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/gdalcalc.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/merge.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/polygonize.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/proximity.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/retile.py
Warning: reinplace s|+ '.py'|+ '.py-3.10'| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/plugins/processing/algs/gdal/sieve.py
---> Configuring qgis3
Warning: reinplace s/$$$$/$$/ didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build/src/core/CMakeFiles/qgis_core.dir/build.make
Warning: reinplace s/$$$$/$$/ didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build/src/core/CMakeFiles/qgis_core_autogen.dir/build.make
---> Building qgis3
Error: Failed to build qgis3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port qgis3 failed
---> Scanning binaries for linking errors
---> No broken files found.
---> No broken ports found.
jamesmilmine@MacBook-Pro qt5 % sudo port -s install qgis3
Password:
---> Computing dependencies for qgis3
---> Building qgis3
Error: Failed to build qgis3: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port qgis3 failed

And:

% tail -20 main.log
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/PyQt && /opt/local/bin/cmake -E make_directory /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build/output/python/qgis/PyQt/uic
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/QGIS-3_26_2/python/PyQt && /opt/local/bin/cmake -E copy PyQt5/uic/properties.py /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build/output/python/qgis/PyQt/uic
:info:build make[2]: Leaving directory /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build' :info:build [ 31%] Built target pyqtcompat :info:build make[1]: Leaving directory /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build'
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/work/build" && /usr/bin/make -j8 -w all VERBOSE=ON
:info:build Exit code: 2
:error:build Failed to build qgis3: command execution failed
:debug:build Error code: CHILDSTATUS 85281 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 8)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_qgis3/qgis3/main.log for details.

@Mielie
Copy link

Mielie commented Oct 3, 2023

Question: excuse my ignorance, but is below the kind of processors you guys are looking a QGIS version for? Or are you talking about something different? If the former, afaict, I have never had issues with installing QGIS on this using the official package* (no need of conda, macports...). If the latter, sorry for the noise and if someone could point me to what it is actually about, it would be nice

Capture d’écran 2023-10-03 à 11 04 05

(*) PDAL version stuck at 2.3.0 so no PDAL processing algs but all the rest of QGIS works great afaict

Yes, this is an Apple Silicon (M1) processor. You most likely have no issues running the QGIS installer package and application because of Rosetta 2. It is seamless and very good, but at some point we can expect Apple to remove it, and a native version will be more performant anyway.

@oskarlin
Copy link

The first Apple silicon chip was introduced in 2020 and now its 2024. I think it's time to put some effort in making QGIS work native with these processors. What's the status right now? Is anyone working on this?

I have tried the silicon version 3.28.1 that somebody created a year or two before and that one is so so much faster than running through Rosetta but it lacks a lot of the new features...

@Mielie
Copy link

Mielie commented Jan 15, 2024

I'm running 3.34.1 on my M1 Mac and it's native. Installed via MacPorts. I do agree though, it's inconvenient not to have a proper native installer that you can just download off the QGIS website.

I've been using a Dell i7 with 32GB of RAM for another project at work and the difference between QGIS on Windows and QGIS on the M1 Mac is night and day. QGIS really flies on Apple Silicon.

@justinbb
Copy link
Contributor

@oskarlin : In fact, QGIS has been working native with Apple Silicon for at least a year and a half now. Please read the discussion above in this issue. If you want an up-to-date QGIS for Mac, use MacPorts or Conda. That's it.
There's even a nice Conda-based installer: see https://github.com/opengisch/qgis-conda-builder/releases
and a MacPorts cheat sheet: https://qgis.org/en/site/forusers/alldownloads.html#macports

The "official" Mac package has not had any substantial updates since September 2021, and should not be used. Even if the QGIS source code is current in those "official" builds, QGIS is made of much more than its own code, and the other components (including the geospatial libraries at the heart of QGIS's functionality) are two and a half years out of date – not to mention there being no Apple Silicon support in that packager.

This issue should really be closed. There are separate issues open concerning the packaging problem.
(But someone should change the web page https://qgis.org/en/site/forusers/download.html the Mac section of which is mostly unhelpful.)

@adamjstewart
Copy link

This issue should really be closed. There are separate issues open concerning the packaging problem.

@justinbb are you referring to qgis/QGIS-Mac-Packager#147 or qgis/QGIS-Enhancement-Proposals#270? Happy to close this and continue the discussion on one of those.

For most users, being able to theoretically compile QGIS from source is little consolation without an official distributed binary. Especially for applications (like QGIS) as opposed to libraries (like GDAL).

FWIW, Spack also has the ability to build QGIS from source on arm64. But conda is probably better for the average user, Spack is most useful for power users.

@MtnBiker
Copy link

QGIS 3.34.2-Prizren showing Intel in Get Info which I assume is not native.

➜ brew install qgis
Warning: Not upgrading qgis, the latest version is already installed

Does this mean I don't have the native Silicon version installed? And if so why isn't HomeBrew picking that up? Or am I missing something?

I installed per @justinbb and now have the native version. It seems last time I looked at Conda it was difficult. This was straightforward, but I got these errors on launch:

faulthandler.enable(file=qgis.utils.__qgis_fault_handler_file)


Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [Errno 1] Operation not permitted


Python version:
3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:41:02) [Clang 16.0.6 ]

QGIS version:
3.34.2-Prizren 'Prizren', exported

Python path:
['/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins', '/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python/plugins', '/Applications/QGIS-3.34.app/Contents/lib/python311.zip', '/Applications/QGIS-3.34.app/Contents/lib/python3.11', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/lib-dynload', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/site-packages']

Not helpful. Is this installation OK or not?

But not having a HomeBrew version means having to remember to use Conda and find that site. Maybe HomeBrew will pick up the native version with the next update.

I appreciate that many people are working hard to make QGIS a great app and available. I have no idea how hard it is to remove this friction. And I realize some are happier downloading from a site. I have enough Homebrew installs to just run brew update && brew upgrade from time to time.

@nilason
Copy link
Contributor

nilason commented Jan 15, 2024

This was straightforward, but I got these errors on launch:

faulthandler.enable(file=qgis.utils.__qgis_fault_handler_file)


Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [Errno 1] Operation not permitted


Python version:
3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:41:02) [Clang 16.0.6 ]

QGIS version:
3.34.2-Prizren 'Prizren', exported

Python path:
['/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins', '/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python/plugins', '/Applications/QGIS-3.34.app/Contents/lib/python311.zip', '/Applications/QGIS-3.34.app/Contents/lib/python3.11', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/lib-dynload', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/site-packages']

Not helpful. Is this installation OK or not?

Looks like #52987

@momeni133
Copy link

This was straightforward, but I got these errors on launch:

faulthandler.enable(file=qgis.utils.__qgis_fault_handler_file)


Traceback (most recent call last):
  File "", line 1, in 
PermissionError: [Errno 1] Operation not permitted


Python version:
3.11.7 | packaged by conda-forge | (main, Dec 23 2023, 14:41:02) [Clang 16.0.6 ]

QGIS version:
3.34.2-Prizren 'Prizren', exported

Python path:
['/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python', '/Users/gscar/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins', '/Applications/QGIS-3.34.app/Contents/MacOS/../share/qgis/python/plugins', '/Applications/QGIS-3.34.app/Contents/lib/python311.zip', '/Applications/QGIS-3.34.app/Contents/lib/python3.11', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/lib-dynload', '/Applications/QGIS-3.34.app/Contents/lib/python3.11/site-packages']

Not helpful. Is this installation OK or not?

Looks like #52987

Same here. Today I installed the native version using macports and I received the same error when opening the QGIS. By ignoring this error the app works though

@nilason
Copy link
Contributor

nilason commented Jan 15, 2024

Looks like #52987

Same here. Today I installed the native version using macports and I received the same error when opening the QGIS. By ignoring this error the app works though

Yes, it does not seem to affect its functionality, annoying as it is.

@justinbb
Copy link
Contributor

justinbb commented Jan 16, 2024

@adamjstewart Yes, what you said is correct / makes sense. With the conda installer, it is not just a theoretical possibility, getting QGIS is quick and within many people's reach. It may not be the definitive solution but the problem is not because of Apple Silicon, it's because the QGIS-Mac-Packager broke and is unfixable.

And as @nilason wrote above, the frightening Python error handler enabling error has a bug of its own (to which I just added some observations). The error is just an annoyance, though what it says is true: the Python error handler is not being enabled. It needs to be done just a bit later in QGIS initialization, and then it will work correctly.

@dawgermany
Copy link

dawgermany commented Jan 22, 2024

@adamjstewart Yes, what you said is correct / makes sense. With the conda installer, it is not just a theoretical possibility, getting QGIS is quick and within many people's reach. It may not be the definitive solution but the problem is not because of Apple Silicon, it's because the QGIS-Mac-Packager broke and is unfixable.

And as @nilason wrote above, the frightening Python error handler enabling error has a bug of its own (to which I just added some observations). The error is just an annoyance, though what it says is true: the Python error handler is not being enabled. It needs to be done just a bit later in QGIS initialization, and then it will work correctly.

https://github.com/opengisch/qgis-conda-builder/ is still not finished; there are important issues left like #13 and #9 so I object that the conda installer is a viable, quick, grab-n-go solution. I have not been able to get it to a usable state at all.

I really hope that the great effort by m-kuhn gets the necessary final 5% and is rolled out officially and in a reliable state.

@pwflint
Copy link

pwflint commented Feb 1, 2024

Just piping in here RE any discussion about closing this issue. I am not a software developer but use QGIS pretty frequently in my landscape design work. It works relatively smoothly, but some performance issues led me to this thread, which I've been following for at least 2 years. The "workaround" solutions (macPorts, Conda) which I suspect are quick if you know what you're doing, do take a considerable amount of time to research and install if your work is only tech-adjacent, so a stable, native silicon release is desirable. Not in any hurry, just chiming in.

@tsmcgrath
Copy link

@pwflint it is in the process of being closed via the work happening here: qgis/QGIS-Enhancement-Proposals#270 (comment)

I suspect when that ticket is finally closed the installer will be integrated and then this ticket can be closed.

@louwers
Copy link

louwers commented Jul 7, 2024

GitHub Actions now also provides free M1 Macs. https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

@aidan-gibson
Copy link

Is this being worked on in any capacity? Thanks

@jcm36
Copy link

jcm36 commented Sep 23, 2024

QGIS no longer builds via macports on MacOs 15 due to llvm-14 no longer being supported/maintained. Has anyone come across any alternative methods to compile QGIS for Apple Silicon?

@adamjstewart
Copy link

Spack still supports this: https://spack.io

@nyalldawson
Copy link
Collaborator

@jcm36 I'd suggest asking the macports maintainers to switch to a qt6 based build of qgis. Those should be fully functional now, and fully compatible with Apple silicon chips

@jcm36
Copy link

jcm36 commented Sep 23, 2024

@jcm36 I'd suggest asking the macports maintainers to switch to a qt6 based build of qgis. Those should be fully functional now, and fully compatible with Apple silicon chips

I've submitted a request to switch to a Qt6 based build, so lets see how that goes. Hopefuly its not too difficult as QGIS on native Apple Silicon has been an amazing improvement.

@nilason
Copy link
Contributor

nilason commented Sep 23, 2024

QGIS no longer builds via macports on MacOs 15 due to llvm-14 no longer being supported/maintained. Has anyone come across any alternative methods to compile QGIS for Apple Silicon?

I don’t understand where you got the connection macOS 15, llvm 14 and QGIS. In general the introduction of a new macOS version is a maintainer’s nightmare especially with a dependency stack like QGIS. With some patience things will sort themselves out eventually. Also, if you depend on open source software you should be careful to upgrade OS early.

@jcm36
Copy link

jcm36 commented Sep 23, 2024

QGIS no longer builds via macports on MacOs 15 due to llvm-14 no longer being supported/maintained. Has anyone come across any alternative methods to compile QGIS for Apple Silicon?

I don’t understand where you got the connection macOS 15, llvm 14 and QGIS. In general the introduction of a new macOS version is a maintainer’s nightmare especially with a dependency stack like QGIS. With some patience things will sort themselves out eventually. Also, if you depend on open source software you should be careful to upgrade OS early.

The connection between MacOS 15 and llvm-14 was just my assumption, as I successfully built QGIS a few weeks ago on MacOS 14, but could no longer build on my new machine which is running MacOS 15.

Oh I agree, it can't be easy to maintain something as complex as QGIS with new os releases. Was just a polite note and asking if there were any alternative options. Thanks

@nilason
Copy link
Contributor

nilason commented Sep 23, 2024

The connection between MacOS 15 and llvm-14 was just my assumption, as I successfully built QGIS a few weeks ago on MacOS 14, but could no longer build on my new machine which is running MacOS 15.

Oh I agree, it can't be easy to maintain something as complex as QGIS with new os releases. Was just a polite note and asking if there were any alternative options. Thanks

No worries, the best you could do to help fix this is reporting at https://trac.macports.org/newticket?port=qgis3 (and don’t forget to append the main.log).

@nilason
Copy link
Contributor

nilason commented Sep 23, 2024

@jcm36 I'd suggest asking the macports maintainers to switch to a qt6 based build of qgis. Those should be fully functional now, and fully compatible with Apple silicon chips

@nyalldawson I’ve planned this for some time, but never got to it. Is the some documentation regarding building QGIS with QT6?

@momeni133
Copy link

momeni133 commented Sep 23, 2024 via email

@nilason
Copy link
Contributor

nilason commented Sep 23, 2024

Someone from MacPorts responded to my question: Indeed clang-14 is known to fail to build on macOS 15 so you can't use it or anything that depends on it. clang-18 and later build on macOS 15. In this case, qgis3 depends on py312-llvmlite which depends on clang-14. py312-llvmlite will need to use clang-18 or later for compatibility with macOS 15.

llvmlite is part of the default variant plugin_support312, try install without that variant: port install qgis3 -plugin_support312 (which anyway only is a convenient variant adding a bunch of useful dependencies.)

@jcm36
Copy link

jcm36 commented Sep 24, 2024

Someone from MacPorts responded to my question: Indeed clang-14 is known to fail to build on macOS 15 so you can't use it or anything that depends on it. clang-18 and later build on macOS 15. In this case, qgis3 depends on py312-llvmlite which depends on clang-14. py312-llvmlite will need to use clang-18 or later for compatibility with macOS 15.

llvmlite is part of the default variant plugin_support312, try install without that variant: port install qgis3 -plugin_support312 (which anyway only is a convenient variant adding a bunch of useful dependencies.)

Unfortunately the build failed when excluding the plugin_support312 option too. "Failed to build qt5-qtlocation: command execution failed."

I guess the discussion here probably isn't the best place to get into - so I'll see if I can raise a ticket at MacPorts.

[Edit]: Trac ticket already exists for qt5-qlocation: https://trac.macports.org/ticket/70477

@MtnBiker
Copy link

MtnBiker commented Sep 24, 2024 via email

@MaintenanceCosts
Copy link

MaintenanceCosts commented Sep 25, 2024

Just a note to confirm that I've successfully built AS-native QGIS3 on Sequoia with MacPorts, but only the base app - no plugins, with -plugin_support312.

You have to install the ports boost and boost181 (yes, both of them, redundantly) before trying to build qgis3 in order for qt5-qtlocation to build correctly.

The plugin ports all are still relying on clang 14 and will not be installable on Sequoia until that is fixed.

@okkymabruri
Copy link

Just a note to confirm that I've successfully built AS-native QGIS3 on Sequoia with MacPorts, but only the base app - no plugins, with -plugin_support312.

You have to install the ports boost and boost181 (yes, both of them, redundantly) before trying to build qgis3 in order for qt5-qtlocation to build correctly.

The plugin ports all are still relying on clang 14 and will not be installable on Sequoia until that is fixed.

Thanks @MaintenanceCosts
Works for me on M2 Chip with macOS 15 (Sequoia):

port install boost boost181  
port install qgis3 -plugin_support312  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build/Install Related to compiling or installing QGIS Feature Request macOS
Projects
None yet
Development

No branches or pull requests