arm64 環境偷懶用 pi4, ubuntu.
到github iperf clone 下來,checkout tag 3.1.3
然後依照FAQ, run configure
configure "LDFLAGS=--static" --disable-shared --without-sctp因為 android 的 tmp 在 /data/local/tmp,與一般linux 系統的 /tmp 不同。
不然會出現
iperf3: error - unable to create a new stream: No such file or directory修改:
diff --git a/src/iperf_api.c b/src/iperf_api.c
index 5b56af6..f58e18a 100755
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -2664,7 +2664,7 @@ iperf_new_stream(struct iperf_test *test, int s)
if (test->tmp_template) {
snprintf(template, sizeof(template) / sizeof(char), "%s", test->tmp_template);
} else {
- char buf[] = "/tmp/iperf3.XXXXXX";
+ char buf[] = "/data/local/tmp/iperf3.XXXXXX";
snprintf(template, sizeof(template) / sizeof(char), "%s", buf);
}
之後就可以 make...
沒有留言:
張貼留言