-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Boost 1.86 SHA1 compatibility fix #69
Open
jmakovicka
wants to merge
3
commits into
conda-forge:main
Choose a base branch
from
jmakovicka:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
__migrator: | ||
build_number: 1 | ||
kind: version | ||
commit_message: "Rebuild for libboost 1.86" | ||
migration_number: 1 | ||
assimp: | ||
- 5.4.2 | ||
libboost_devel: | ||
- "1.86" | ||
libboost_headers: | ||
- "1.86" | ||
libboost_python_devel: | ||
- "1.86" | ||
migrator_ts: 1723764795.6693385 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff -ur lightgbm-4.5.0.orig/external_libs/compute/include/boost/compute/detail/sha1.hpp lightgbm-4.5.0/external_libs/compute/include/boost/compute/detail/sha1.hpp | ||
--- lightgbm-4.5.0.orig/external_libs/compute/include/boost/compute/detail/sha1.hpp 2022-11-09 07:37:21.000000000 -0500 | ||
+++ lightgbm-4.5.0/external_libs/compute/include/boost/compute/detail/sha1.hpp 2025-02-11 04:25:47.787251140 -0500 | ||
@@ -37,12 +37,12 @@ | ||
} | ||
|
||
operator std::string() { | ||
- unsigned int digest[5]; | ||
+ boost::uuids::detail::sha1::digest_type digest; | ||
h.get_digest(digest); | ||
|
||
std::ostringstream buf; | ||
- for(int i = 0; i < 5; ++i) | ||
- buf << std::hex << std::setfill('0') << std::setw(8) << digest[i]; | ||
+ for(size_t i = 0; i < sizeof(digest) / sizeof(digest[0]); ++i) | ||
+ buf << std::hex << std::setfill('0') << std::setw(sizeof(digest[0]) * 2) << digest[i]; | ||
|
||
return buf.str(); | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this is ok, but writing out my reasoning to be sure I'm understanding correctly.
The file you're patching here is in LightGBM's vendored copy of the Boost 1.74 headers.
But here in conda-forge,
lib_lightgbm
is dynamically linking against the latestlibboost-devel
(1.87.0 as of this writing).lightgbm-feedstock/recipe/meta.yaml
Line 38 in bca9f5e
So this allows LightGBM to be built successfully, by pulling forward a specific breaking change in Boost (the one @sofiageo mentioned in microsoft/LightGBM#6786 (comment)).
Right?
If so I'm ok with that. But this is a fragile state to be in (vendoring headers from a version and then linking against a shared library from a different version).
If you know how to get LightGBM building successfully with Boost 1.87, we'd welcome help upstream (cc @StrikerRUS): microsoft/LightGBM#6582
And also longer-term, LightGBM should really be modified upstream to stop vendoring these headers and to instead expect them to be provided in the build environment (maybe as part of microsoft/LightGBM#6774).
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.
According to the logs, boost 1.86 is used for during build (and present in the resulting
index.json
).Yes, the only difference is that my version works with both pre- and post-1.86 boost. The above PR works with >=1.86 only.
I didn't try 1.87 yet, because most of conda-forge is compatible with 1.86 at maximum.
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.
Ah ok, I see the global pinnings are to 1.84:
https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/68572f6d6810c68678b33c5698eb03fcaeac8340/recipe/conda_build_config.yaml#L463-L468
And that there's a migration in progress to upgrade packages to 1.86:
https://conda-forge.org/status/migration/?name=libboost186