Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass required libbz2 to linker to fix compilation error on macOS #2228

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading