2023-05-12 01:34:32 +02:00
|
|
|
#!/bin/bash -ex
|
|
|
|
# Ubuntu 22.04
|
|
|
|
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
dpkg --add-architecture i386
|
|
|
|
sed 's/deb http/deb \[arch=amd64,i386\] http/' -i /etc/apt/sources.list
|
|
|
|
|
|
|
|
apt-get --assume-yes update
|
|
|
|
|
|
|
|
# Install and bypass a bug in the cross-platform libc++ packages
|
2023-05-14 00:54:41 +02:00
|
|
|
apt-get --assume-yes autoremove "libc++-14-dev:*" "libc++abi-14-dev:*" "libc++1-14:*" "libc++abi1-14:*" "libunwind-14-dev:*" "libunwind-14:*" || true
|
|
|
|
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev:i386 libc++abi-14-dev:i386 libc++1-14:i386 libc++abi1-14:i386 libunwind-14-dev:i386 libunwind-14:i386
|
2023-05-14 11:30:20 +02:00
|
|
|
# shellcheck disable=SC2016
|
|
|
|
find /usr/lib/i386-linux-gnu/ -lname "*llvm-14*" -print0 | xargs -0 -i sh -c 'cp --remove-destination $(readlink -e "{}") "{}" '
|
2023-05-14 01:19:06 +02:00
|
|
|
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install clang-14 libc++-14-dev libc++abi-14-dev libc++1-14 libc++abi1-14 libunwind-14-dev libunwind-14
|
2023-05-12 01:34:32 +02:00
|
|
|
# End libc++ packages bugfix
|
|
|
|
|
|
|
|
# Add i386 common files
|
2023-05-14 01:19:06 +02:00
|
|
|
apt-get download libclang-common-14-dev:i386
|
|
|
|
dpkg-deb -xv libclang-common-14-dev_*_i386.deb /
|
2023-05-12 01:34:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Install dependencies
|
2023-05-12 01:51:21 +02:00
|
|
|
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libssl-dev:i386 zlib1g-dev:i386 openjdk-17-jdk-headless:i386 libgcc-12-dev:i386 libc6-dev:i386
|