From f882a542a3eb24e78e51aa6410a3a67c0efb4e97 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 30 Oct 2018 13:22:15 +0100 Subject: gitlab-ci: arm64 cross compiling First I tried to build in a full sysroot, but I didn't figure out why ld never found the libraries (this was on fedora, which might have been part of the problem - if you just need a toolchain for kernel corss-building fedora is perfectly fine). Then I tried using debian's multiarch stuff, which worked a lot better, except there's some minor gotchas: - some libraries conflict and can't be multi-arch installed - some libraries are buggy and cause conflicts when installing - pkgconfig and ld get confused with some other libraries and pick the first one they find (i.e. the x86_64 one, not the arm64 one). That means we need a new docker image with just the cross libaries installed as -dev packages, and none of the native ones. Next up I tried to run the tests. Meson has really nice support for an exe wrapper, and qemu happily runs arm64 on x86_64. With that I managed to run some tests successfully (it's not even that slow!). But most are run through a script, and the script doesn't know about the exe wrapper and hence fails miserably. I discussed this a bit with Dylan and he filed an upstream meson issue: https://github.com/mesonbuild/meson/issues/4427#issuecomment-433553689 Another option would be to use binfmt-misc handling (which works neatly locally), but on the runners we have I can't control that. Maybe I can beg Daniel Stone ... For not let's just mark this stage as optional and that failures are allowed. v2: Use the new gitlab 1.4 feature to rebuild docker images when necessary. Cc: Sean Paul Cc: Eric Anholt Cc: Dylan Baker Cc: Daniel Stone Reviewed-by: Eric Anholt (v1) Reviewed-by: Petri Latvala (v1) Signed-off-by: Daniel Vetter --- Dockerfile.debian-arm64 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Dockerfile.debian-arm64 (limited to 'Dockerfile.debian-arm64') diff --git a/Dockerfile.debian-arm64 b/Dockerfile.debian-arm64 new file mode 100644 index 00000000..20c2e8b3 --- /dev/null +++ b/Dockerfile.debian-arm64 @@ -0,0 +1,46 @@ +FROM debian:stretch-backports + +RUN apt-get update +RUN apt-get install -y \ + flex \ + bison \ + pkg-config \ + x11proto-dri2-dev \ + python-docutils \ + valgrind \ + peg + +RUN dpkg --add-architecture arm64 +RUN apt-get update +RUN apt-get install -y \ + gcc-aarch64-linux-gnu \ + libpciaccess-dev:arm64 \ + libkmod-dev:arm64 \ + libprocps-dev:arm64 \ + libunwind-dev:arm64 \ + libdw-dev:arm64 \ + zlib1g-dev:arm64 \ + liblzma-dev:arm64 \ + libssl-dev:arm64 \ + libcairo-dev:arm64 \ + libpixman-1-dev:arm64 \ + libudev-dev:arm64 \ + libgsl-dev:arm64 \ + libasound2-dev:arm64 \ + libjson-c-dev:arm64 \ + libcurl4-openssl-dev:arm64 \ + libxrandr-dev:arm64 \ + libxv-dev:arm64 + +RUN apt-get install -t stretch-backports -y \ + meson \ + libdrm-dev:arm64 \ + qemu-user + +# autotools build deps +RUN apt-get install -y \ + autoconf \ + automake \ + xutils-dev \ + libtool \ + make -- cgit v1.2.3