操作系统:openEuler 20.03 64bit with ARM
手动编译starrocks的第三方依赖aws-sdk-cpp-1.9.179时报错:
[ 62%] Building C object crt/aws-crt-cpp/crt/s2n/CMakeFiles/s2n.dir/utils/s2n_timer.c.o
<command-line>: warning: "_POSIX_C_SOURCE" redefined
<command-line>: note: this is the location of the previous definition
[ 63%] Linking C static library ../../../../lib/libs2n.a
[ 63%] Built target s2n
[ 64%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/alpn_handler.c.o
[ 64%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/channel.c.o
[ 64%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/channel_bootstrap.c.o
[ 64%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/event_loop.c.o
[ 64%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/exponential_backoff_retry_strategy.c.o
[ 65%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/file_utils_shared.c.o
[ 65%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/host_resolver.c.o
[ 65%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/io.c.o
[ 65%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/linux/epoll_event_loop.c.o
[ 65%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/message_pool.c.o
[ 66%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/pem_utils.c.o
[ 66%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/pki_utils.c.o
[ 66%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/posix/file_utils.c.o
[ 66%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/posix/host_resolver.c.o
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c: In function ‘aws_default_dns_resolve’:
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:37:21: error: storage size of ‘hints’ isn’t known
37 | struct addrinfo hints;
| ^~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:41:22: error: ‘AI_ALL’ undeclared (first use in this function); did you mean ‘AF_ALG’?
41 | hints.ai_flags = AI_ALL | AI_V4MAPPED;
| ^~~~~~
| AF_ALG
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:41:22: note: each undeclared identifier is reported only once for each function it appears in
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:41:31: error: ‘AI_V4MAPPED’ undeclared (first use in this function)
41 | hints.ai_flags = AI_ALL | AI_V4MAPPED;
| ^~~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:43:20: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
43 | int err_code = getaddrinfo(hostname_cstr, NULL, &hints, &result);
| ^~~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:51:50: error: invalid use of undefined type ‘struct addrinfo’
51 | for (iter = result; iter != NULL; iter = iter->ai_next) {
| ^~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:56:17: error: invalid use of undefined type ‘struct addrinfo’
56 | if (iter->ai_family == AF_INET6) {
| ^~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:58:27: error: invalid use of undefined type ‘struct addrinfo’
58 | inet_ntop(iter->ai_family, &((struct sockaddr_in6 *)iter->ai_addr)->sin6_addr, address_buffer, max_len);
| ^~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:58:69: error: invalid use of undefined type ‘struct addrinfo’
58 | inet_ntop(iter->ai_family, &((struct sockaddr_in6 *)iter->ai_addr)->sin6_addr, address_buffer, max_len);
| ^~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:61:27: error: invalid use of undefined type ‘struct addrinfo’
61 | inet_ntop(iter->ai_family, &((struct sockaddr_in *)iter->ai_addr)->sin_addr, address_buffer, max_len);
| ^~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:61:68: error: invalid use of undefined type ‘struct addrinfo’
61 | inet_ntop(iter->ai_family, &((struct sockaddr_in *)iter->ai_addr)->sin_addr, address_buffer, max_len);
| ^~
[ 66%] Building C object crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/posix/pipe.c.o
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:94:5: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
94 | freeaddrinfo(result);
| ^~~~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:104:18: error: ‘EAI_FAIL’ undeclared (first use in this function)
104 | case EAI_FAIL:
| ^~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:105:18: error: ‘EAI_AGAIN’ undeclared (first use in this function); did you mean ‘TRY_AGAIN’?
105 | case EAI_AGAIN:
| ^~~~~~~~~
| TRY_AGAIN
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:107:18: error: ‘EAI_MEMORY’ undeclared (first use in this function)
107 | case EAI_MEMORY:
| ^~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:109:18: error: ‘EAI_NONAME’ undeclared (first use in this function)
109 | case EAI_NONAME:
| ^~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:110:18: error: ‘EAI_SERVICE’ undeclared (first use in this function)
110 | case EAI_SERVICE:
| ^~~~~~~~~~~
/root/starrocks-2.3.6/thirdparty/src/aws-sdk-cpp-1.9.179/crt/aws-crt-cpp/crt/aws-c-io/source/posix/host_resolver.c:37:21: warning: unused variable ‘hints’ [-Wunused-variable]
37 | struct addrinfo hints;
| ^~~~~
make[2]: *** [crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/build.make:258: crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/source/posix/host_resolver.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:484: crt/aws-crt-cpp/crt/aws-c-io/CMakeFiles/aws-c-io.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
[root@ecs-2b7a thirdparty]#