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

Fix build for Apple M<x> silicon #145

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PauloMigAlmeida
Copy link

@PauloMigAlmeida PauloMigAlmeida commented Dec 2, 2024

In order to make it run on Apple M1,2,3 devices I had to upgrade LuaJit to the latest version (2.1) and tweak a few things on the makefile.

I also made LuaJIT to be downloaded during build phase so upgrades to different versions don't result in massive PR due to the lib vendoring (which is hard to evalute)

One can compile it to arm arch by executing

brew install openssl@3 gcc@12
make \
    CC=/opt/homebrew/Cellar/gcc@12/12.4.0/bin/gcc-12 \
    OPENSSL_LIB=/opt/homebrew/Cellar/openssl@3/3.3.2/ \
    clean all

Running wrk

 ./wrk -t2 -c10 -d30s -R200 https://google.com                                                                    
Running 30s test @ https://google.com
  2 threads and 10 connections
  Thread calibration: mean lat.: 4713.042ms, rate sampling interval: 16343ms
  Thread calibration: mean lat.: 4693.897ms, rate sampling interval: 16293ms
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    18.08s     5.19s   27.08s    57.71%
    Req/Sec     9.50      0.50    10.00    100.00%
  593 requests in 30.03s, 491.08KB read
Requests/sec:     19.74
Transfer/sec:     16.35KB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant