# Fix some weird linker issue CAF build runs into. (fails to link -lc++abi) | # Fix some weird linker issue CAF build runs into. (fails to link -lc++abi) | ||||
RUN cp -prv /usr/lib/llvm-12/lib/libc++abi.so.1.0 /usr/lib/llvm-12/lib/libc++abi.so | RUN cp -prv /usr/lib/llvm-12/lib/libc++abi.so.1.0 /usr/lib/llvm-12/lib/libc++abi.so | ||||
COPY switch-to-latest-clang /usr/local/bin/switch-to-latest-clang | |||||
RUN chmod +x /usr/local/bin/switch-to-latest-clang | |||||
CMD "/bin/bash" | CMD "/bin/bash" |
libpng-dev libjpeg-dev libfreetype6-dev \ | libpng-dev libjpeg-dev libfreetype6-dev \ | ||||
libxrandr-dev libxinerama-dev libxi-dev \ | libxrandr-dev libxinerama-dev libxi-dev \ | ||||
libgtk2.0-dev libsdl2-dev | libgtk2.0-dev libsdl2-dev | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
impl: | impl: | ||||
make prep | make prep |
make package | make package | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
# TODO install boost from apt repo | # TODO install boost from apt repo | ||||
# if [[ -f CMakeCache.txt ]]; then rm CMakeCache.txt; fi | # if [[ -f CMakeCache.txt ]]; then rm CMakeCache.txt; fi | ||||
dpkg -i boost/pkg/*.deb | dpkg -i boost/pkg/*.deb |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
pushd boost && \ | pushd boost && \ | ||||
mkdir -p target && \ | mkdir -p target && \ | ||||
CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \ | CXX=$$(which c++) ./bootstrap.sh --prefix=$$PWD/target/ --with-toolset=clang && \ |
make package | make package | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
pushd actor-framework && \ | pushd actor-framework && \ | ||||
CXX="$(which c++)" ./configure --cxx-flags="-stdlib=libstdc++" --disable-shared-libs --prefix=$$PWD/caf_out && \ | CXX="$(which c++)" ./configure --cxx-flags="-stdlib=libstdc++" --disable-shared-libs --prefix=$$PWD/caf_out && \ | ||||
echo patch CMakeLists.txt ../caf-cmakefile.patch && \ | echo patch CMakeLists.txt ../caf-cmakefile.patch && \ |
apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev | apt-get install -y libpng-dev libjpeg-dev libfreetype6-dev | ||||
apt-get install -y libssl1.0-dev | apt-get install -y libssl1.0-dev | ||||
# rm -rf crtmpserver/builders/cmake/CMakeCache.txt | # rm -rf crtmpserver/builders/cmake/CMakeCache.txt | ||||
# switch to clang 7, crtmpserver build broken with g++ | |||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
# switch to clang, crtmpserver build broken with g++ | |||||
switch-to-latest-clang | |||||
pushd crtmpserver/builders/cmake && \ | pushd crtmpserver/builders/cmake && \ | ||||
make clean || true && \ | make clean || true && \ | ||||
rm -rf CMakeCache.txt && \ | rm -rf CMakeCache.txt && \ |
impl: | impl: | ||||
patch FastPFor/CMakeLists.txt libcpp.patch | patch FastPFor/CMakeLists.txt libcpp.patch | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
pushd FastPFor && \ | pushd FastPFor && \ | ||||
CXX=$$(which c++) cmake . && \ | CXX=$$(which c++) cmake . && \ | ||||
make -j $$(nproc) | make -j $$(nproc) |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
apt-get update && apt-get install libz-dev -y && \ | apt-get update && apt-get install libz-dev -y && \ | ||||
pushd fmt && \ | pushd fmt && \ | ||||
mkdir build && pushd build && \ | mkdir build && pushd build && \ |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
apt-get update && apt-get install libz-dev autoconf -y && \ | apt-get update && apt-get install libz-dev autoconf -y && \ | ||||
apt-get install -y libpng-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libtiff-dev libtiff5-dev libtiffxx5 && \ | apt-get install -y libpng-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libtiff-dev libtiff5-dev libtiffxx5 && \ | ||||
dpkg -i openexr/pkg/*.deb && \ | dpkg -i openexr/pkg/*.deb && \ |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
apt-get update && apt-get install libz-dev -y && \ | apt-get update && apt-get install libz-dev -y && \ | ||||
pushd openexr && \ | pushd openexr && \ | ||||
mkdir build && pushd build && \ | mkdir build && pushd build && \ |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
impl: | impl: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
apt-get update && apt-get install libz-dev -y && \ | apt-get update && apt-get install libz-dev -y && \ | ||||
pushd seasocks && \ | pushd seasocks && \ | ||||
mkdir build && pushd build && \ | mkdir build && pushd build && \ |
libgtk2.0-dev | libgtk2.0-dev | ||||
# extra needed | # extra needed | ||||
apt-get install -y libudev-dev libopenal-dev libflac-dev libvorbis-dev | apt-get install -y libudev-dev libopenal-dev libflac-dev libvorbis-dev | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
# static build | # static build | ||||
pushd SFML && \ | pushd SFML && \ | ||||
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/sfml_static -DBUILD_SHARED_LIBS=false . && \ | cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/sfml_static -DBUILD_SHARED_LIBS=false . && \ |
#!/bin/bash | |||||
set -ex | |||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-12 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-12 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-12 40 |
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
build: | build: | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40 | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40 | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40 | |||||
switch-to-latest-clang | |||||
apt-get update | apt-get update | ||||
apt-get install pkg-config python2.7 -y | apt-get install pkg-config python2.7 -y | ||||
cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts | cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts |