On Wed, Aug 13, 2025 at 12:54:04AM +0100, Colin Watson wrote:
There are two problems here. Firstly, it misdetects the architecture
as arm64 because of the running kernel (this code is new in 3.0.3):
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|armv[89].?|ARM64)$" OR
CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64" OR "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(MI_ARCH "arm64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv[34567]|ARM)$")
set(MI_ARCH "arm32")
(That seems to have various other possible consequences; grep for
MI_ARCH_ARM64.
In fact, despite the name appearing similar to the cmake-level MI_ARCH,
MI_ARCH_ARM64 is set in include/mimalloc/bits.h based on preprocessor
definitions such as __aarch64__, which is probably fine. And overriding
CMAKE_SYSTEM_PROCESSOR doesn't seem to be easy; I tried a conditional
-DCMAKE_SYSTEM_PROCESSOR=armv7l, and that was ignored.
So I'm actually inclined to just call this bug done with my previous
commit, although I still want to investigate
https://bugs.debian.org/1106879 before uploading it.
I filed https://bugs.debian.org/1110961 for a possible improvement in
debhelper.
And of course this sort of checking strategy breaks
cross-builds as well.)
My mistake; debhelper sets CMAKE_SYSTEM_PROCESSOR in that case, or at
least tries, and it's documented
(https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html)
as being cross-aware.
--
Colin Watson (he/him) [cjwat...@debian.org]