Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Windows static build for java-jars failed #40445

Closed
kou opened this issue Mar 10, 2024 · 1 comment
Closed

[C++] Windows static build for java-jars failed #40445

kou opened this issue Mar 10, 2024 · 1 comment
Assignees
Milestone

Comments

@kou
Copy link
Member

kou commented Mar 10, 2024

Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/ursacomputing/crossbow/actions/runs/8213347411/job/22464634252#step:6:1149

FAILED: release/arrow-acero-hash-join-node-test.exe 
C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=src\arrow\acero\CMakeFiles\arrow-acero-hash-join-node-test.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo src\arrow\acero\CMakeFiles\arrow_acero_testing.dir\Unity\unity_0_cxx.cxx.obj src\arrow\acero\CMakeFiles\arrow-acero-hash-join-node-test.dir\Unity\unity_0_cxx.cxx.obj  /out:release\arrow-acero-hash-join-node-test.exe /implib:release\arrow-acero-hash-join-node-test.lib /pdb:release\arrow-acero-hash-join-node-test.pdb /version:0.0 /machine:x64  /NODEFAULTLIB:LIBCMT /INCREMENTAL:NO /subsystem:console  release\arrow_testing_static.lib  release\arrow_acero_static.lib  release\arrow_testing_static.lib  release\arrow_static.lib  release\arrow_testing_static.lib  release\arrow_gmock.lib  release\arrow_gtest_main.lib  release\arrow_gtest.lib  release\arrow_acero_static.lib  release\arrow_static.lib  ws2_32.lib  re2_ep-install\lib\re2.lib  utf8proc_ep-install\lib\utf8proc_static.lib  awssdk_ep-install\lib\aws-cpp-sdk-identity-management.lib  awssdk_ep-install\lib\aws-cpp-sdk-sts.lib  awssdk_ep-install\lib\aws-cpp-sdk-cognito-identity.lib  awssdk_ep-install\lib\aws-cpp-sdk-s3.lib  awssdk_ep-install\lib\aws-cpp-sdk-core.lib  winhttp.lib  wininet.lib  userenv.lib  version.lib  awssdk_ep-install\lib\aws-crt-cpp.lib  awssdk_ep-install\lib\aws-c-s3.lib  awssdk_ep-install\lib\aws-c-auth.lib  awssdk_ep-install\lib\aws-c-mqtt.lib  awssdk_ep-install\lib\aws-c-http.lib  awssdk_ep-install\lib\aws-c-compression.lib  awssdk_ep-install\lib\aws-c-sdkutils.lib  awssdk_ep-install\lib\aws-c-event-stream.lib  awssdk_ep-install\lib\aws-c-io.lib  awssdk_ep-install\lib\aws-c-cal.lib  bcrypt.lib  ncrypt.lib  Secur32.lib  Shlwapi.lib  awssdk_ep-install\lib\aws-checksums.lib  awssdk_ep-install\lib\aws-c-common.lib  orc_ep-install\lib\orc.lib  protobuf_ep-install\lib\libprotobuf.lib  brotli_ep\src\brotli_ep-install\lib\brotlienc-static.lib  brotli_ep\src\brotli_ep-install\lib\brotlidec-static.lib  brotli_ep\src\brotli_ep-install\lib\brotlicommon-static.lib  lz4_ep-install\lib\lz4.lib  snappy_ep\src\snappy_ep-install\lib\snappy.lib  zlib_ep\src\zlib_ep-install\lib\zlibstatic.lib  zstd_ep-install\lib\zstd_static.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK: command "C:\PROGRA~2\MICROS~2\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo src\arrow\acero\CMakeFiles\arrow_acero_testing.dir\Unity\unity_0_cxx.cxx.obj src\arrow\acero\CMakeFiles\arrow-acero-hash-join-node-test.dir\Unity\unity_0_cxx.cxx.obj /out:release\arrow-acero-hash-join-node-test.exe /implib:release\arrow-acero-hash-join-node-test.lib /pdb:release\arrow-acero-hash-join-node-test.pdb /version:0.0 /machine:x64 /NODEFAULTLIB:LIBCMT /INCREMENTAL:NO /subsystem:console release\arrow_testing_static.lib release\arrow_acero_static.lib release\arrow_testing_static.lib release\arrow_static.lib release\arrow_testing_static.lib release\arrow_gmock.lib release\arrow_gtest_main.lib release\arrow_gtest.lib release\arrow_acero_static.lib release\arrow_static.lib ws2_32.lib re2_ep-install\lib\re2.lib utf8proc_ep-install\lib\utf8proc_static.lib awssdk_ep-install\lib\aws-cpp-sdk-identity-management.lib awssdk_ep-install\lib\aws-cpp-sdk-sts.lib awssdk_ep-install\lib\aws-cpp-sdk-cognito-identity.lib awssdk_ep-install\lib\aws-cpp-sdk-s3.lib awssdk_ep-install\lib\aws-cpp-sdk-core.lib winhttp.lib wininet.lib userenv.lib version.lib awssdk_ep-install\lib\aws-crt-cpp.lib awssdk_ep-install\lib\aws-c-s3.lib awssdk_ep-install\lib\aws-c-auth.lib awssdk_ep-install\lib\aws-c-mqtt.lib awssdk_ep-install\lib\aws-c-http.lib awssdk_ep-install\lib\aws-c-compression.lib awssdk_ep-install\lib\aws-c-sdkutils.lib awssdk_ep-install\lib\aws-c-event-stream.lib awssdk_ep-install\lib\aws-c-io.lib awssdk_ep-install\lib\aws-c-cal.lib bcrypt.lib ncrypt.lib Secur32.lib Shlwapi.lib awssdk_ep-install\lib\aws-checksums.lib awssdk_ep-install\lib\aws-c-common.lib orc_ep-install\lib\orc.lib protobuf_ep-install\lib\libprotobuf.lib brotli_ep\src\brotli_ep-install\lib\brotlienc-static.lib brotli_ep\src\brotli_ep-install\lib\brotlidec-static.lib brotli_ep\src\brotli_ep-install\lib\brotlicommon-static.lib lz4_ep-install\lib\lz4.lib snappy_ep\src\snappy_ep-install\lib\snappy.lib zlib_ep\src\zlib_ep-install\lib\zlibstatic.lib zstd_ep-install\lib\zstd_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST:EMBED,ID=1" failed (exit code 1120) with the following output:
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
release\arrow-acero-hash-join-node-test.exe : fatal error LNK1120: 18 unresolved externals

Component(s)

C++

@kou kou added the Type: bug label Mar 10, 2024
kou added a commit to kou/arrow that referenced this issue Mar 10, 2024
kou added a commit that referenced this issue Mar 11, 2024
### Rationale for this change

```text
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?

* Add missing `URI_STATIC_BUILD` macro definition that was removed by #39824 accidentally.
* Add missing `crypt32.lib` dependency to `aws-c-io`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #40445

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 16.0.0 milestone Mar 11, 2024
@kou
Copy link
Member Author

kou commented Mar 11, 2024

Issue resolved by pull request 40446
#40446

@kou kou closed this as completed Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant