Skip to content

Commit f458292

Browse files
committed
fix: fix some build issues on Mac
1 parent 49aa689 commit f458292

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ for more information on running your own VDF server.
5252
1. Install [Homebrew](https://brew.sh/)
5353
2. Install dependencies
5454
```sh
55-
brew install gmp [email protected] erlang cmake pkg-config
55+
brew install gmp [email protected] erlang@24 cmake pkg-config
5656
```
57+
3. Homebrew may ask you to update your `LDFLAGS` for erlang: don't. You should however
58+
update your `PATH` as requested.
5759

5860
**Notes:**
5961
1. This process has only been tested on a fresh install of MacOS Ventura running on a Mac Mini M2. It may or may not work on other configurations.

apps/arweave/c_src/Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ ifeq ($(UNAME_SYS), Darwin)
2525
OSX_CPU_ARCH ?= x86_64
2626
# nix systems may not have sysctl where uname -m will return the correct arch
2727
SYSCTL_EXISTS := $(shell which sysctl 2>/dev/null)
28-
ifdef SYSCTL_EXISTS
29-
ifneq ($(shell sysctl -n machdep.cpu.brand_string | egrep "M(1|2)"),)
30-
OSX_CPU_ARCH = arm64
31-
endif
32-
else
33-
ifneq ($(shell uname -m | egrep "arm64"),)
34-
OSX_CPU_ARCH = arm64
28+
ifneq ($(shell uname -m | egrep "arm64"),)
29+
OSX_CPU_ARCH = arm64
30+
else
31+
ifdef SYSCTL_EXISTS
32+
ifneq ($(shell sysctl -n machdep.cpu.brand_string | egrep "M(1|2)"),)
33+
OSX_CPU_ARCH = arm64
3534
endif
35+
endif
3636
endif
3737
CC ?= cc
3838
CFLAGS += -std=c99 -arch $(OSX_CPU_ARCH) -finline-functions -Wall -Wmissing-prototypes

rebar.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{deps, [
22
{b64fast, {git, "https://github.com/ArweaveTeam/b64fast.git", {ref, "58f0502e49bf73b29d95c6d02460d1fb8d2a5273"}}},
3-
{jiffy, {git, "https://github.com/ArweaveTeam/jiffy.git", {ref, "74c956defa9116c85d76f77c3e9b5bd6de7bd39a"}}},
3+
{jiffy, {git, "https://github.com/ArweaveTeam/jiffy.git", {ref, "f25a120f02951b9fd618d1f8f6343fdb8dbe133f"}}},
44
{gun, "1.3.3"},
55
{cowboy, "2.10.0"},
66
{graphql, {git, "https://github.com/shopgun/graphql-erlang.git", {branch, "master"}}},

rebar.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{<<"gun">>,{pkg,<<"gun">>,<<"1.3.3">>},0},
1414
{<<"jiffy">>,
1515
{git,"https://github.com/ArweaveTeam/jiffy.git",
16-
{ref,"74c956defa9116c85d76f77c3e9b5bd6de7bd39a"}},
16+
{ref,"f25a120f02951b9fd618d1f8f6343fdb8dbe133f"}},
1717
0},
1818
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"4.11.0">>},0},
1919
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.1.8">>},0},

0 commit comments

Comments
 (0)