Skip to content

GH-40445: [C++] Fix static build on Windows#40446

Merged
kou merged 1 commit intoapache:mainfrom
kou:cpp-windows-static
Mar 11, 2024
Merged

GH-40445: [C++] Fix static build on Windows#40446
kou merged 1 commit intoapache:mainfrom
kou:cpp-windows-static

Conversation

@kou
Copy link
Copy Markdown
Member

@kou kou commented Mar 10, 2024

Rationale for this change

LINK : warning LNK4217: symbol 'uriEscapeExA' defined in 'arrow_static.lib(unity_0_c.c.obj)' is imported by 'arrow_static.lib(unity_5_cxx.cxx.obj)' in function '"class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl arrow::internal::UriEscape(class std::basic_string_view<char,struct std::char_traits<char> >)" (?UriEscape@internal@arrow@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@DU?$char_traits@D@std@@@4@@Z)'
LINK : warning LNK4217: symbol 'uriUnescapeInPlaceA' defined in 'arrow_static.lib(unity_0_c.c.obj)' is imported by 'arrow_static.lib(unity_5_cxx.cxx.obj)' in function '"class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl arrow::internal::UriUnescape(class std::basic_string_view<char,struct std::char_traits<char> >)" (?UriUnescape@internal@arrow@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@DU?$char_traits@D@std@@@4@@Z)'
LINK : warning LNK4217: symbol 'uriWindowsFilenameToUriStringA' defined in 'arrow_static.lib(unity_0_c.c.obj)' is imported by 'arrow_static.lib(unity_5_cxx.cxx.obj)' in function '"class arrow::Result<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl arrow::internal::UriFromAbsolutePath(class std::basic_string_view<char,struct std::char_traits<char> >)" (?UriFromAbsolutePath@internal@arrow@@YA?AV?$Result@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$basic_string_view@DU?$char_traits@D@std@@@std@@@Z)'
arrow_static.lib(unity_5_cxx.cxx.obj) : error LNK2019: unresolved external symbol __imp_uriParseSingleUriExA referenced in function "public: class arrow::Status __cdecl arrow::internal::Uri::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Parse@Uri@internal@arrow@@QEAA?AVStatus@3@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
arrow_static.lib(unity_5_cxx.cxx.obj) : error LNK2019: unresolved external symbol __imp_uriFreeUriMembersA referenced in function "public: __cdecl arrow::internal::Uri::Impl::~Impl(void)" (??1Impl@Uri@internal@arrow@@QEAA@XZ)
arrow_static.lib(unity_5_cxx.cxx.obj) : error LNK2019: unresolved external symbol __imp_uriDissectQueryMallocA referenced in function "public: class arrow::Result<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > __cdecl arrow::internal::Uri::query_items(void)const " (?query_items@Uri@internal@arrow@@QEBA?AV?$Result@V?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@3@XZ)
arrow_static.lib(unity_5_cxx.cxx.obj) : error LNK2019: unresolved external symbol __imp_uriFreeQueryListA referenced in function "public: class arrow::Result<class std::vector<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > > __cdecl arrow::internal::Uri::query_items(void)const " (?query_items@Uri@internal@arrow@@QEBA?AV?$Result@V?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@V?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@@3@XZ)
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertFreeCertificateContext referenced in function s_ctx_new
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2001: unresolved external symbol __imp_CertFreeCertificateContext
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertCreateCertificateChainEngine referenced in function s_manually_verify_peer_cert
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertFreeCertificateChainEngine referenced in function s_manually_verify_peer_cert
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertGetCertificateChain referenced in function s_manually_verify_peer_cert
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertFreeCertificateChain referenced in function s_manually_verify_peer_cert
aws-c-io.lib(secure_channel_tls_handler.c.obj) : error LNK2019: unresolved external symbol __imp_CertVerifyCertificateChainPolicy referenced in function s_manually_verify_peer_cert
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CryptDecodeObjectEx referenced in function aws_import_key_pair_to_cert_context
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CertOpenStore referenced in function aws_import_key_pair_to_cert_context
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function aws_close_cert_store
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CertFindCertificateInStore referenced in function aws_load_cert_from_system_cert_store
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CertSetCertificateContextProperty referenced in function aws_import_key_pair_to_cert_context
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CertAddCertificateContextToStore referenced in function aws_import_key_pair_to_cert_context
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CryptQueryObject referenced in function aws_import_key_pair_to_cert_context
aws-c-io.lib(windows_pki_utils.c.obj) : error LNK2019: unresolved external symbol __imp_CryptStringToBinaryA referenced in function aws_load_cert_from_system_cert_store

What changes are included in this PR?

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

@kou
Copy link
Copy Markdown
Member Author

kou commented Mar 10, 2024

@github-actions crossbow submit java-jars

@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #40445 has been automatically assigned in GitHub to PR creator.

@github-actions
Copy link
Copy Markdown

Revision: 028cf66

Submitted crossbow builds: ursacomputing/crossbow @ actions-522a1ffb25

Task Status
java-jars GitHub Actions

@kou
Copy link
Copy Markdown
Member Author

kou commented Mar 11, 2024

@kou kou merged commit f299db0 into apache:main Mar 11, 2024
@kou kou deleted the cpp-windows-static branch March 11, 2024 00:59
@kou kou removed the awaiting committer review Awaiting committer review label Mar 11, 2024
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit f299db0.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

@jorisvandenbossche
Copy link
Copy Markdown
Member

No idea if it is actually related to this PR, but it seems the appveyor windows C++ build started failing when this PR was merged (unfortunately appveyor ws already failing for some days because of a python failure, making this less visible it was on this PR failing with a C++ build issue instead):

[315/445] Building CXX object src\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx.obj
FAILED: src/arrow/ipc/CMakeFiles/arrow-ipc-read-write-test.dir/Unity/unity_0_cxx.cxx.obj 
C:\Miniconda38-x64\envs\arrow\Library\bin\ccache.exe C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DPROTOBUF_USE_DLLS -DUSE_IMPORT_EXPORT -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -IC:\projects\arrow\cpp\build\src -IC:\projects\arrow\cpp\src -IC:\projects\arrow\cpp\src\generated -external:IC:\Miniconda38-x64\envs\arrow\Library\include -external:IC:\projects\arrow\cpp\thirdparty\flatbuffers\include -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING  /EHsc /wd5105 /bigobj /utf-8 /W3 /wd4800 /wd4996 /wd4065  /WX /MP /MD /Od /UNDEBUG -std:c++17 -MD /showIncludes /Fosrc\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx.obj /Fdsrc\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\ /FS -c C:\projects\arrow\cpp\build\src\arrow\ipc\CMakeFiles\arrow-ipc-read-write-test.dir\Unity\unity_0_cxx.cxx
C:\projects\arrow\cpp\src\generated/Message_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\Schema_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\SparseTensor_generated.h(12): error C2338: Non-compatible flatbuffers version included
C:\projects\arrow\cpp\src\generated\Tensor_generated.h(12): error C2338: Non-compatible flatbuffers version included
[316/445] Building CXX object src\arrow\engine\CMakeFiles\arrow_substrait_shared.dir\Unity\unity_1_cxx.cxx.obj
ninja: build stopped: subcommand failed.

@kou
Copy link
Copy Markdown
Member Author

kou commented Mar 13, 2024

Oh, sorry. I'll take a look at this.

@kou
Copy link
Copy Markdown
Member Author

kou commented Mar 13, 2024

#40500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants