Skip to content

Instantly share code, notes, and snippets.

@valgur
Last active February 16, 2025 17:45
Minimal cross-compilation environment for gcc-13-aarch64-linux-gnu
set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
FROM ubuntu:24.10 AS tools
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-13 \
g++-13 \
gcc-13-aarch64-linux-gnu \
g++-13-aarch64-linux-gnu \
binutils-aarch64-linux-gnu \
make \
cpp \
python3 \
python3-pip \
git
RUN pip install -U conan cmake==3.15.3.post1 --break-system-packages
RUN useradd -m -s /bin/bash user
USER user
FROM tools AS code
RUN git clone https://github.com/valgur/conan-center-index.git /home/user/cci
RUN conan remote add cci-valgur /home/user/cci --type local-recipes-index
WORKDIR /home/user/cci/recipes
ARG CCI_BRANCH=6f331f0ace1b20b89c5f2114d49b3a0bf3584955
RUN cd /home/user/cci && git fetch --all && git checkout $CCI_BRANCH
ADD global.conf /home/user/.conan2/global.conf
ADD remotes.json /home/user/.conan2/remotes.json
ADD gcc-13 /home/user/.conan2/profiles/gcc-14
ADD gcc-13-armv8 /home/user/.conan2/profiles/gcc-14-armv8
ADD armv8_toolchain.cmake /home/user/.conan2/armv8_toolchain.cmake
CMD ["/bin/bash"]
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
bear/*: compiler.cppstd=17
ccfits/*: compiler.cppstd=14
crashpad/*: compiler.cppstd=17
dataframe/*: compiler.cppstd=23
embag/*: compiler.cppstd=17
fixed_math/*: compiler.cppstd=gnu23
g2o/*: compiler.cppstd=17
glaze/*: compiler.cppstd=23
innoextract/*: compiler.cppstd=14
keystone/*: compiler.cppstd=14
libigl/*: compiler.cppstd=17
libsass/*: compiler.cppstd=17
log4cplus/*: compiler.cppstd=14
matplotplusplus/*: compiler.cppstd=17
mp-units/*: compiler.cppstd=23
qt/*: compiler.cppstd=gnu20
resiprocate/*: compiler.cppstd=17
scc/*: compiler.cppstd=17
seadex-essentials/*: compiler.cppstd=17
systemc-cci/*: compiler.cppstd=17
vtk/*: compiler.cppstd=17
[conf]
tools.build:compiler_executables={'c': 'gcc-13', 'cpp': 'g++-13'}
[replace_requires]
xorg/system: xorg/1.8.10
opengl/system: libglvnd/1.7.0
egl/system: libglvnd/1.7.0
glu/system: mesa-glu/9.0.3
libudev/system: libudev/255.13
[options]
*/*:use_xorg_system=False
[settings]
arch=armv8
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
bear/*: compiler.cppstd=17
ccfits/*: compiler.cppstd=14
crashpad/*: compiler.cppstd=17
dataframe/*: compiler.cppstd=23
embag/*: compiler.cppstd=17
fixed_math/*: compiler.cppstd=gnu23
g2o/*: compiler.cppstd=17
glaze/*: compiler.cppstd=23
innoextract/*: compiler.cppstd=14
keystone/*: compiler.cppstd=14
libigl/*: compiler.cppstd=17
libsass/*: compiler.cppstd=17
log4cplus/*: compiler.cppstd=14
matplotplusplus/*: compiler.cppstd=17
mp-units/*: compiler.cppstd=23
qt/*: compiler.cppstd=gnu20
resiprocate/*: compiler.cppstd=17
scc/*: compiler.cppstd=17
seadex-essentials/*: compiler.cppstd=17
systemc-cci/*: compiler.cppstd=17
vtk/*: compiler.cppstd=17
[conf]
tools.build:compiler_executables={'c': 'aarch64-linux-gnu-gcc-13', 'cpp': 'aarch64-linux-gnu-g++-13', 'as': 'aarch64-linux-gnu-as', 'strip': 'aarch64-linux-gnu-strip'}
tools.cmake.cmaketoolchain:user_toolchain=['/home/user/.conan2/armv8_toolchain.cmake']
# tools.build:sysroot=/usr/aarch64-linux-gnu
[replace_requires]
xorg/system: xorg/1.8.10
opengl/system: libglvnd/1.7.0
egl/system: libglvnd/1.7.0
glu/system: mesa-glu/9.0.3
libudev/system: libudev/255.13
[options]
*/*:use_xorg_system=False
core:default_profile=gcc-13-armv8
core:default_build_profile=gcc-13
core.download:download_cache = /home/user/.conan2/downloads
core.sources:download_cache = /home/user/.conan2/downloads
{
"remotes": [
{
"name": "cci-valgur",
"url": "/home/user/cci",
"verify_ssl": true,
"remote_type": "local-recipes-index"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment