-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[lightgbm] Add open-source library lightgbm to vcpkg #39395
[lightgbm] Add open-source library lightgbm to vcpkg #39395
Conversation
De-vendored dependencies listed in vcpkg.json. "Fast double parser" is not a vcpkg port, however "Fast float parser" is which is the successor to "Fast double parser". Do not want to alter lightgbm to utilize the new library. Pulled sub-module git commit and copied into expected folder as seen done elsewhere in this repo. |
Feature passed with following triplets:
|
Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags. |
Thanks for the review. Made the requested changes. Let me know if the description isn't condensed enough. |
ports/lightgbm/portfile.cmake
Outdated
) | ||
|
||
# Fast double parser is a non-vcpkg dependency of LightGBM | ||
vcpkg_from_github( |
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 seems like this should be a separate port instead of vendoring it into this one.
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.
Devendored fast double parser based on a PR to convert it into a port as well:
#39421
Pulled this into a draft (as it will now break until the above PR is merged). Will perform an empty push to retrigger CI once the fast double parser (a header only library) is resolved.
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.
@BillyONeal, this has been resolved. Thanks for the timely review on the fast double parser PR!
install( | ||
DIRECTORY ${FMT_INCLUDE_DIR}/ | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/LightGBM/utils | ||
- FILES_MATCHING PATTERN "*.h" |
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.
Is this fix submitted 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.
No, removed from this PR
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 mean, wasn't it fixing some sort of problem by being here? I just want to make sure that changes we make get appropriately upstreamed instead of remaining only in our own patches forever.
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.
When I was devendoring a few of the original packages, I thought there was an issue here. But no, it was related to something else. The patch for this pattern wasn't needed here.
Reformat manifest Version database Finish devendoring
ff3933e
to
5af2d43
Compare
…hdavi/newport-lightgbm
-set(FMT_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/external_libs/fmt/include") | ||
-include_directories(${FMT_INCLUDE_DIR}) | ||
+find_path(FAST_DOUBLE_PARSER_INCLUDE_DIR fast_double_parser.h) | ||
+set(FAST_DOUBLE_PARSER_INCLUDE_DIR ${VCPKG_INCLUDE_DIR}) |
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.
+set(FAST_DOUBLE_PARSER_INCLUDE_DIR ${VCPKG_INCLUDE_DIR}) |
The find_path should do that, right?
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.
Thanks for the catch.
set(Boost_USE_STATIC_LIBS ON) | ||
endif() | ||
- find_package(Boost 1.56.0 COMPONENTS filesystem system REQUIRED) | ||
+ find_package(Boost 1.56.0 COMPONENTS filesystem system compute REQUIRED) |
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.
+ find_package(Boost 1.56.0 COMPONENTS filesystem system compute REQUIRED) | |
+ find_package(Boost COMPONENTS filesystem system compute REQUIRED) |
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.
Sorry for the split review :/
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.
Can you explain this change? Why would we want to remove the minimum version the original CMakeLists was asking for.
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 we don't want version constraints in the build system, since we consider version under the control of the ultimate downstream customer. But given that build passed it's not worth resetting over this.
Thanks for the new port! |
Thanks for taking the time to review! |
Add open-source library lightgbm to vcpkg
LightGBM GitHub Repo: https://github.com/microsoft/LightGBM
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.