Skip to content

Commit

Permalink
Pass required libbz2 to linker to fix compilation error on macOS (#2228)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirugan authored Oct 21, 2024
1 parent bdc5989 commit 0ab532f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# do not copy local database files
p2p-dbs/
juno/
2 changes: 1 addition & 1 deletion .github/workflows/juno-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 0ab532f

Please sign in to comment.