-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[man-group-sparrow] New port #43989
base: master
Are you sure you want to change the base?
[man-group-sparrow] New port #43989
Conversation
Please get failure logs for x64-windows here.
|
When testing usage, the following error occurs:
test.cpp#include <iostream> #include "sparrow/sparrow.hpp" CMakeLists.txtcmake_minimum_required (VERSION 3.8) |
@toge would you be able to name that package "sparrow" rather than "man-group-sparrow"? It is named sparrow on Fedora and conda-forge. Vcpkg using a different name for the package would cause a lot of confusion in my opinion. |
+if("@USE_DATE_POLYFILL@") | ||
+ find_dependency(date) | ||
+endif() | ||
+ |
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.
Don't hesitate to open a PR on https://github.com/man-group/sparrow/
We can review and merge it asap
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.
@Alex-PLACET
Thank you for your advise!
I am going to create PR for it.
OPTIONS | ||
${FEATURE_OPTIONS} | ||
-DBUILD_TESTS=OFF | ||
-DBUILD_EXAMPLES=OFF |
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 the 0.4 version, you can compile shared library using -DSPARROW_BUILD_SHARED, otherwise it compile in static
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.
@Alex-PLACET
Thanks!
I will upgrade sparrow to 0.4.0.
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
date USE_DATE_POLYFILL | ||
large-int-placeholder USE_LARGE_INT_PLACEHOLDERS |
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.
USE_LARGE_INT_PLACEHOLDERS is mandatory on Windows
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.
This is the fix for: #43989 (comment)
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.
@Alex-PLACET
I think this seems a little different.
This PR has large-int-placeholder
enabled by default for compatibility.
This means that USE_LARGE_INT_PLACEHOLDERS
is enabled and the library can be compiled successfully.
However, when compiling a test program that uses sparrow, MSVC mets compile errors due to the absence of USE_LARGE_INT_PLACEHOLDERS
.
To avoid this, it would be better to use config.h which defines USE_LARGE_INT_PLACEHOLDERS
using CMake's configure.
I am going to create a PR on upstream.
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.
You could make the port depend on its own feature large-int-placeholder
for "platform": "windows"
.
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 really mean listing in dependencies
, not in default features:
{
"name": "man-group-sparrow",
"default-features": false,
"platform": "windows",
"features": [
"large-int-placeholder"
]
},
plus formatting/sorting as needed.
if(VCPKG_TARGET_IS_LINUX) | ||
message("Warning: `sparrow` requires Clang18+ or GCC 12+ on Linux") | ||
endif() |
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.
It also MSVC 19.41+ on Windows and Apple Clang 16+ on MacOS
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.
@Alex-PLACET
I agree. However, this seems to be a vcpkg convention.
Because only Linux outputs a warning message about the compiler version when checking other ports.
@SylvainCorlay @MonicaLiu0311 |
The policy says "Projects with short names or named after common words may require disambiguation, specially when there are no projects with a strong association to the given word. " I guess that we fall in the category of "common word", although the policy uses the "may" word, which is not a strong statement. In terms of strong association, sparrow is clearly not zlib or openssl, but it is available under that name on several software distributions, including a linux distribution. |
There was a name discussion last year, with that outcome: #37221 (comment) |
At that time, sparrow was not available on Fedora. We were at at a 0.0.x release level. So I believe the situation is a bit different now. |
@BillyONeal Please help us check whether we should maintain the original judgment on the port name. Information about sparrow on other platforms: https://packages.fedoraproject.org/pkgs/sparrow/sparrow/ |
find_package
calls are REQUIRED, are satisfied byvcpkg.json
's declared dependencies, or disabled with CMAKE_DISABLE_FIND_PACKAGE_Xxx.vcpkg.json
matches what upstream says.vcpkg.json
matches what upstream says../vcpkg x-add-version --all
and committing the result.There are several
sparrow
pacakges. refsparrow 0.3.0 provides shared library only.