Open jens-ghc opened 1 year ago
Hi @jens-totemic ,
this seems an old raised issue, see https://github.com/conan-io/conan/issues/8025. @memsharded do you know why in generated settings.yml (from https://github.com/conan-io/conan/blob/c3ac30a4118e022303662731d540b8f9a3d2799a/conans/client/conf/__init__.py#L58) we have armv8 instead of aarch64 as in https://wiki.debian.org/Multiarch/Tuples?
We see also in profile detection, https://github.com/conan-io/conan/blob/c3ac30a4118e022303662731d540b8f9a3d2799a/conans/client/conf/detect.py#L310, that aarch64 is mapped to armv8.
With meson build helper, we see a map (https://github.com/conan-io/conan/blob/c3ac30a4118e022303662731d540b8f9a3d2799a/conan/tools/meson/helpers.py#L32) between conan arch values and meson cpu_family (https://mesonbuild.com/Reference-tables.html#cpu-families).
for cpu_features recipe we see a test to update CMAKE_SYSTEM_PROCESSOR (https://github.com/conan-io/conan-center-index/blob/master/recipes/cpu_features/all/conanfile.py#L54) done by @SpaceIm .
@memsharded what do you think about to make similar mapping to cmake helpers similar to what is done for meson helper, instead of having each recipe have a test to update the CMAKE_SYSTEM_PROCESSOR?
Regards.
Description
When compiling cpuinfo for arm 64 platforms, conan requires the target
arch
to be set toarmv8
. Unfortunately, when this is passed tocpuinfo
it treatsarmv8
as an arm 32bit platform - it expects the target platform to be set toaarch64
for 64 bit support. But this is not possible in conan, since this is not a valid setting forarch
. As a result, the recipe tries to compile for the wrong architecture and failing with error messages.Package and Environment Details
Conan profile
Configuration (profile_host): [settings] arch=armv8 build_type=Debug compiler=gcc compiler.libcxx=libstdc++11 compiler.version=8 os=Linux ne-10:build_type=Release sensor-processor:build_type=Release tensorflow-lite:build_type=Release
Configuration (profile_build): [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=8 os=Linux [options] [build_requires] [env] AR=x86_64-linux-gnu-ar AS=x86_64-linux-gnu-as CC=x86_64-linux-gnu-gcc CHOST=x86_64-linux-gnu CXX=x86_64-linux-gnu-g++-8 LD=x86_64-linux-gnu-ld NM=x86_64-linux-gnu-nm RANLIB=x86_64-linux-gnu-ranlib STRIP=x86_64-linux-gnu-strip
Steps to reproduce
The problem is caused by these lines in
CMakeLists
of the recipe. When using the conan arm profile for 64 bit systems,CMAKE_SYSTEM_PROCESSOR
is set toarmv8
but it needs to beaarch64
for this check to work properly.In order to fix this, would it be possible to modify the cpuinfo recipe to define
CMAKE_SYSTEM_PROCESSOR
asaarch64
whenever the conan architecture is set toarmv8
?Logs
Click to expand log
``` cpuinfo/cci.20220228: WARN: Build folder is dirty, removing it: /home/conan/.conan/data/cpuinfo/cci.20220228/_/_/build/d5408b8da1880c6460245fdb958d338f5c896d80 cpuinfo/cci.20220228: Copying sources to build folder cpuinfo/cci.20220228: Building your package in /home/conan/.conan/data/cpuinfo/cci.20220228/_/_/build/d5408b8da1880c6460245fdb958d338f5c896d80 cpuinfo/cci.20220228: Generator txt created conanbuildinfo.txt cpuinfo/cci.20220228: Calling generate() cpuinfo/cci.20220228: Preset 'debug' added to CMakePresets.json. Invoke it manually using 'cmake --preset debug' cpuinfo/cci.20220228: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake