From bc38d0e46cb9a1229104112cd251a94d1c365f13 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 21 Oct 2024 12:44:53 +0400 Subject: [PATCH 1/5] Pass required libbz2 to linker to fix compilation error on macOS --- vm/vm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/vm.go b/vm/vm.go index dd3b29fc6..f4754f635 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -39,8 +39,8 @@ extern void cairoVMExecute(char* txns_json, char* classes_json, char* paid_fees_ extern char* setVersionedConstants(char* json); extern void freeString(char* str); -#cgo vm_debug LDFLAGS: -L./rust/target/debug -ljuno_starknet_rs -#cgo !vm_debug LDFLAGS: -L./rust/target/release -ljuno_starknet_rs +#cgo vm_debug LDFLAGS: -L./rust/target/debug -ljuno_starknet_rs -lbz2 +#cgo !vm_debug LDFLAGS: -L./rust/target/release -ljuno_starknet_rs -lbz2 */ import "C" From b1f9ba3a923ec8c283ffdfd740bf7c24d4f017da Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 21 Oct 2024 13:44:55 +0400 Subject: [PATCH 2/5] Add .dockerignore for local db files --- .dockerignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..0011e7a9d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +# do not copy local database files +p2p-dbs/ +juon/ \ No newline at end of file From f0ecb276035bc1e8ed3977a53b78da9720292602 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 21 Oct 2024 13:45:09 +0400 Subject: [PATCH 3/5] Fix failing build in Dockerfile due to missing libbz2 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 30b0c4b55..cb6e537a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG VM_DEBUG RUN apt-get -qq update && \ - apt-get -qq install curl build-essential git golang upx-ucl libjemalloc-dev libjemalloc2 -y + apt-get -qq install curl build-essential git golang upx-ucl libjemalloc-dev libjemalloc2 libbz2-dev RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y WORKDIR /app From 65d93dd28f512f9d67c4fcc39d70a3565a8a260d Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 21 Oct 2024 14:56:50 +0400 Subject: [PATCH 4/5] Fix misspell in .dockerignore --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 0011e7a9d..2f579965d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,3 @@ # do not copy local database files p2p-dbs/ -juon/ \ No newline at end of file +juno/ \ No newline at end of file From ad34d404da1219143a7a40aa05257053d809a196 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 21 Oct 2024 15:22:27 +0400 Subject: [PATCH 5/5] Add libbz2 for ubuntu builds --- .github/workflows/juno-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/juno-test.yml b/.github/workflows/juno-test.yml index 125b2047f..beb885d78 100644 --- a/.github/workflows/juno-test.yml +++ b/.github/workflows/juno-test.yml @@ -40,7 +40,7 @@ jobs: - name: Install Jemalloc (Linux) if: runner.os == 'Linux' - run: sudo apt-get update -qq && sudo apt-get install -y libjemalloc-dev libjemalloc2 -y + run: sudo apt-get update -qq && sudo apt-get install -y libjemalloc-dev libjemalloc2 libbz2-dev - name: Install dependencies (macOS) if: runner.os == 'macOS'