Hi,
I’m trying to compile and build an ITKMontage python3.9 wheel for aarch64 on a raspberry pi 4 using ITKPythonPackage as described here Prerequisites — ITKPythonPackage documentation
I’ve checked out the release branch of ITKPythonPackage and set the following env variables
MANYLINUX_VERSION=_2_28
TARGET_ARCH=aarch64
NO_SUDO=1 #This seems to avoid that the GPG error, shown in the output, causes any problems
Everything seems to work fine all the way until it’s time to run the cmake where it complains that the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER isn’t correct.
Running “which gcc” and “which g++” in the container shows that toolset 11 is installed instead of 12 as in error output
/opt/rh/gcc-toolset-11/root/usr/bin/g++
/opt/rh/gcc-toolset-11/root/usr/bin/gcc
I’ve tried to set the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER variables to the correct paths, both with export and as -D options without any noticable difference.
Any ideas what I’m doing wrong?
Also, has anyone built an ITKMontage wheel for aarch64 and can confirm that it’s possible?
Here’s the full output from running
./ITKPythonPackage/scripts/dockcross-manylinux-build-module-wheels.sh cp39
from the ITKMontage root.
Install aarch64 architecture emulation tools to perform build for ARM platform
{
"supported": [
"linux/arm64",
"linux/amd64",
"linux/riscv64",
"linux/ppc64le",
"linux/s390x",
"linux/386",
"linux/mips64le",
"linux/mips64",
"linux/arm/v7",
"linux/arm/v6"
],
"emulators": [
"python3.11",
"qemu-i386",
"qemu-mips64",
"qemu-mips64el",
"qemu-ppc64le",
"qemu-riscv64",
"qemu-s390x",
"qemu-x86_64"
]
}
AlmaLinux 8 - BaseOS 2.5 MB/s | 4.1 MB 00:01
AlmaLinux 8 - AppStream 4.4 MB/s | 10 MB 00:02
AlmaLinux 8 - Extras 20 kB/s | 19 kB 00:00
AlmaLinux 8 - PowerTools 2.0 MB/s | 2.2 MB 00:01
Last metadata expiration check: 0:00:01 ago on Sun 18 Feb 2024 10:31:12 PM UTC.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
sudo aarch64 1.9.5p2-1.el8_9 baseos 1.0 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 1.0 M
Installed size: 4.5 M
Downloading Packages:
sudo-1.9.5p2-1.el8_9.aarch64.rpm 2.1 MB/s | 1.0 MB 00:00
--------------------------------------------------------------------------------
Total 931 kB/s | 1.0 MB 00:01
AlmaLinux 8 - BaseOS 3.3 MB/s | 3.4 kB 00:00
Importing GPG key 0xC21AD6EA:
Userid : "AlmaLinux <packager@almalinux.org>"
Fingerprint: E53C F5EF 91CE B0AD 1812 ECB8 51D6 647E C21A D6EA
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
Key imported successfully
Import of key(s) didn't help, wrong key(s)?
Public key for sudo-1.9.5p2-1.el8_9.aarch64.rpm is not installed. Failing package is: sudo-1.9.5p2-1.el8_9.aarch64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED
Collecting ninja==1.11.1
Downloading ninja-1.11.1-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.7/155.7 kB 2.1 MB/s eta 0:00:00
Collecting scikit-build==0.17.6
Downloading scikit_build-0.17.6-py3-none-any.whl (84 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.3/84.3 kB 3.3 MB/s eta 0:00:00
Requirement already satisfied: wheel>=0.32.0 in /opt/_internal/cpython-3.9.15/lib/python3.9/site-packages (from scikit-build==0.17.6->-r /ITKPythonPackage/requirements-dev.txt (line 2)) (0.38.4)
Requirement already satisfied: setuptools>=42.0.0 in /opt/_internal/cpython-3.9.15/lib/python3.9/site-packages (from scikit-build==0.17.6->-r /ITKPythonPackage/requirements-dev.txt (line 2)) (65.6.0)
Collecting distro
Downloading distro-1.9.0-py3-none-any.whl (20 kB)
Requirement already satisfied: packaging in /opt/_internal/cpython-3.9.15/lib/python3.9/site-packages (from scikit-build==0.17.6->-r /ITKPythonPackage/requirements-dev.txt (line 2)) (21.3)
Requirement already satisfied: tomli in /opt/_internal/cpython-3.9.15/lib/python3.9/site-packages (from scikit-build==0.17.6->-r /ITKPythonPackage/requirements-dev.txt (line 2)) (2.0.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/_internal/cpython-3.9.15/lib/python3.9/site-packages (from packaging->scikit-build==0.17.6->-r /ITKPythonPackage/requirements-dev.txt (line 2)) (3.0.9)
Installing collected packages: ninja, distro, scikit-build
Successfully installed distro-1.9.0 ninja-1.11.1 scikit-build-0.17.6
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
[notice] A new release of pip available: 22.3.1 -> 24.0
[notice] To update, run: /opt/python/cp39-cp39/bin/python -m pip install --upgrade pip
++++ dirname /ITKPythonPackage/scripts/internal/manylinux-build-module-wheels.sh
+++ cd /ITKPythonPackage/scripts/internal
+++ pwd
++ script_dir=/ITKPythonPackage/scripts/internal
++ [[ 1 -eq 0 ]]
++ PYBINARIES=()
++ for version in "$@"
++ PYBINARIES+=(/opt/python/*${version}*/bin)
++ case $(uname -m) in
+++ uname -m
++ ARCH=aarch64
++ export PATH=/work/tools/doxygen-1.8.16/bin:/opt/rh/gcc-toolset-11/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/work/tools/doxygen-1.8.16/bin:/opt/rh/gcc-toolset-11/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ case $(uname -m) in
+++ uname -m
++ ARCH=aarch64
++ type doxygen
++ type ninja
++ test '!' -d ninja
++ pushd ninja
/work/ninja /work
++ git checkout release
Already on 'release'
Your branch is up to date with 'origin/release'.
++ cmake -Bbuild-cmake -H.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:6 (project):
The CMAKE_C_COMPILER:
/opt/rh/gcc-toolset-12/root/usr/bin/cc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:6 (project):
The CMAKE_CXX_COMPILER:
/opt/rh/gcc-toolset-12/root/usr/bin/c++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/work/ninja/build-cmake/CMakeFiles/CMakeOutput.log".
See also "/work/ninja/build-cmake/CMakeFiles/CMakeError.log".