giltene / wrk2

A constant throughput, correct latency recording variant of wrk
Apache License 2.0
4.23k stars 381 forks source link

Unsupported target architecture - arm64 M1 Mac #120

Closed tekumara closed 2 years ago

tekumara commented 2 years ago

When building on an arm64 M1 Mac

==> make
...
#error "Need at least GCC 4.3 or newer"
 ^
3 errors generated.
lj_arch.h:55:2: error: "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
 ^
lj_arch.h:279:2: error: "No target architecture defined"
#error "No target architecture defined"
 ^
lj_arch.h:302:2: error: "Need at least GCC 4.3 or newer"
#error "Need at least GCC 4.3 or newer"
 ^
3 errors generated.
Makefile:231: *** Unsupported target architecture.  Stop.
make: *** [deps/luajit/src/libluajit.a] Error 2
eecheng87 commented 2 years ago

Check out this discussion: https://github.com/giltene/wrk2/issues/104 wrk2 for aarch64 also can be found in the repo: https://github.com/AmpereTravis/wrk2-aarch64 https://github.com/kinvolk/wrk2

tekumara commented 2 years ago

Thanks @eecheng87 I've closed this issue as it's a duplicate.

orefalo commented 2 years ago

well none of those are compiling on my Mac M1

orefalo commented 2 years ago

kinvolk: I get (after update include and lib path to openssl3)

CC src/script.c
src/script.c:486:5: error: implicit declaration of function 'gettimeofday' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    gettimeofday(&tv, NULL);
    ^
1 error generated.
make: *** [obj/script.o] Error 1

wrk2 on  master [!]
✗  make
CC src/wrk.c
src/wrk.c:156:29: warning: format specifies type 'int' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
                            cfg.threads, (time_us() - thread_init) / 1000);
                            ^~~~~~~~~~~
src/wrk.c:156:42: warning: format specifies type 'int' but the argument has type 'unsigned long long' [-Wformat]
                            cfg.threads, (time_us() - thread_init) / 1000);
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/wrk.c:606:13: warning: enumeration value 'READ_EOF' not handled in switch [-Wswitch]
    switch (sock.connect(c, cfg.host)) {
            ^
src/wrk.c:606:13: note: add missing switch cases
    switch (sock.connect(c, cfg.host)) {
            ^
src/wrk.c:663:13: warning: enumeration value 'READ_EOF' not handled in switch [-Wswitch]
    switch (sock.write(c, buf, len, &n)) {
            ^
src/wrk.c:663:13: note: add missing switch cases
    switch (sock.write(c, buf, len, &n)) {
            ^
src/wrk.c:873:13: warning: unused function 'print_stats_latency' [-Wunused-function]
static void print_stats_latency(stats *stats) {
            ^
5 warnings generated.
CC src/net.c
CC src/ssl.c
src/ssl.c:13:13: warning: unused function 'ssl_lock' [-Wunused-function]
static void ssl_lock(int mode, int n, const char *file, int line) {
            ^
src/ssl.c:22:22: warning: unused function 'ssl_id' [-Wunused-function]
static unsigned long ssl_id() {
                     ^
2 warnings generated.
CC src/aprintf.c
CC src/stats.c
CC src/script.c
src/script.c:486:5: error: implicit declaration of function 'gettimeofday' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    gettimeofday(&tv, NULL);
    ^
1 error generated.