You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use cross-compile aarch64-none-linux-gnu-gcc version 9.2.1 to compile without any problem, but when I use version 11.4 to compile, an error will be reported. The error is as follows:
CC testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.o AR librpc-tirpc.a
RANLIB librpc-tirpc.a
CC testcases/network/rpc/basic_tests/rpc01/lib/librpc01.o
AR librpc01.a
RANLIB librpc01.a
rpc1.c: In function ‘main’:
rpc_server.c: In function ‘service_request’:
rpc1.c:96:56: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
96 | memcpy(&server_sin.sin_addr, hp->h_addr, sizeof(hp->h_addr));
| ^
rpc_server.c:94:39: warning: cast between incompatible function types from ‘bool_t ()(void)’ {aka ‘int ()(void)’} to ‘bool_t (*)(XDR , ...)’ {aka ‘int ()(struct __rpc_xdr *, ...)’} [-Wcast-function-type]
94 | svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
| ^ /usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: cannot find -ltirpc: No such file or directory
collect2: error: ld returned 1 exit status
Question
1、-ltirpc or -lrpc-tirpc? how to specify?
2、Why do different compilers differ?
The text was updated successfully, but these errors were encountered:
Or, you can inspect generated include/mk/config.mk for LIBTIRPC_CFLAGS and LIBTIRPC_LIBS values.
I suspect you don't have libtirpc development headers installed for the toolchain and the old toolchain had glibc < 2.26, thus with their sunrpc implementation.
I use cross-compile aarch64-none-linux-gnu-gcc version 9.2.1 to compile without any problem, but when I use version 11.4 to compile, an error will be reported. The error is as follows:
CC testcases/network/rpc/rpc-tirpc/tests_pack/lib/librpc-tirpc.o
AR librpc-tirpc.a
RANLIB librpc-tirpc.a
CC testcases/network/rpc/basic_tests/rpc01/lib/librpc01.o
AR librpc01.a
RANLIB librpc01.a
rpc1.c: In function ‘main’:
rpc_server.c: In function ‘service_request’:
rpc1.c:96:56: warning: argument to ‘sizeof’ in ‘memcpy’ call is the same expression as the source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
96 | memcpy(&server_sin.sin_addr, hp->h_addr, sizeof(hp->h_addr));
| ^
rpc_server.c:94:39: warning: cast between incompatible function types from ‘bool_t ()(void)’ {aka ‘int ()(void)’} to ‘bool_t (*)(XDR , ...)’ {aka ‘int ()(struct __rpc_xdr *, ...)’} [-Wcast-function-type]
94 | svc_sendreply(transp, (xdrproc_t)xdr_void, NULL);
| ^
/usr/lib/gcc-cross/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/bin/ld: cannot find -ltirpc: No such file or directory
collect2: error: ld returned 1 exit status
Question
1、-ltirpc or -lrpc-tirpc? how to specify?
2、Why do different compilers differ?
The text was updated successfully, but these errors were encountered: