#61789 closed defect (fixed)
qt4-mac @4.8.7_10 (aqua): Fails to build on Big Sur w/ arm64 architecture
Reported by: | maralski (Peter Marelas) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | arm64 | Cc: | mkuron (Michael Kuron), FuturePilot (Nick) |
Port: | qt4-mac |
Description (last modified by jmroot (Joshua Root))
Error from main.log
:debug:configure system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.7" && ./configure -v -confirm-license -opensource -prefix /opt/local/libexec/qt4 -bindir /opt/local/libexec/qt4/bin -libdir /opt/local/libexec/qt4/lib -docdir /opt/local/libexec/qt4/share/doc -headerdir /opt/local/libexec/qt4/include -plugindir /opt/local/libexec/qt4/share/plugins -importdir /opt/local/libexec/qt4/share/imports -datadir /opt/local/libexec/qt4/share -translationdir /opt/local/libexec/qt4/share/translations -sysconfdir /opt/local/libexec/qt4/share/sysconf -examplesdir /opt/local/libexec/qt4/share/examples -demosdir /opt/local/libexec/qt4/share/demos -openssl-linked -dbus-linked -fast -no-pch -framework -no-phonon -no-phonon-backend --jobs=8 -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -nomake demos -nomake examples -release -no-declarative-debug -arch "arm64" -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk :info:configure Determining system architecture... (Darwin:20.1.0:arm64) :info:configure 'macosx' is supported :info:configure System architecture: 'macosx' :info:configure Unknown architecture: "arm64". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7 :info:configure Command failed: cd "/opt/local/var/macports/build
Attachments (1)
Change History (13)
Changed 4 years ago by maralski (Peter Marelas)
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Keywords: | arm64 added |
Owner: | set to michaelld |
Port: | qt4-mac added; q4-mac removed |
Status: | new → assigned |
Summary: | qt4-mac @4.8.7_10 (aqua): Fails to build on Big Sur w/ amd64 architecture → qt4-mac @4.8.7_10 (aqua): Fails to build on Big Sur w/ arm64 architecture |
comment:2 Changed 4 years ago by joshin42
Any hints for a workaround to get configure recognizing arm64?
Building other packages (X2GoClient) are blocked by this one not playing well with M1 Macs.
Thanks!
comment:3 Changed 4 years ago by michaelld (Michael Dickens)
I started looking at this earlier this week. I'll poke at it a little more over the weekend. I did make a little progress, but my bet is it'll take yet another patch to get Qt4 to build, and then maybe more work to get it to work on ARM64. One step at a time ...
comment:4 Changed 4 years ago by mkuron (Michael Kuron)
Cc: | mkuron added |
---|
comment:6 Changed 4 years ago by michaelld (Michael Dickens)
qt4-mac has yet to be fixed to work on ARM64 Macs. qt4-mac is old enough that my best guess is it'll take significant work to get it working on ARM64 -- the code just wasn't written with this architecture in mind!
I don't have time at the moment to get it working. If anybody wants to give this effort a go please do!
comment:7 Changed 4 years ago by jmroot (Joshua Root)
In the meantime, this port and its dependents should probably set supported_archs
accordingly, then?
comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | FuturePilot added |
---|
Has duplicate #62818.
comment:9 Changed 4 years ago by michaelld (Michael Dickens)
hmmm ... I added
# no support for ARM64 yet supported_archs ppc ppc64 i386 x86_64
in [c1b160f0ad8c8d128313c22529d8382462dd3276/macports-ports] ... which should do the trick I'd think ... is there a way to call port
and have it print out the value of supported_archs
? Just port info qt4-mac
doesn't show this info.
comment:10 Changed 3 years ago by michaelld (Michael Dickens)
I finally have an M1 Mac Mini to do live testing on. The addition noted above does indeed work, in the sense that on ARM64 / M1, MP cross-builds as X86_64. That said, at least on macOS 11.5 20G70 / Xcode 12.3 12C33 there is 1 compiler error ... and asm volatile
that is no longer accepted by clang. Removing the volatile
does the trick, so I'm testing the patch & will push that once verified. I'm guessing removing that keyword will be OK on any ARM64 / M1, so I'm limiting its scope to just this situation.
comment:11 Changed 3 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 Changed 3 years ago by JDLH (Jim DeLaHunt)
This fix, to cross-build as x86_64 on arm64, caused MacPorts to reinstall all qt4-mac dependencies as +universal
variants, on my arm64-based MacBook Pro running macOS Monterey version 12.3.1. This it turn triggered #64933, where destroot fails on arm64 for port tiff +universal. I point this out, in case others encounter the same problem. It does not invalidate this fix.
My workaround was to abandon my attempt to install qt4-mac. As pointed out here, it is old code. MacPorts has support for Qt5 and Qt6. And, once all dependencies install successfully as +universal
variants, I suppose qt4-mac as x86_64 will be usable on arm64 also, via Rosetta 2.
main.log