Skip to content

Conversation

@Znurre
Copy link
Contributor

@Znurre Znurre commented Nov 11, 2022

Update curl to version 7.86.0

  • What does your PR fix?

Bumps the version of curl to 7.86.0 and adds WebSockets as a feature

  • Which triplets are supported/not supported? Have you updated the CI baseline?

No, unchanged.

I think so. I have done my best to conform, but this is my first contribution, so please be kind :)

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

@Znurre
Copy link
Contributor Author

Znurre commented Nov 11, 2022

@microsoft-github-policy-service agree

@Znurre
Copy link
Contributor Author

Znurre commented Nov 12, 2022

I notice that multiple workflows failed. Looking at the logs, I can see that curl (which I updated) is seemingly passing. Are the failures unrelated to my changes? Or are they caused by other packages which are dependent on curl, which for some reason fail due to my changes?

Any advice would be appreciated! 🙂

@dg0yt
Copy link
Contributor

dg0yt commented Nov 12, 2022

Your PR looks good. However, upstream changes (in CURL) may have changed usage requirements. This often shows up only when a downstream port builds executables (resolving all static libs).
You can download the failure logs from CI, the download is a little bit hidden behind a three-dots menu on the right side of a failure log asset, visible only when hovering the line of interest:
https://dev.azure.com/vcpkg/public/_build/results?buildId=80791&view=artifacts&pathAsName=false&type=publishedArtifacts

@Osyotr
Copy link
Contributor

Osyotr commented Nov 12, 2022

You can download failure logs to see what exactly has failed.

image

@Znurre
Copy link
Contributor Author

Znurre commented Nov 12, 2022

Thanks a lot for the advice! I will investigate.

@FrankXie05 FrankXie05 self-assigned this Nov 14, 2022
@FrankXie05 FrankXie05 added the category:port-update The issue is with a library, which is requesting update new revision label Nov 14, 2022
@FrankXie05
Copy link
Contributor

Thank you very much for submitting this PR :). It seems to be an error of LNK2019.
You can view the corresponding error causes and solutions through https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019?view=msvc-160.

