#62598 closed defect (fixed)
cjdns @21.1 "-march=native" not supported on Apple M1
Reported by: | eric-j-ason | Owned by: | l2dy (Zero King) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | arm64 | Cc: | |
Port: | cjdns |
Description
This is the output when trying to install:
% port install cjdns Warning: The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly. Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'. ---> Computing dependencies for cjdns ---> Building cjdns Error: Failed to build cjdns: command execution failed Error: See /Users/eand/macports/var/macports/logs/_Users_eand_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_cjdns/cjdns/mai\ n.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port cjdns failed
My understanding is that the warning about "macOS 11.2 SDK" isn't the issue here. Rather, the actual error, found in the log file, is this:
clang: error: the clang compiler does not support '-march=native'
Attachments (1)
Change History (5)
Changed 4 years ago by eric-j-ason
comment:1 Changed 4 years ago by kencu (Ken)
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to l2dy |
---|---|
Status: | new → assigned |
It's not just about arm. We don't want to use -march=native
on Intel either (we want to build portable software that works on any Intel CPU) unless the user selects the +native variant. Encountering this problem has alerted us to the fact that we are building wrong on Intel, giving us the opportunity to fix it.
comment:3 Changed 4 years ago by l2dy (Zero King)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 4 years ago by l2dy (Zero King)
I have removed the -march=native
flag. If the build still fails, you should bring it to upstream.
Note: See
TracTickets for help on using
tickets.
https://stackoverflow.com/questions/65966969/why-does-march-native-not-work-on-apple-m1
https://developer.apple.com/forums/thread/672654
I would think it would be better for clang to just eat that flag and ignore it on arm, rather than error, but it would seem upstream felt otherwise...
another layer of complexity now to everything, to never pass that flag if arm is in the build architectures.... sigh.