From ad9ba381e365905f756b6745cd555372cb30965a Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 17 Sep 2023 13:39:48 +0200 Subject: [PATCH] Crystal: Force using PCRE (legacy) for cross-compilation PCRE2 support was added in Crystal v1.7.0, and used by default in Crystal v1.8.0. As we don't want to have to guess what version of the PCRE was used on the build host, force the use of the legacy version until we drop support for older versions of Crystal. --- Makefile | 10 +++++----- docker/Dockerfile.arm64-musl-cross | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9de8f9f9..cc15038b 100644 --- a/Makefile +++ b/Makefile @@ -77,25 +77,25 @@ run: invidious # - armhf (arm-linux-gnueabihf) invidious-cross-amd64-glibc: - crystal build src/invidious.cr $(FLAGS) -Dskip_videojs_download \ + crystal build src/invidious.cr $(FLAGS) -Duse_pcre -Dskip_videojs_download \ --cross-compile --target='x86_64-linux-gnu' -o invidious-amd64-glibc invidious-cross-amd64-musl: - crystal build src/invidious.cr $(FLAGS) -Dskip_videojs_download \ + crystal build src/invidious.cr $(FLAGS) -Duse_pcre -Dskip_videojs_download \ --cross-compile --target='x86_64-linux-musl' -o invidious-amd64-musl invidious-cross-arm64-glibc: - crystal build src/invidious.cr $(FLAGS) -Dskip_videojs_download \ + crystal build src/invidious.cr $(FLAGS) -Duse_pcre -Dskip_videojs_download \ --cross-compile --target='aarch64-linux-gnu' -o invidious-arm64-glibc invidious-cross-arm64-musl: - crystal build src/invidious.cr $(FLAGS) -Dskip_videojs_download \ + crystal build src/invidious.cr $(FLAGS) -Duse_pcre -Dskip_videojs_download \ --cross-compile --target='aarch64-linux-musl' -o invidious-arm64-musl invidious-cross-armhf: - crystal build src/invidious.cr $(FLAGS) -Dskip_videojs_download \ + crystal build src/invidious.cr $(FLAGS) -Duse_pcre -Dskip_videojs_download \ --cross-compile --target='arm-linux-gnueabihf' -o invidious-armhf diff --git a/docker/Dockerfile.arm64-musl-cross b/docker/Dockerfile.arm64-musl-cross index 5dec46db..3689f631 100644 --- a/docker/Dockerfile.arm64-musl-cross +++ b/docker/Dockerfile.arm64-musl-cross @@ -1,7 +1,7 @@ FROM alpine:3.18 AS builder RUN apk add --no-cache gcc make yaml-static libxml2-static sqlite-static zlib-static \ - xz-static openssl-libs-static openssl-dev pcre-dev gc-dev libevent-static musl-dev + xz-static openssl-libs-static openssl-dev pcre-dev pcre2-dev gc-dev libevent-static musl-dev ARG release