FAILED: azure-core.dll azure-core.lib 
cmd.exe /C "cmd.exe /C "D:\downloads\tools\cmake-3.24.0-windows\cmake-3.24.0-windows-i386\bin\cmake.exe -E __create_def D:\buildtrees\azure-core-cpp\x86-windows-dbg\CMakeFiles\azure-core.dir\.\exports.def D:\buildtrees\azure-core-cpp\x86-windows-dbg\CMakeFiles\azure-core.dir\.\exports.def.objs && cd D:\buildtrees\azure-core-cpp\x86-windows-dbg" && D:\downloads\tools\cmake-3.24.0-windows\cmake-3.24.0-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\azure-core.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~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x86\link.exe  CMakeFiles\azure-core.dir\src\http\curl\curl.cpp.obj CMakeFiles\azure-core.dir\src\http\winhttp\win_http_transport.cpp.obj CMakeFiles\azure-core.dir\src\azure_assert.cpp.obj CMakeFiles\azure-core.dir\src\base64.cpp.obj CMakeFiles\azure-core.dir\src\context.cpp.obj CMakeFiles\azure-core.dir\src\cryptography\md5.cpp.obj CMakeFiles\azure-core.dir\src\cryptography\sha_hash.cpp.obj CMakeFiles\azure-core.dir\src\datetime.cpp.obj CMakeFiles\azure-core.dir\src\environment.cpp.obj CMakeFiles\azure-core.dir\src\environment_log_level_listener.cpp.obj CMakeFiles\azure-core.dir\src\etag.cpp.obj CMakeFiles\azure-core.dir\src\exception.cpp.obj CMakeFiles\azure-core.dir\src\http\bearer_token_authentication_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\http.cpp.obj CMakeFiles\azure-core.dir\src\http\http_sanitizer.cpp.obj CMakeFiles\azure-core.dir\src\http\log_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\policy.cpp.obj CMakeFiles\azure-core.dir\src\http\raw_response.cpp.obj CMakeFiles\azure-core.dir\src\http\request.cpp.obj CMakeFiles\azure-core.dir\src\http\request_activity_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\retry_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\telemetry_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\transport_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\url.cpp.obj CMakeFiles\azure-core.dir\src\http\user_agent.cpp.obj CMakeFiles\azure-core.dir\src\io\body_stream.cpp.obj CMakeFiles\azure-core.dir\src\io\random_access_file_body_stream.cpp.obj CMakeFiles\azure-core.dir\src\logger.cpp.obj CMakeFiles\azure-core.dir\src\operation_status.cpp.obj CMakeFiles\azure-core.dir\src\strings.cpp.obj CMakeFiles\azure-core.dir\src\tracing\tracing.cpp.obj CMakeFiles\azure-core.dir\src\uuid.cpp.obj  /out:azure-core.dll /implib:azure-core.lib /pdb:azure-core.pdb /dll /version:0.0 /machine:X86 /nologo    /debug /INCREMENTAL  /DEF:CMakeFiles\azure-core.dir\.\exports.def  bcrypt.lib  crypt32.lib  D:\installed\x86-windows\debug\lib\libcurl-d.lib  winhttp.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x86\link.exe CMakeFiles\azure-core.dir\src\http\curl\curl.cpp.obj CMakeFiles\azure-core.dir\src\http\winhttp\win_http_transport.cpp.obj CMakeFiles\azure-core.dir\src\azure_assert.cpp.obj CMakeFiles\azure-core.dir\src\base64.cpp.obj CMakeFiles\azure-core.dir\src\context.cpp.obj CMakeFiles\azure-core.dir\src\cryptography\md5.cpp.obj CMakeFiles\azure-core.dir\src\cryptography\sha_hash.cpp.obj CMakeFiles\azure-core.dir\src\datetime.cpp.obj CMakeFiles\azure-core.dir\src\environment.cpp.obj CMakeFiles\azure-core.dir\src\environment_log_level_listener.cpp.obj CMakeFiles\azure-core.dir\src\etag.cpp.obj CMakeFiles\azure-core.dir\src\exception.cpp.obj CMakeFiles\azure-core.dir\src\http\bearer_token_authentication_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\http.cpp.obj CMakeFiles\azure-core.dir\src\http\http_sanitizer.cpp.obj CMakeFiles\azure-core.dir\src\http\log_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\policy.cpp.obj CMakeFiles\azure-core.dir\src\http\raw_response.cpp.obj CMakeFiles\azure-core.dir\src\http\request.cpp.obj CMakeFiles\azure-core.dir\src\http\request_activity_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\retry_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\telemetry_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\transport_policy.cpp.obj CMakeFiles\azure-core.dir\src\http\url.cpp.obj CMakeFiles\azure-core.dir\src\http\user_agent.cpp.obj CMakeFiles\azure-core.dir\src\io\body_stream.cpp.obj CMakeFiles\azure-core.dir\src\io\random_access_file_body_stream.cpp.obj CMakeFiles\azure-core.dir\src\logger.cpp.obj CMakeFiles\azure-core.dir\src\operation_status.cpp.obj CMakeFiles\azure-core.dir\src\strings.cpp.obj CMakeFiles\azure-core.dir\src\tracing\tracing.cpp.obj CMakeFiles\azure-core.dir\src\uuid.cpp.obj /out:azure-core.dll /implib:azure-core.lib /pdb:azure-core.pdb /dll /version:0.0 /machine:X86 /nologo /debug /INCREMENTAL /DEF:CMakeFiles\azure-core.dir\.\exports.def bcrypt.lib crypt32.lib D:\installed\x86-windows\debug\lib\libcurl-d.lib winhttp.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\azure-core.dir/intermediate.manifest CMakeFiles\azure-core.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library azure-core.lib and object azure-core.exp
curl.cpp.obj : error LNK2019: unresolved external symbol __imp__setsockopt@20 referenced in function __catch$?ParseChunkSize@CurlSession@Http@Core@Azure@@AAEXABVContext@34@@Z$0
curl.cpp.obj : error LNK2019: unresolved external symbol __imp__shutdown@8 referenced in function "public: virtual void __thiscall Azure::Core::Http::CurlConnection::Shutdown(void)" (?Shutdown@CurlConnection@Http@Core@Azure@@UAEXXZ)
curl.cpp.obj : error LNK2019: unresolved external symbol __imp__WSAIoctl@36 referenced in function __catch$?ParseChunkSize@CurlSession@Http@Core@Azure@@AAEXABVContext@34@@Z$0
curl.cpp.obj : error LNK2019: unresolved external symbol __imp__WSAPoll@12 referenced in function __catch$?ParseChunkSize@CurlSession@Http@Core@Azure@@AAEXABVContext@34@@Z$0
azure-core.dll : fatal error LNK1120: 4 unresolved externals
ninja: build stopped: subcommand failed

