-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[nghttp2-asio] Add nghttp2-asio port #29714
Conversation
@microsoft-github-policy-service agree |
Could someone explain to me how I can read the error logs? |
You could get all of the error logs from https://dev.azure.com/vcpkg/public/_build/results?buildId=85548&view=artifacts&pathAsName=false&type=publishedArtifacts |
a331dd1
to
3cd1b8f
Compare
Thanks for the review. Apparently the library isn't supported on windows (yet).
|
If the upstream does not support window itself, we can add |
3310b48
to
8635fff
Compare
I fixed all compile errors. Some errors "unresolved external symbol" remain when linking dynamically on windows. Most needed symbols come from OpenSSL. I have OpenSSL I'm not an expert for windows and could use some help here. |
AFAICS the package is using CMake. So the natural way to deal with an OpenSSL dependency is There seem to be too many modifications. In particular, I don't see why there is a need to have three |
4b30c3c
to
a580e72
Compare
I disabled the port for windows. I have a patch for windows but it would need manual testing. Supporting I've added a dependency of |
I think it also nice if you can make a PR in upstream to fix windows compilation. |
Agreed. I already did that in #13. |
+# Static library | ||
+if(ENABLE_STATIC_LIB) | ||
+ add_library(nghttp2_asio_static STATIC) | ||
+ target_link_libraries(nghttp2_asio_static PUBLIC nghttp2_asio_object $<TARGET_OBJECTS:url-parser>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, static and shared libraries should be named the same. This will allow consumers of this library to use a common name. Also as @dg0yt pointed out, I don't think we need that many add_library
calls as the library linkage is inferred from BUILD_SHARED_LIBS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I can patch with a smaller diff. I just used the very same change that I already submitted upstream. But you are right that this arguably adds more features than strictly necessary.
Please note though, that the library files (not cmake libraries) have identical basenames.
Do you prefer the single add_library
call or could the patch be merged as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will upstream decide?
When will be the next release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. I'm not a maintainer. Upstream has been pretty quiet lately, no releases so far.
Would you prefer a smaller patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what upstream wants. But vcpkg doesn't need Support linking both statically and shared during the same build. This is popular with autotools build systems, but it is sort-of an anti-pattern for CMake build systems, at least as used in vcpkg: You have to add more CMake code everywhere, for cases which could be switched with the standard BUILD_SHARED_LIBS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, no worries. I'll provide a simpler patch.
The nghttp2_asio library was formerly part of nghttp2 but by now is distributed as separate library.
I tried to upstream my fixes for building dynamic library with MSVC + building static library on macOS and Linux, nobody seemed to be interested: |
Don't worry. maybe it take time. If not, we move forward. |
The nghttp2_asio library was formerly part of nghttp2 but by now is distributed as separate library. Add a port for this library.
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxxvcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.