From ee0537c0f51db073a8eb09a2ba9c706e3491d0c2 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Wed, 2 Jul 2025 00:12:54 +0200 Subject: [PATCH] Build scripts: fixed image build errors --- release_scripts/images/ubuntu/Dockerfile | 2 +- release_scripts/images/ubuntu/prepare.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/release_scripts/images/ubuntu/Dockerfile b/release_scripts/images/ubuntu/Dockerfile index 266fe6f..2d4f537 100644 --- a/release_scripts/images/ubuntu/Dockerfile +++ b/release_scripts/images/ubuntu/Dockerfile @@ -1,3 +1,3 @@ -FROM ubuntu:latest +FROM ubuntu:24.04 ADD prepare.sh / RUN /prepare.sh diff --git a/release_scripts/images/ubuntu/prepare.sh b/release_scripts/images/ubuntu/prepare.sh index aea1faa..231d3b1 100755 --- a/release_scripts/images/ubuntu/prepare.sh +++ b/release_scripts/images/ubuntu/prepare.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -e # Software versions to install @@ -308,10 +309,16 @@ make install-gcc echo "Install mingw-w64 CRT" +# Need to do it two times for some reason - first time without pthreads, or it will fail to link. +cd /root/mingw-w64-v$MINGW_VERSION +CFLAGS='-O2' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/x86_64-w64-mingw32 +make -j$(nproc) +make -j$(nproc) install + cd /root/mingw-w64-v$MINGW_VERSION CFLAGS='-O2' ./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/x86_64-w64-mingw32 --with-libraries=winpthreads -make -make install +make -j$(nproc) +make -j$(nproc) install echo "Finish installing GCC for x86_64-w64-mingw32" @@ -328,7 +335,6 @@ CFLAGS='-O2' ../glibc-$GLIBC_VERSION/configure --build=x86_64-pc-linux-gnu --hos make -j$(nproc) install-bootstrap-headers=yes install-headers make -j$(nproc) csu/subdir_lib -mkdir /usr/local/x86_64-pc-linux-gnu/lib install csu/crt1.o csu/crti.o csu/crtn.o /usr/local/x86_64-pc-linux-gnu/lib gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /usr/local/x86_64-pc-linux-gnu/lib/libc.so