Skip to content

Commit

Permalink
Crystal: Force using PCRE (legacy) for cross-compilation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SamantazFox committed Aug 17, 2024
1 parent ea176ab commit e2866b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,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


Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.arm64-musl-cross
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit e2866b4

Please sign in to comment.