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

vcpkg install on linux skip detect poll API #9921

Closed
comphilip opened this issue Nov 16, 2022 · 3 comments
Closed

vcpkg install on linux skip detect poll API #9921

comphilip opened this issue Nov 16, 2022 · 3 comments
Labels

Comments

@comphilip
Copy link

comphilip commented Nov 16, 2022

I did this

After running vcpkg install curl , running grep HAVE_POLL_FINE <VCPKG_DIR>/buildtrees/curl/x64-linux-rel/lib/curl_config.h, it shows

/* #undef HAVE_POLL_FINE */

Without poll API, curl multi-api cannot handle more than 1024 concurrent connections with select API.

I expected the following

curl build with poll api supported: HAVE_POLL_FINE should be defined in curl_config.h

curl/libcurl version

7.84.0

operating system

Linux phillip-dev 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Root Cause

CMake script skip detecting poll API if CMAKE_TOOLCHAIN_FILE defined(My guess: skip detecting POLL API if cross-compile). CMAKE_TOOLCHAIN_FILE is always defined in vcpkg:https://vcpkg.io/en/docs/maintainers/vcpkg_cmake_configure.html#implicit-options

if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)

@bagder bagder added the cmake label Nov 16, 2022
bagder added a commit that referenced this issue Nov 16, 2022
Build systems like vcpkg alway sets `CMAKE_TOOLCHAIN_FILE` so it should
not be used as a sign that this is a cross-compile.

Also indented the function correctly.

Reported-by: Philip Chan
Fixes #9921
@bagder
Copy link
Member

bagder commented Nov 16, 2022

Does #9923 fix the problem for you?

@comphilip
Copy link
Author

comphilip commented Nov 16, 2022

@bagder Yes it does fix the problem.

@bagder
Copy link
Member

bagder commented Nov 16, 2022

Excellent, thanks for confirming!

@bagder bagder closed this as completed in 14d5589 Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants