question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] Incorrect macOS M1 arch value

See original GitHub issue

Environment Details (include every applicable attribute)

  • Operating System+version: macOS 12
  • Compiler+version: Apple Clang 13
  • Conan version: 1.49
  • Python version: 3.10.4

Steps to reproduce (Include if Applicable)

conan profile new default --detect --force

Logs (Executed commands with output) (Include/Attach if Applicable)

[settings]
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=13
compiler.libcxx=libc++
build_type=Release
[options]
[build_requires]
[env]

i.e. arch_build=armv8

Meanwhile, CmakeFiles/3.23.2/CMakeSystem.cmake:

set(CMAKE_HOST_SYSTEM "Darwin-21.5.0")
set(CMAKE_HOST_SYSTEM_NAME "Darwin")
set(CMAKE_HOST_SYSTEM_VERSION "21.5.0")
set(CMAKE_HOST_SYSTEM_PROCESSOR "arm64")

set(CMAKE_SYSTEM "Darwin-21.5.0")
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_VERSION "21.5.0")
set(CMAKE_SYSTEM_PROCESSOR "arm64")

set(CMAKE_CROSSCOMPILING "FALSE")

set(CMAKE_SYSTEM_LOADED 1)

i.e. CMAKE_SYSTEM_PROCESSOR "arm64

and clang --version:

Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

i.e. Target: arm64

Also, arm64 value is absent in the default settings.yml.

Using of armv8 instead of native arm64 does not match other tools and requires values mapping in build scripts.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SSE4commented, Jun 23, 2022

ARMv8 is an official architecture name, it’s used by official ARM documents (specificstions). AArch64 is an execution state (another one is AArch32). A64 is an instruction set corresponding to the AArch64. ARM64 is not an official name, but it’s wide-spread and synonimous to ARMv8. used in Apple world, as well as by some Linux distros. I understand it introduces a lot of headache and confusion, but I would stick to an officiial name, as it’s used besides Apple, but also for Linux, Windows, Android, etc.

0reactions
DmitrySokolovcommented, Jun 24, 2022

thanks for providing a concrete example.

It’s MWE. Actually, the usual method is to iterate through ${CMAKE_OSX_ARCHITECTURES}.

would not portable across systems

It should not be portable, it should be good enough to pass it to underlying native toolchain. Even on Windows it is good enough to pass vcvarsall.bat -host_arch=${CMAKE_SYSTEM_PROCESSOR}.

Other compilers on macOS

Which one? The vast majority use Apple-clang. It’s hard to use other compilers on macOS for other than “HelloWorld” apps.

or Android it mentions arm64-v8

Yep. Because it just pass it to underlying NDK.

The Qt mkspecs

Obsolete. The new Qt build system uses CMake, and follows CMake settings.

one would have to provide a mapping between …

Yep. We have to. Cause “You can’t just take it and pass it to …” ))

Read more comments on GitHub >

github_iconTop Results From Across the Web

Addressing Architectural Differences in Your macOS Code
Architectural differences between the two systems exist, and may cause your code to run incorrectly or crash. Use the following tips to identify...
Read more >
Java SDK Reporting Wrong Architecture on Mac M1
I have a strange java issue. I'm working on a MacBook Air and doing some Java development work.
Read more >
Why new Macs break your Docker build, and how to fix it
On a Mac Mini M1, however, things go wrong: ... ERROR: Could not find a version that satisfies the requirement filprofiler==2022.05.0 (from ...
Read more >
Docker Desktop release notes
Substantial performance improvements for macOS users with the option of enabling the ... Fixed a bug that showed incorrect values on used space...
Read more >
Managing ARM vs X86 Python on M1 Macs - Thinking Studio
Problem : Intel Optimisations now break x86 emulation support for ... Linux ARM # arm64 : M1 # x86_64 : X86 Linux or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found