From 9657d71fbd2cd253a0bb9f505a8719ad91934638 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 1 Feb 2022 16:25:46 +0800 Subject: [PATCH] Build GCC 9 environment for SteamRT --- tool/quick_start/docker/README.md | 48 +++++++++++++++++-- .../ryzombuild_scout_gcc5_x86_64/Dockerfile | 14 ++++++ .../ryzombuild_scout_gcc9_x86_64/Dockerfile | 34 +++++++++++++ .../docker/ryzombuild_scout_x86_64/Dockerfile | 6 +++ 4 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 tool/quick_start/docker/ryzombuild_scout_gcc5_x86_64/Dockerfile create mode 100644 tool/quick_start/docker/ryzombuild_scout_gcc9_x86_64/Dockerfile create mode 100644 tool/quick_start/docker/ryzombuild_scout_x86_64/Dockerfile diff --git a/tool/quick_start/docker/README.md b/tool/quick_start/docker/README.md index 25f912080..bb1340a09 100644 --- a/tool/quick_start/docker/README.md +++ b/tool/quick_start/docker/README.md @@ -12,10 +12,10 @@ Just build the Docker images like this. The quick start scripts will generate th ``` docker build -t "ryzombuild_bionic_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_bionic_x86_64\Dockerfile" Y:\ryzomcore4\code -``` - -``` docker build -t "ryzombuild_focal_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_focal_x86_64\Dockerfile" Y:\ryzomcore4\code +docker build -t "ryzombuild_scout_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_x86_64\Dockerfile" Y:\ryzomcore4\code +docker build -t "ryzombuild_scout_gcc5_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_gcc5_x86_64\Dockerfile" Y:\ryzomcore4\code +docker build -t "ryzombuild_scout_gcc9_x86_64" -f "Y:\ryzomcore4\code\tool\quick_start\docker\ryzombuild_scout_gcc9_x86_64\Dockerfile" Y:\ryzomcore4\code ``` ## Prepare Steam Runtime @@ -46,9 +46,47 @@ docker run --rm ryzombuild_focal_x86_64 cmake --version docker run --rm steamrt_scout_amd64 cmake --version ``` +## Check GCC Version + +``` +docker run --rm ryzombuild_bionic_x86_64 gcc -v +docker run --rm ryzombuild_focal_x86_64 gcc -v +docker run --rm ryzombuild_scout_x86_64 gcc -v +docker run --rm ryzombuild_scout_gcc5_x86_64 gcc -v +docker run --rm ryzombuild_scout_gcc9_x86_64 gcc -v +docker run --rm ryzombuild_scout_gcc9_x86_64 cc -v +docker run --rm ryzombuild_scout_gcc9_x86_64 c++ -v +``` + ## Build Client ``` -docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter/_Base/Cache --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ../code -docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter/_Base/Cache --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 ninja -j9 +docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ../code +docker run --rm -v ryzombuild_focal_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_focal" ryzombuild_focal_x86_64 ninja -j9 +``` + +``` +docker run --rm -v ryzombuild_bionic_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_bionic" ryzombuild_bionic_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ../code +docker run --rm -v ryzombuild_bionic_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_bionic" ryzombuild_bionic_x86_64 ninja -j9 +``` + +## Test Steam Runtime directly with GCC 4.8.4 + +``` +docker run --rm -v steamrt_scout_amd64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout" steamrt_scout_amd64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_SSE3=OFF ../code +docker run --rm -v steamrt_scout_amd64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout" steamrt_scout_amd64 ninja -j9 +``` + +## Test Steam Runtime with GCC 5 + +``` +docker run --rm -v ryzombuild_scout_gcc5_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc5" ryzombuild_scout_gcc5_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_SSE3=OFF ../code +docker run --rm -v ryzombuild_scout_gcc5_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc5" ryzombuild_scout_gcc5_x86_64 ninja -j9 +``` + +## Test Steam Runtime with GCC 9 + +``` +docker run --rm -v ryzombuild_scout_gcc9_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9" ryzombuild_scout_gcc9_x86_64 cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_JOBS_NUMBER=9 -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_PATCH=ON -DWITH_RYZOM_TOOLS=OFF -DWITH_NEL_TOOLS=OFF -DWITH_NELNS=OFF -DWITH_QT5=OFF -DWITH_LIBGSF=OFF -DFINAL_VERSION=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_SSE3=OFF ../code +docker run --rm -v ryzombuild_scout_gcc9_x86_64_hunter:/root/.hunter --mount "type=bind,source=Y:\ryzomcore4,target=/mnt/nel" --workdir "/mnt/nel/build_client_scout_gcc9" ryzombuild_scout_gcc9_x86_64 ninja -j9 ``` diff --git a/tool/quick_start/docker/ryzombuild_scout_gcc5_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_gcc5_x86_64/Dockerfile new file mode 100644 index 000000000..60e6dea74 --- /dev/null +++ b/tool/quick_start/docker/ryzombuild_scout_gcc5_x86_64/Dockerfile @@ -0,0 +1,14 @@ +FROM --platform=linux/amd64 steamrt_scout_amd64:latest +MAINTAINER Ryzom Core + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 50 \ + && update-alternatives --set gcc "/usr/bin/gcc-5" \ + && update-alternatives --set g++ "/usr/bin/g++-5" + +RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold 50 \ + && update-alternatives --set ld "/usr/bin/ld.gold" + +RUN mkdir -p /mnt/nel + +WORKDIR /mnt/nel diff --git a/tool/quick_start/docker/ryzombuild_scout_gcc9_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_gcc9_x86_64/Dockerfile new file mode 100644 index 000000000..636c030ad --- /dev/null +++ b/tool/quick_start/docker/ryzombuild_scout_gcc9_x86_64/Dockerfile @@ -0,0 +1,34 @@ +FROM --platform=linux/amd64 steamrt_scout_amd64:latest +MAINTAINER Ryzom Core + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 \ + && update-alternatives --set gcc "/usr/bin/gcc-9" \ + && update-alternatives --set g++ "/usr/bin/g++-9" + +RUN rm /usr/bin/cc \ + && ln -s /usr/lib/gcc-9/bin/gcc-9 /usr/bin/cc + +RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.gold-2.30 90 \ + && update-alternatives --set ld "/usr/bin/ld.gold-2.30" + +RUN rm /usr/bin/addr2line && ln -s /usr/bin/addr2line-2.30 /usr/bin/addr2line \ + && rm /usr/bin/ar && ln -s /usr/bin/ar-2.30 /usr/bin/ar \ + && rm /usr/bin/as && ln -s /usr/bin/as-2.30 /usr/bin/as \ + && rm /usr/bin/c++filt && ln -s /usr/bin/c++filt-2.30 /usr/bin/c++filt \ + && ln -s /usr/bin/dwp-2.30 /usr/bin/dwp \ + && rm /usr/bin/elfedit && ln -s /usr/bin/elfedit-2.30 /usr/bin/elfedit \ + && rm /usr/bin/gold && ln -s /usr/bin/gold-2.30 /usr/bin/gold \ + && rm /usr/bin/gprof && ln -s /usr/bin/gprof-2.30 /usr/bin/gprof \ + && rm /usr/bin/nm && ln -s /usr/bin/nm-2.30 /usr/bin/nm \ + && rm /usr/bin/objcopy && ln -s /usr/bin/objcopy-2.30 /usr/bin/objcopy \ + && rm /usr/bin/objdump && ln -s /usr/bin/objdump-2.30 /usr/bin/objdump \ + && rm /usr/bin/ranlib && ln -s /usr/bin/ranlib-2.30 /usr/bin/ranlib \ + && rm /usr/bin/readelf && ln -s /usr/bin/readelf-2.30 /usr/bin/readelf \ + && rm /usr/bin/size && ln -s /usr/bin/size-2.30 /usr/bin/size \ + && rm /usr/bin/strings && ln -s /usr/bin/strings-2.30 /usr/bin/strings \ + && rm /usr/bin/strip && ln -s /usr/bin/strip-2.30 /usr/bin/strip + +RUN mkdir -p /mnt/nel + +WORKDIR /mnt/nel diff --git a/tool/quick_start/docker/ryzombuild_scout_x86_64/Dockerfile b/tool/quick_start/docker/ryzombuild_scout_x86_64/Dockerfile new file mode 100644 index 000000000..817ce92c8 --- /dev/null +++ b/tool/quick_start/docker/ryzombuild_scout_x86_64/Dockerfile @@ -0,0 +1,6 @@ +FROM --platform=linux/amd64 steamrt_scout_amd64:latest +MAINTAINER Ryzom Core + +RUN mkdir -p /mnt/nel + +WORKDIR /mnt/nel