From 02baef3bfa1b5fbcedc7e855a2e36c2f0e08a8e1 Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 10:43:21 +0100 Subject: [PATCH 01/10] Update Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index 25af4567c..559547663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,6 +50,18 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ + # build solc-v0.5.14 + git checkout v0.5.14; \ + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + # build solc faster + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.5.14; \ + /root/.solcx/solc-v0.5.14 --version | grep 'Version: 0.5.14+commit.01f1aaa4' || (echo "Incorrect solc-v0.5.14 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ fi From 9f26bb4d63ee05e933b3febe2908d935b3da47ec Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 11:35:16 +0100 Subject: [PATCH 02/10] Update Dockerfile --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Dockerfile b/Dockerfile index 559547663..622554f6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,6 +129,27 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ + # build solc-v0.8.6 + git checkout v0.8.6; \ + # the compiler throws warnings when compiling this version, and the warnings are treated as errors. + # we disable treating the warnings as errors, unless the build doesn't succeed + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + # there is no sudo in the container, but we are under root so we do not need it + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + # there is a missed header in this version - we add it so that the code compiles + grep -rl '#include ' ./liblangutil/SourceLocation.h | xargs sed -i 's/#include /#include \n#include /g'; \ + # there is a missed namespace in this version - we add it so that the code compiles + grep -rl 'size_t' ./tools/yulPhaser/PairSelections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + # there is a missed namespace in this version - we add it so that the code compiles + grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + # build solc faster + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.8.6; \ + /root/.solcx/solc-v0.8.6 --version | grep 'Version: 0.8.6+commit.11564f7e' || (echo "Incorrect solc-v0.8.6 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ fi RUN if [ "$TARGETARCH" = "arm64" ]; then \ From e9e5e71221484ba38a5e1022832a68bb1fc9a7b8 Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 11:59:03 +0100 Subject: [PATCH 03/10] Update Dockerfile --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index 622554f6d..6f1d42c40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,6 +62,18 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ + # build solc-v0.5.12 + git checkout v0.5.12; \ + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + # build solc faster + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.5.12; \ + /root/.solcx/solc-v0.5.12 --version | grep 'Version: 0.5.12+commit.7709ece9' || (echo "Incorrect solc-v0.5.12 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ fi From 04750672f23315eee6e8be1bd45de5df72861dac Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 12:03:43 +0100 Subject: [PATCH 04/10] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6f1d42c40..ff585f339 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ # build solc faster grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + grep -rl '#include ' ./libyul/backends/wasm/EWasmAST.h | xargs sed -i 's/#include /#include \n#include /g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.5.12; \ /root/.solcx/solc-v0.5.12 --version | grep 'Version: 0.5.12+commit.7709ece9' || (echo "Incorrect solc-v0.5.12 version" && exit 1); \ From 28cc53be6e063fa1940ada8a8fadc381cf014481 Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 12:23:06 +0100 Subject: [PATCH 05/10] Update Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Dockerfile b/Dockerfile index ff585f339..cb79b98fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,6 +77,20 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git clean -d -x -f; \ fi +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + # build solc-v0.6.12 + git checkout v0.6.12; \ + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + grep -rl '#include ' ./liblangutil/SourceLocation.h | xargs sed -i 's/#include /#include \n#include /g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.6.12; \ + /root/.solcx/solc-v0.6.12 --version | grep 'Version: 0.6.12+commit.27d51765' || (echo "Incorrect solc-v0.6.12 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ + fi RUN if [ "$TARGETARCH" = "arm64" ]; then \ # build solc-v0.8.28 From 2001f67f6fa8b7f87c3844d3b88dd94997854bbd Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Fri, 8 Nov 2024 12:29:04 +0100 Subject: [PATCH 06/10] Update Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index cb79b98fe..cfbb135d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -84,6 +84,8 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ grep -rl '#include ' ./liblangutil/SourceLocation.h | xargs sed -i 's/#include /#include \n#include /g'; \ + grep -rl 'size_t' ./tools/yulPhaser/PairSelections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.6.12; \ /root/.solcx/solc-v0.6.12 --version | grep 'Version: 0.6.12+commit.27d51765' || (echo "Incorrect solc-v0.6.12 version" && exit 1); \ From 1bf3f96679185733b1e040ec543d21198089d266 Mon Sep 17 00:00:00 2001 From: Nikita P Date: Sat, 9 Nov 2024 00:05:22 +0000 Subject: [PATCH 07/10] feat: add 2 solc versions --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Dockerfile b/Dockerfile index cfbb135d4..cc933c4f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -181,6 +181,41 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git clean -d -x -f; \ fi +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + # build solc-v0.8.15 + git checkout v0.8.15; \ + # the compiler throws warnings when compiling this version, and the warnings are treated as errors. + # we disable treating the warnings as errors, unless the build doesn't succeed + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + # there is no sudo in the container, but we are under root so we do not need it + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + # build solc faster + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.8.15; \ + /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ + fi + +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + # build solc-v0.7.6 + git checkout v0.7.6; \ + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + grep -rl '#include ' ./liblangutil/SourceLocation.h | xargs sed -i 's/#include /#include \n#include /g'; \ + grep -rl 'size_t' ./tools/yulPhaser/PairSelections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.7.6; \ + /root/.solcx/solc-v0.7.6 --version | grep 'Version: 0.7.6+commit.7338295f' || (echo "Incorrect solc-v0.7.6 version" && exit 1); \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ + fi + RUN if [ "$TARGETARCH" = "arm64" ]; then \ # manually install vyper mkdir /root/.vvm; \ From be3ad37765a8fad34aaf9f9a9f3653a054a4fef4 Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Sat, 9 Nov 2024 01:22:11 +0100 Subject: [PATCH 08/10] Update Dockerfile --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc933c4f3..5a9480d52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.4.24; \ - /root/.solcx/solc-v0.4.24 --version | grep 'Version: 0.4.24+commit.e67f0147' || (echo "Incorrect solc-v0.4.24 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -58,7 +57,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.5.14; \ - /root/.solcx/solc-v0.5.14 --version | grep 'Version: 0.5.14+commit.01f1aaa4' || (echo "Incorrect solc-v0.5.14 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -71,7 +69,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl '#include ' ./libyul/backends/wasm/EWasmAST.h | xargs sed -i 's/#include /#include \n#include /g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.5.12; \ - /root/.solcx/solc-v0.5.12 --version | grep 'Version: 0.5.12+commit.7709ece9' || (echo "Incorrect solc-v0.5.12 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -88,7 +85,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.6.12; \ - /root/.solcx/solc-v0.6.12 --version | grep 'Version: 0.6.12+commit.27d51765' || (echo "Incorrect solc-v0.6.12 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -103,7 +99,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.28; \ - /root/.solcx/solc-v0.8.28 --version | grep 'Version: 0.8.28+commit.7893614a' || (echo "Incorrect solc-v0.8.28 version" && exit 1); \ git checkout .; \git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -118,7 +113,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.10; \ - /root/.solcx/solc-v0.8.10 --version | grep 'Version: 0.8.10+commit.fc410830' || (echo "Incorrect solc-v0.8.10 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -133,7 +127,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.9; \ - /root/.solcx/solc-v0.8.9 --version | grep 'Version: 0.8.9+commit.e5eed63a' || (echo "Incorrect solc-v0.8.9 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -154,7 +147,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.4; \ - /root/.solcx/solc-v0.8.4 --version | grep 'Version: 0.8.4+commit.c7e474f2' || (echo "Incorrect solc-v0.8.4 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -175,7 +167,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.6; \ - /root/.solcx/solc-v0.8.6 --version | grep 'Version: 0.8.6+commit.11564f7e' || (echo "Incorrect solc-v0.8.6 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -193,7 +184,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.8.15; \ - /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -210,7 +200,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ ./scripts/build.sh; \ mv /usr/local/bin/solc /root/.solcx/solc-v0.7.6; \ - /root/.solcx/solc-v0.7.6 --version | grep 'Version: 0.7.6+commit.7338295f' || (echo "Incorrect solc-v0.7.6 version" && exit 1); \ git checkout .; \ git checkout develop; \ git clean -d -x -f; \ @@ -221,7 +210,6 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ mkdir /root/.vvm; \ pip install vyper==0.3.7; \ ln -s /usr/local/bin/vyper /root/.vvm/vyper-0.3.7; \ - /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1); \ fi # compilers for amd64 will be downloaded by brownie later in this Dockerfile @@ -256,6 +244,18 @@ RUN node --version | grep 'v18.20.4' || (echo "Incorrect node version" && exit 1 RUN npm --version | grep '10.7.0' || (echo "Incorrect npm version" && exit 1) RUN poetry --version | grep 'Poetry (version 1.8.2)' || (echo "Incorrect poetry version" && exit 1) RUN yarn --version | grep '1.22.22' || (echo "Incorrect yarn version" && exit 1) +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.4.24 --version | grep 'Version: 0.4.24+commit.e67f0147' || (echo "Incorrect solc-v0.4.24 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.5.14 --version | grep 'Version: 0.5.14+commit.01f1aaa4' || (echo "Incorrect solc-v0.5.14 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.5.12 --version | grep 'Version: 0.5.12+commit.7709ece9' || (echo "Incorrect solc-v0.5.12 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.6.12 --version | grep 'Version: 0.6.12+commit.27d51765' || (echo "Incorrect solc-v0.6.12 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.28 --version | grep 'Version: 0.8.28+commit.7893614a' || (echo "Incorrect solc-v0.8.28 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.10 --version | grep 'Version: 0.8.10+commit.fc410830' || (echo "Incorrect solc-v0.8.10 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.9 --version | grep 'Version: 0.8.9+commit.e5eed63a' || (echo "Incorrect solc-v0.8.9 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.4 --version | grep 'Version: 0.8.4+commit.c7e474f2' || (echo "Incorrect solc-v0.8.4 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.6 --version | grep 'Version: 0.8.6+commit.11564f7e' || (echo "Incorrect solc-v0.8.6 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.7.6 --version | grep 'Version: 0.7.6+commit.7338295f' || (echo "Incorrect solc-v0.7.6 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1) fi # open sshd port From 4a8669bf148f033604fda04612ed236543befc5a Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Sat, 9 Nov 2024 10:35:40 +0100 Subject: [PATCH 09/10] Update Dockerfile --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5a9480d52..55057ddea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -205,6 +205,23 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git clean -d -x -f; \ fi +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + # build solc-v0.8.24 + git checkout v0.8.24; \ + # the compiler throws warnings when compiling this version, and the warnings are treated as errors. + # we disable treating the warnings as errors, unless the build doesn't succeed + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + # there is no sudo in the container, but we are under root so we do not need it + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + # build solc faster + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.8.24; \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ + fi + RUN if [ "$TARGETARCH" = "arm64" ]; then \ # manually install vyper mkdir /root/.vvm; \ @@ -255,6 +272,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.4 --version | gr RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.6 --version | grep 'Version: 0.8.6+commit.11564f7e' || (echo "Incorrect solc-v0.8.6 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.7.6 --version | grep 'Version: 0.7.6+commit.7338295f' || (echo "Incorrect solc-v0.7.6 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.24 --version | grep 'Version: 0.8.24+commit.e11b9ed9' || (echo "Incorrect solc-v0.8.24 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1) fi From 53501de0ad5f8884c27286bf380683ae528f6764 Mon Sep 17 00:00:00 2001 From: Nikita Panin Date: Sat, 9 Nov 2024 11:34:53 +0100 Subject: [PATCH 10/10] Update Dockerfile --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 55057ddea..a7185181d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,6 +222,22 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \ git clean -d -x -f; \ fi +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + # build solc-v0.6.11 + git checkout v0.6.11; \ + grep -rl '\-Werror' ./cmake/EthCompilerSettings.cmake | xargs sed -i 's/\-Werror/\-Wno\-error/g'; \ + grep -rl 'make -j2' ./scripts/build.sh | xargs sed -i 's/make -j2/make -j4/g'; \ + grep -rl 'sudo make install' ./scripts/build.sh | xargs sed -i 's/sudo make install/make install/g'; \ + grep -rl '#include ' ./liblangutil/SourceLocation.h | xargs sed -i 's/#include /#include \n#include /g'; \ + grep -rl 'size_t' ./tools/yulPhaser/PairSelections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + grep -rl 'size_t' ./tools/yulPhaser/Selections.h | xargs sed -i 's/size_t/std::size_t/g'; \ + ./scripts/build.sh; \ + mv /usr/local/bin/solc /root/.solcx/solc-v0.6.11; \ + git checkout .; \ + git checkout develop; \ + git clean -d -x -f; \ + fi + RUN if [ "$TARGETARCH" = "arm64" ]; then \ # manually install vyper mkdir /root/.vvm; \ @@ -273,9 +289,9 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.6 --version | gr RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.7.6 --version | grep 'Version: 0.7.6+commit.7338295f' || (echo "Incorrect solc-v0.7.6 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.15 --version | grep 'Version: 0.8.15+commit.e14f2714' || (echo "Incorrect solc-v0.8.15 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.8.24 --version | grep 'Version: 0.8.24+commit.e11b9ed9' || (echo "Incorrect solc-v0.8.24 version" && exit 1) fi +RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.solcx/solc-v0.6.11 --version | grep 'Version: 0.6.11+commit.5ef660b1' || (echo "Incorrect solc-v0.6.11 version" && exit 1) fi RUN if [ "$TARGETARCH" = "arm64" ]; then /root/.vvm/vyper-0.3.7 --version | grep '0.3.7+' || (echo "Incorrect vyper-0.3.7 version" && exit 1) fi - # open sshd port EXPOSE 22