Skip to content

Instantly share code, notes, and snippets.

@amoeba
Last active December 20, 2024 01:45
Show Gist options
  • Save amoeba/e34039debf0d783973d1bca8d6b4af59 to your computer and use it in GitHub Desktop.
Save amoeba/e34039debf0d783973d1bca8d6b4af59 to your computer and use it in GitHub Desktop.
Notes on GH-44950: [C++] Bump minimum CMake version to 3.25

My goal here is to come up with a set of patches that let us build aws-sdk-cpp under Rtools40. I successfully patched aws-c-common but am now stuck on aws-c-io.

My steps to get to where I am now are:

(On Windows 11 x86_64, in an Rtools4.0 UCRT shell)

  1. Check out apache/arrow#44989
  2. Install regular CMake for Windows system-wide
  3. Clone https://github.com/awslabs/aws-c-common and check out v0.8.9
  4. Clone https://github.com/awslabs/aws-c-io and checkout v0.13.14
  5. Update ci/scripts/PKGBUILD to bundle AWSSDK (-DAWSSDK_SOURCE=BUNDLED)
  6. Modify cpp/cmake_modules/ThirdpartyToolchain.cmake to point to local copies of the above two repos instead of a URL
  7. Apply aws-c-common.patch (below) to local clone of aws-c-common
  8. Run ./ci/scripts/r_windows_build.sh
  9. Patch local checkouts as needed to fix failures and go back to (9)