Log from: https://dev.azure.com/vcpkg/public/_build/results?buildId=80791&view=artifacts&pathAsName=false&type=publishedArtifacts

install-x86-windows-dbg-out.log

@Znurre
Copy link
Contributor Author

Znurre commented Nov 14, 2022

Thank you @FrankXie05 !

After spending a couple of hours on this though, I can't say that I am any wiser.

The OpenSSL problem I can reproduce on my Linux machine, but I have no idea what is causing it.
I can see that ssl is a default feature of curl, and for Linux (and macOS) it makes sense that curl would link against OpenSSL.
However, I do not understand why aws-sdk-cpp specifically would have a problem with that, and I don't see any obvious upstream curl change that might have caused the issue.
The linking problem on Windows, I cannot even reproduce locally on my Windows machine.

I don't know how to proceed with this, and I think I need to admit defeat on this one. My cmake and vcpkg skills are simply too lacking.

Should I close the PR, or do you want to keep it open for the case that someone else wants to take over?

@FrankXie05
Copy link
Contributor

@Znurre Never mind, I will take over this PR. :)

github-actions[bot]
github-actions bot previously approved these changes Nov 17, 2022
github-actions[bot]
github-actions bot previously approved these changes Nov 18, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have modified or added at least one vcpkg.json where you should check the license field.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/aws-sdk-cpp/vcpkg.json

Valid values for the license field can be found in the documentation

@BillyONeal
Copy link
Member

I am not sure why check_cxx_source_runs seems to hate private dependencies; aws sdk's CMake is ... strange. I think the break was caused by curl/curl#9125 . I pushed a change that works around the problem by locking the selected curl features, thus eliminating the need for check_cxx_source_runs in the first place.

@BillyONeal
Copy link
Member

Also, I am super not confident that 98e3bbb is correct; I would appreciate other reviwers.

antkmsft pushed a commit to Azure/azure-sdk-for-cpp that referenced this pull request Nov 19, 2022
…t/vcpkg#27778 (#4127)

Curl is no longer publishing that it depends on ws2_32 when dynamically linked. Azure Core directly uses Ws2_32 things, so it needs that declared dependency. For example:

https://github.com/Azure/azure-sdk-for-cpp/blob/90fc46693f4b90b805047f165c0b41e07e867594/sdk/core/azure-core/src/http/curl/curl.cpp#L165
@FrankXie05 FrankXie05 added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Nov 21, 2022
@JavierMatosD
Copy link
Contributor

Thank you!

@JavierMatosD JavierMatosD merged commit b224213 into microsoft:master Nov 21, 2022
lukaszmoroz pushed a commit to lukaszmoroz/vcpkg that referenced this pull request Nov 24, 2022
* [curl] Update to 7.86.0

* [azure-core-cpp] Add missing Ws2_32.lib.

Filed upstream as Azure/azure-sdk-for-cpp#4127

* [aws-sdk-cpp] Lock the selected curl features.

Co-authored-by: FrankXie <[email protected]>
Co-authored-by: Billy Robert O'Neal III <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-update The issue is with a library, which is requesting update new revision info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants