iperf3 version 3.1.1
building using musl libc fails (this is on Alpine Linux, so it's a follow up of #328)
iperf.h:71:21: error: field 'tcpInfo' has incomplete type
struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */
This was fixed (probably incorrectly) with
-struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD /
+struct tcp_info *tcpInfo; / getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */
but then more errors occured
libtool: compile: gcc -DHAVE_CONFIG_H -I. -Os -fomit-frame-pointer -Os -fomit-frame-pointer -Wall -MT tcp_info.lo -MD -MP -MF .deps/tcp_info.Tpo -c tcp_info.c -fPIC -DPIC -o .libs/tcp_info.o
tcp_info.c: In function 'save_tcpinfo':
tcp_info.c:100:40: error: invalid application of 'sizeof' to incomplete type 'struct tcp_info'
socklen_t tcp_info_length = sizeof(struct tcp_info);
^
tcp_info.c:107:21: error: request for member 'tcpi_snd_cwnd' in something not a structure or union
irp->tcpInfo.tcpi_snd_cwnd, irp->tcpInfo.tcpi_snd_mss,
^
libtool: compile: gcc -DHAVE_CONFIG_H -I. -Os -fomit-frame-pointer -Os -fomit-frame-pointer -Wall -MT tcp_window_size.lo -MD -MP -MF .deps/tcp_window_size.Tpo -c tcp_window_size.c -fPIC -DPIC -o .libs/tcp_window_size.o
tcp_info.c:107:49: error: request for member 'tcpi_snd_mss' in something not a structure or union
irp->tcpInfo.tcpi_snd_cwnd, irp->tcpInfo.tcpi_snd_mss,
^
tcp_info.c:108:21: error: request for member 'tcpi_rtt' in something not a structure or union
irp->tcpInfo.tcpi_rtt);
^
tcp_info.c: In function 'get_total_retransmits':
tcp_info.c:119:24: error: request for member 'tcpi_total_retrans' in something not a structure or union
return irp->tcpInfo.tcpi_total_retrans;
^
tcp_info.c: In function 'get_snd_cwnd':
tcp_info.c:137:24: error: request for member 'tcpi_snd_cwnd' in something not a structure or union
return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
^
tcp_info.c:137:53: error: request for member 'tcpi_snd_mss' in something not a structure or union
return irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss;
^
tcp_info.c: In function 'get_rtt':
tcp_info.c:155:24: error: request for member 'tcpi_rtt' in something not a structure or union
return irp->tcpInfo.tcpi_rtt;
^
tcp_info.c: In function 'build_tcpinfo_message':
tcp_info.c:170:48: error: request for member 'tcpi_snd_cwnd' in something not a structure or union
sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, r->tcpInfo.tcpi_snd_ssthresh,
^
tcp_info.c:170:74: error: request for member 'tcpi_snd_ssthresh' in something not a structure or union
sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, r->tcpInfo.tcpi_snd_ssthresh,
^
tcp_info.c:171:16: error: request for member 'tcpi_rcv_ssthresh' in something not a structure or union
r->tcpInfo.tcpi_rcv_ssthresh, r->tcpInfo.tcpi_unacked, r->tcpInfo.tcpi_sacked,
^
tcp_info.c:171:46: error: request for member 'tcpi_unacked' in something not a structure or union
r->tcpInfo.tcpi_rcv_ssthresh, r->tcpInfo.tcpi_unacked, r->tcpInfo.tcpi_sacked,
^
tcp_info.c:171:71: error: request for member 'tcpi_sacked' in something not a structure or union
r->tcpInfo.tcpi_rcv_ssthresh, r->tcpInfo.tcpi_unacked, r->tcpInfo.tcpi_sacked,
^
tcp_info.c:172:16: error: request for member 'tcpi_lost' in something not a structure or union
r->tcpInfo.tcpi_lost, r->tcpInfo.tcpi_retrans, r->tcpInfo.tcpi_fackets,
^
tcp_info.c:172:38: error: request for member 'tcpi_retrans' in something not a structure or union
r->tcpInfo.tcpi_lost, r->tcpInfo.tcpi_retrans, r->tcpInfo.tcpi_fackets,
^
tcp_info.c:172:63: error: request for member 'tcpi_fackets' in something not a structure or union
r->tcpInfo.tcpi_lost, r->tcpInfo.tcpi_retrans, r->tcpInfo.tcpi_fackets,
^
tcp_info.c:173:16: error: request for member 'tcpi_rtt' in something not a structure or union
r->tcpInfo.tcpi_rtt, r->tcpInfo.tcpi_reordering);
^
tcp_info.c:173:37: error: request for member 'tcpi_reordering' in something not a structure or union
r->tcpInfo.tcpi_rtt, r->tcpInfo.tcpi_reordering);
^
tcp_info.c: In function 'get_total_retransmits':
tcp_info.c:127:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
tcp_info.c: In function 'get_snd_cwnd':
tcp_info.c:145:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
tcp_info.c: In function 'get_rtt':
tcp_info.c:163:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:856: recipe for target 'tcp_info.lo' failed
I can provide an alpine linux (musl libc) build environment for you if you think it might help
iperf3 version 3.1.1
building using musl libc fails (this is on Alpine Linux, so it's a follow up of #328)
iperf.h:71:21: error: field 'tcpInfo' has incomplete type
struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */
This was fixed (probably incorrectly) with
-struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD /
+struct tcp_info *tcpInfo; / getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */
but then more errors occured
I can provide an alpine linux (musl libc) build environment for you if you think it might help