diff --git a/include/aws/common/byte_order.inl b/include/aws/common/byte_order.inl
index 1204be06..008d506d 100644
--- a/include/aws/common/byte_order.inl
+++ b/include/aws/common/byte_order.inl
@@ -39,7 +39,7 @@ AWS_STATIC_IMPL uint64_t aws_hton64(uint64_t x) {
uint64_t v;
__asm__("bswap %q0" : "=r"(v) : "0"(x));
return v;
-#elif defined(_MSC_VER)
+#elif defined(_WIN32)
return _byteswap_uint64(x);
#else
uint32_t low = x & UINT32_MAX;
diff --git a/include/aws/common/logging.h b/include/aws/common/logging.h
index e5fbe885..3ac21d4d 100644
--- a/include/aws/common/logging.h
+++ b/include/aws/common/logging.h
@@ -108,7 +108,9 @@ struct aws_logger_vtable {
aws_log_subject_t subject,
const char *format,
...)
-#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
+#if defined(__MINGW32__)
+ __attribute__((format(gnu_printf, 4, 5)))
+#elif defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
__attribute__((format(printf, 4, 5)))
#endif /* non-ms compilers: TODO - find out what versions format support was added in */
;
diff --git a/source/windows/system_info.c b/source/windows/system_info.c
index ad0206ee..4cd4af5e 100644
--- a/source/windows/system_info.c
+++ b/source/windows/system_info.c
@@ -149,7 +149,7 @@ done:
return;
}
-static bool s_init_dbghelp() {
+static bool s_init_dbghelp(void) {
if (AWS_LIKELY(s_SymInitialize)) {
return true;
}
@@ -215,7 +215,7 @@ char **aws_backtrace_symbols(void *const *stack_frames, size_t num_frames) {
int len = snprintf(
sym_buf,
AWS_ARRAY_SIZE(sym_buf),
- "at 0x%p: Failed to lookup symbol: error %u",
+ "at 0x%p: Failed to lookup symbol: error %lu",
stack_frames[i],
last_error);
if (len > 0) {
@@ -238,7 +238,7 @@ char **aws_backtrace_addr2line(void *const *stack_frames, size_t stack_depth) {
void aws_backtrace_print(FILE *fp, void *call_site_data) {
struct _EXCEPTION_POINTERS *exception_pointers = call_site_data;
if (exception_pointers) {
- fprintf(fp, "** Exception 0x%x occured **\n", exception_pointers->ExceptionRecord->ExceptionCode);
+ fprintf(fp, "** Exception 0x%lx occured **\n", exception_pointers->ExceptionRecord->ExceptionCode);
}
if (!s_init_dbghelp()) {
diff --git a/source/windows/thread.c b/source/windows/thread.c
index 447fcd28..9843816e 100644
--- a/source/windows/thread.c
+++ b/source/windows/thread.c
@@ -205,6 +205,14 @@ static void s_get_group_and_cpu_id(uint32_t desired_cpu, uint16_t *group, uint8_
#endif /* non-desktop has no processor groups */
}
+#ifndef PROCESSOR_NUMBER
+typedef struct _PROCESSOR_NUMBER {
+ WORD Group;
+ BYTE Number;
+ BYTE Reserved;
+} PROCESSOR_NUMBER, *PPROCESSOR_NUMBER;
+#endif
+
typedef BOOL WINAPI SetThreadGroupAffinity_fn(
HANDLE hThread,
const GROUP_AFFINITY *GroupAffinity,
[ 96%] Building C object CMakeFiles/aws-c-io.dir/source/windows/winsock_init.c.obj
/C/rtools40/mingw32/bin/ccache.exe /C/rtools40/mingw32/bin/cc.exe -DAWS_USE_IO_COMPLETION_PORTS @CMakeFiles/aws-c-io.dir/includes_C.rsp -fPIC -Wno-deprecated -O3 -DNDEBUG -O2 -ftree-vectorize -std=gnu99 -Wall -Wstrict-prototypes -fno-omit-frame-pointer -Wextra -pedantic -Wno-long-long -fPIC -D_FILE_OFFSET_BITS=64 -MD -MT CMakeFiles/aws-c-io.dir/source/windows/winsock_init.c.obj -MF CMakeFiles/aws-c-io.dir/source/windows/winsock_init.c.obj.d -o CMakeFiles/aws-c-io.dir/source/windows/winsock_init.c.obj -c /C/Users/Bryce/Source/aws/aws-c-io/source/windows/winsock_init.c
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_update_local_endpoint_ipv4_ipv6':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:498:13: warning: implicit declaration of function 'InetNtopA'; did you mean 'GetPropA'? [-Wimplicit-function-declaration]
if (InetNtopA(AF_INET, &s->sin_addr, tmp_endpoint.address, sizeof(tmp_endpoint.address)) == NULL) {
^~~~~~~~~
GetPropA
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:498:98: warning: comparison between pointer and integer
if (InetNtopA(AF_INET, &s->sin_addr, tmp_endpoint.address, sizeof(tmp_endpoint.address)) == NULL) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:510:100: warning: comparison between pointer and integer
if (InetNtopA(AF_INET6, &s->sin6_addr, tmp_endpoint.address, sizeof(tmp_endpoint.address)) == NULL) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_socket_connection_completion':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:841:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == IO_OPERATION_CANCELLED) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_ipv4_stream_connect':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1046:15: warning: implicit declaration of function 'inet_pton'; did you mean 'inet_ntoa'? [-Wimplicit-function-declaration]
int err = inet_pton(AF_INET, remote_endpoint->address, &(addr_in.sin_addr));
^~~~~~~~~
inet_ntoa
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:26:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_udp_bind':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1476:9: warning: format '%p' expects argument of type 'void *', but argument 8 has type 'int' [-Wformat=]
"id=%p handle=%p: binding to udp %s:%p",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1480:9:
(int)socket->local_endpoint.port);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_incoming_pipe_connection_event':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1621:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == IO_OPERATION_CANCELLED) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1634:25: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == IO_PIPE_BROKEN) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_tcp_accept_event':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:1872:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == IO_OPERATION_CANCELLED || status_code == WSAECONNRESET) {
^~
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:26:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_local_start_accept':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:2200:17: warning: too many arguments for format [-Wformat-extra-args]
"id=%p handle=%p: Pipe connected immediately, scheduling task for setup.",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_stream_readable_event':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:2557:61: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == WSA_OPERATION_ABORTED || status_code == IO_OPERATION_CANCELLED) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c: In function 's_dgram_readable_event':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:2619:61: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code == WSA_OPERATION_ABORTED || status_code == IO_OPERATION_CANCELLED) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/socket.c:2634:56: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
if (status_code != ERROR_IO_PENDING && status_code != IO_STATUS_BUFFER_OVERFLOW) {
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/shared_library.c:16:20: warning: 's_unknown_error' defined but not used [-Wunused-variable]
static const char *s_unknown_error = "<Unknown>";
^~~~~~~~~~~~~~~
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:10:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c: In function 's_cert_context_import_rsa_private_key':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:303:32: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
AWS_LS_IO_PKI, "static: failed to import rsa key into crypto provider, error code %d", GetLastError());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:326:32: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
AWS_LS_IO_PKI, "static: failed to import rsa key into crypto provider, error code %d", GetLastError());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c: In function 's_cert_context_import_ecc_private_key':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:502:13: warning: format '%d' expects argument of type 'int', but argument 5 has type 'SECURITY_STATUS' {aka 'long int'} [-Wformat=]
"static: failed to import ecc key with status %d, last error %d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
status,
~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c: In function 'aws_import_key_pair_to_cert_context':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:594:13: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
"static: failed to load in-memory/ephemeral certificate store, error code %d",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GetLastError());
~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:625:43: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
AWS_LOGF_ERROR(AWS_LS_IO_PKI, "static: invalid certificate blob, error code %d.", GetLastError());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/windows_pki_utils.c:632:43: warning: format '%d' expects argument of type 'int', but argument 5 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
AWS_LOGF_ERROR(AWS_LS_IO_PKI, "static: unable to add , error code %d.", GetLastError());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:329:1: warning: "/*" within comment [-Wcomment]
/* Signal to the event-loop thread that synced_data has changed.
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c: In function 's_connect_to_io_completion_port':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:552:5: warning: implicit declaration of function 'SetFileCompletionNotificationModes' [-Wimplicit-function-declaration]
SetFileCompletionNotificationModes(handle->data.handle, FILE_SKIP_SET_EVENT_ON_HANDLE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:552:61: error: 'FILE_SKIP_SET_EVENT_ON_HANDLE' undeclared (first use in this function)
SetFileCompletionNotificationModes(handle->data.handle, FILE_SKIP_SET_EVENT_ON_HANDLE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:552:61: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c: In function 'aws_event_loop_listen_for_io_events':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:661:12: warning: implicit declaration of function 'GetQueuedCompletionStatusEx'; did you mean 'GetQueuedCompletionStatus'? [-Wimplicit-function-declaration]
return GetQueuedCompletionStatusEx(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
GetQueuedCompletionStatus
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:13:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c: In function 'aws_event_loop_thread':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/iocp/iocp_event_loop.c:693:46: warning: format '%d' expects argument of type 'int', but argument 6 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
AWS_LOGF_TRACE(AWS_LS_IO_EVENT_LOOP, "id=%p: waiting for a maximum of %d ms", (void *)event_loop, timeout_ms);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
make[5]: *** [CMakeFiles/aws-c-io.dir/build.make:383: CMakeFiles/aws-c-io.dir/source/windows/iocp/iocp_event_loop.c.obj] Error 1
make[5]: *** Waiting for unfinished jobs....
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/host_resolver.c: In function 'aws_default_dns_resolve':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/host_resolver.c:31:22: error: 'AI_ALL' undeclared (first use in this function); did you mean 'SIF_ALL'?
hints.ai_flags = AI_ALL | AI_V4MAPPED;
^~~~~~
SIF_ALL
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/host_resolver.c:31:22: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/host_resolver.c:31:31: error: 'AI_V4MAPPED' undeclared (first use in this function); did you mean 'MIDI_MAPPER'?
hints.ai_flags = AI_ALL | AI_V4MAPPED;
^~~~~~~~~~~
MIDI_MAPPER
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/host_resolver.c:53:13: warning: implicit declaration of function 'InetNtopA'; did you mean 'GetPropA'? [-Wimplicit-function-declaration]
InetNtopA(
^~~~~~~~~
GetPropA
make[5]: *** [CMakeFiles/aws-c-io.dir/build.make:368: CMakeFiles/aws-c-io.dir/source/windows/host_resolver.c.obj] Error 1
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_manually_verify_peer_cert':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:211:18: error: 'CERT_CHAIN_ENGINE_CONFIG' {aka 'struct _CERT_CHAIN_ENGINE_CONFIG'} has no member named 'hExclusiveRoot'
engine_config.hExclusiveRoot = sc_handler->custom_ca_store;
^
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:250:13: warning: passing argument 8 of 'CertGetCertificateChain' from incompatible pointer type [-Wincompatible-pointer-types]
&cert_chain_ctx)) {
^~~~~~~~~~~~~~~
In file included from C:/rtools40/mingw32/i686-w64-mingw32/include/Windows.h:95,
from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/private/pki_utils.h:12,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:17:
C:/rtools40/mingw32/i686-w64-mingw32/include/wincrypt.h:5012:243: note: expected 'const CERT_CHAIN_CONTEXT **' {aka 'const struct _CERT_CHAIN_CONTEXT **'} but argument is of type 'CERT_CHAIN_CONTEXT **' {aka 'struct _CERT_CHAIN_CONTEXT **'}
WINIMPM WINBOOL WINAPI CertGetCertificateChain (HCERTCHAINENGINE hChainEngine, PCCERT_CONTEXT pCertContext, LPFILETIME pTime, HCERTSTORE hAdditionalStore, PCERT_CHAIN_PARA pChainPara, DWORD dwFlags, LPVOID pvReserved, PCCERT_CHAIN_CONTEXT *ppChainContext);
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:16:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_fillin_alpn_data':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:431:35: warning: zero-length gnu_printf format string [-Wformat-zero-length]
AWS_LOGF_DEBUG(AWS_LS_IO_TLS, "");
^~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:459:23: error: 'SecApplicationProtocolNegotiationExt_ALPN' undeclared (first use in this function)
*extension_name = SecApplicationProtocolNegotiationExt_ALPN;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:459:23: note: each undeclared identifier is reported only once for each function it appears in
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_do_server_side_negotiation_step_1':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:496:19: warning: unused variable 'alpn_buffer_data' [-Wunused-variable]
unsigned char alpn_buffer_data[128] = {0};
^~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_do_server_side_negotiation_step_2':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:634:36: error: 'SECBUFFER_ALERT' undeclared (first use in this function); did you mean 'SECBUFFER_TARGET'?
output_buffers[1].BufferType = SECBUFFER_ALERT;
^~~~~~~~~~~~~~~
SECBUFFER_TARGET
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_do_client_side_negotiation_step_1':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:780:19: warning: unused variable 'input_buf_desc' [-Wunused-variable]
SecBufferDesc input_buf_desc = {
^~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:773:19: warning: unused variable 'alpn_buffer_data' [-Wunused-variable]
unsigned char alpn_buffer_data[128] = {0};
^~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_do_client_side_negotiation_step_2':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:912:36: error: 'SECBUFFER_ALERT' undeclared (first use in this function); did you mean 'SECBUFFER_TARGET'?
output_buffers[1].BufferType = SECBUFFER_ALERT;
^~~~~~~~~~~~~~~
SECBUFFER_TARGET
In file included from C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/logging.h:11,
from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:16:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1000:39: warning: format '%p' expects argument of type 'void *', but argument 5 has type 'struct aws_channel_handler *' [-Wformat=]
AWS_LOGF_TRACE(AWS_LS_IO_TLS, "id=%p: handshake completed", handler);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c: In function 's_ctx_new':
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1908:74: error: 'SP_PROT_TLS1_0_CLIENT' undeclared (first use in this function); did you mean 'SP_PROT_TLS1_CLIENT'?
secure_channel_ctx->credentials.grbitEnabledProtocols |= SP_PROT_TLS1_0_CLIENT;
^~~~~~~~~~~~~~~~~~~~~
SP_PROT_TLS1_CLIENT
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1910:74: error: 'SP_PROT_TLS1_1_CLIENT' undeclared (first use in this function); did you mean 'SP_PROT_TLS1_CLIENT'?
secure_channel_ctx->credentials.grbitEnabledProtocols |= SP_PROT_TLS1_1_CLIENT;
^~~~~~~~~~~~~~~~~~~~~
SP_PROT_TLS1_CLIENT
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1929:74: error: 'SP_PROT_TLS1_0_SERVER' undeclared (first use in this function); did you mean 'SP_PROT_TLS1_SERVER'?
secure_channel_ctx->credentials.grbitEnabledProtocols |= SP_PROT_TLS1_0_SERVER;
^~~~~~~~~~~~~~~~~~~~~
SP_PROT_TLS1_SERVER
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1931:74: error: 'SP_PROT_TLS1_1_SERVER' undeclared (first use in this function); did you mean 'SP_PROT_TLS1_SERVER'?
secure_channel_ctx->credentials.grbitEnabledProtocols |= SP_PROT_TLS1_1_SERVER;
^~~~~~~~~~~~~~~~~~~~~
SP_PROT_TLS1_SERVER
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1977:48: error: 'SCH_USE_STRONG_CRYPTO' undeclared (first use in this function)
secure_channel_ctx->credentials.dwFlags |= SCH_USE_STRONG_CRYPTO;
^~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1984:84: warning: passing argument 3 of 'aws_load_cert_from_system_cert_store' from incompatible pointer type [-Wincompatible-pointer-types]
options->system_certificate_path, &secure_channel_ctx->cert_store, &secure_channel_ctx->pcerts)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:17:
C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/private/pki_utils.h:111:21: note: expected 'const CERT_CONTEXT **' {aka 'const struct _CERT_CONTEXT **'} but argument is of type 'struct _CERT_CONTEXT **'
PCCERT_CONTEXT *certs);
~~~~~~~~~~~~~~~~^~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:1989:48: warning: assignment to 'const CERT_CONTEXT **' {aka 'const struct _CERT_CONTEXT **'} from incompatible pointer type 'struct _CERT_CONTEXT **' [-Wincompatible-pointer-types]
secure_channel_ctx->credentials.paCred = &secure_channel_ctx->pcerts;
^
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:2016:13: warning: passing argument 6 of 'aws_import_key_pair_to_cert_context' from incompatible pointer type [-Wincompatible-pointer-types]
&secure_channel_ctx->pcerts,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:17:
C:/Users/Bryce/Source/aws/aws-c-io/include/aws/io/private/pki_utils.h:137:21: note: expected 'const CERT_CONTEXT **' {aka 'const struct _CERT_CONTEXT **'} but argument is of type 'struct _CERT_CONTEXT **'
PCCERT_CONTEXT *certs,
~~~~~~~~~~~~~~~~^~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:2026:48: warning: assignment to 'const CERT_CONTEXT **' {aka 'const struct _CERT_CONTEXT **'} from incompatible pointer type 'struct _CERT_CONTEXT **' [-Wincompatible-pointer-types]
secure_channel_ctx->credentials.paCred = &secure_channel_ctx->pcerts;
^
At top level:
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:479:12: warning: 's_process_connection_state' defined but not used [-Wunused-function]
static int s_process_connection_state(struct aws_channel_handler *handler) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/Bryce/Source/aws/aws-c-io/source/windows/secure_channel_tls_handler.c:424:12: warning: 's_fillin_alpn_data' defined but not used [-Wunused-function]
static int s_fillin_alpn_data(
^~~~~~~~~~~~~~~~~~
make[5]: *** [CMakeFiles/aws-c-io.dir/build.make:428: CMakeFiles/aws-c-io.dir/source/windows/secure_channel_tls_handler.c.obj] Error 1
make[5]: Leaving directory '/C/Users/Bryce/Source/apache/arrow/src/build-i686-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep-build'
make[4]: *** [CMakeFiles/Makefile2:90: CMakeFiles/aws-c-io.dir/all] Error 2
make[4]: Leaving directory '/C/Users/Bryce/Source/apache/arrow/src/build-i686-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep-build'
make[3]: *** [Makefile:139: all] Error 2
make[3]: Leaving directory '/C/Users/Bryce/Source/apache/arrow/src/build-i686-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep-build'
make[2]: *** [CMakeFiles/aws_c_io_ep.dir/build.make:89: aws_c_io_ep-prefix/src/aws_c_io_ep-stamp/aws_c_io_ep-build] Error 2
make[2]: Leaving directory '/c/Users/Bryce/Source/apache/arrow/src/build-i686-cpp'
make[1]: *** [CMakeFiles/Makefile2:812: CMakeFiles/aws_c_io_ep.dir/all] Error 2
make[1]: Leaving directory '/c/Users/Bryce/Source/apache/arrow/src/build-i686-cpp'
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment