-
Notifications
You must be signed in to change notification settings - Fork 232
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
Fixing lzma configuration #374
Comments
We are hitting the same problem, this is currently preventing us from updating to a newer boost version. Does anyone have a workaround for this? |
This seems to have been broken by 02de303 which changed this line in config.lzma-linux.h
to
I generally wonder how a platform-agnostic This was also noted in #319:
|
Hey, guys. Agreed. I merged that PR since it seemed like an incremental improvement, but I totally agree about the (preexisting) underlying problems around configuration--which is why I wrote that part you quoted. I don't currently have bandwidth to really roll up my sleeves and fix, so I'm going to have to ask you guys experiencing the problem to explore fixes. (Sorry--would truly like to help more but am just overloaded, am not currently using linux/these compression libraries, and am just here to help out occasionally where I have comparative advantage.) Some thoughts about how we might eliminate the issue:
Quick fixes--if you want to plug the gap in the meantime--since we shouldn't let the perfect be the enemy of the good:
#if defined __has_include
#if __has_include (<immintrin.h>)
#define HAVE_IMMINTRIN_H 1
#endif
#endif maybe also testing that the following (inner block) works, just to make sure you're hitting the __has_include block OK. #if __has_include (<immintrin.h>)
#define HAVE_IMMINTRIN_H 1
#endif That said, the above would be a stopgap that would leave real problems. Please also respond to the above! Cheers, |
@cpsauer Thanks for looking into this. We're not blocked on this, we're currently patching this locally as a workaround.
That's not an option, we're aiming at a fully hermetic build. (CC @sfc-gh-rwoodbury)
We're doing that for other dependencies as well. I am not entirely sure about the drawbacks of this (again CC @sfc-gh-rwoodbury). While we have statically generated config headers for some dependencies ourselves, I think it's hard to provide these for a wider scope, where the build environment is not sufficiently constrained. We'll check out if
works. It seems there's no non-Intel architecture Linux CI job for |
This seems to work:
|
Temporary workaround until more full resolution of #374
Temporary workaround until more full resolution of #374
Great; thanks for checking out the temporary workaround. I just PR'd and merged the full version (backlinked above) so you can stay on the mainline, unpatched. (Or if you have more patches, please PR them!) I'll change the title of this issue to reflect the change in scope towards more generally fixing lzma configuration on linux. We'd really appreciate your help and expertise switching liblzma[linux] to rules_foreign_cc--or otherwise calling their build scripts directly--to prevent things like this in the future, and make things more correct! (And sorry again that this issue pre-exists. Wish I had the bandwidth to just fix for you.) For my continued learning: What's the underlying draw for you guys to hermeticity vs. just reproducibility? |
Realized I forgot to reply to this part. Sure! I'll add to .bazelci. |
In response to #374 (For my future reference: The list of bazel ci supported platforms is in PLATFORMS, here: https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/bazelci.py)
In response to #374 (For my future reference: The list of bazel ci supported platforms is in PLATFORMS, here: https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/bazelci.py)
^ The ARM Linux CI change is ready to go in #390, but it looks like there are actually more fixes needed to build lzma on ARM Linux, beyond the cpu.h __has_include I quickly added. See errors in the bazelci on #390 (ignoring circleci). I don't have the power to merge things that don't pass CI, so if y'all move things over to rules_foreign_cc (and/or upstream the patches you use to build successfully), then ping me I'll merge that ARM Linux testing PR! |
It turns out the approach with We indeed switched to build lzma using |
Thanks for following up. Would you be willing to give back and contribute your fix? |
Could this be resolved the same way osx arm64 is handled? Just need a good config.h generated on linux arm64, condition the linux config on os + arch instead of just os. |
I think so (esp for Android). Though distos might differ? The benefit being that Bazel still does the build. The downside is that people would need to manually regenerate all config.h to update dependencies, which is a problem bc not a lot of people have all platforms handy. Could either generate the config.h using ./configure on build (if needed for distro differences) or add a CI step that checks for the right config across platforms and makes differences copy/pastable? [For non-Android Linux w/ good package managers built in, part of me still thinks we should just use their binary distributions and save build time and hassle.] |
I don't have a patch at hand (we just have a BUILD.bazel file for lzma in our own repo now), but it's essentially this:
While this might work, I think that's far from ideal, because you're pinning what the |
The "right thing" to do would be to re-implement what |
kk. to echo back, sounds like the expectations is that Linux distros differ enough that we'd want to run Thoughts on just generating |
^ Would still love an answer on this one. It'll help me guide things towards being good for you and other Linux users |
Yes, I don't think that can generally work without using something like https://snapcraft.io/ (which isn't without drawbacks either).
I am not sufficiently proficient in Bazel to really judge that option, but doesn't this still incur the drawbacks that using
Sorry I skipped over that question, but again, I can't really answer this in depth. We don't have reproducibility (which would, aside from a lot of other work, require to eliminate any time differences from sneaking into the build result). I am not entirely sure how hermeticity and reproducibility are related. Probably hermeticity is a precondition for "portable" reproducibility. |
In response to #374 (For my future reference: The list of bazel ci supported platforms is in PLATFORMS, here: https://github.com/bazelbuild/continuous-integration/blob/master/buildkite/bazelci.py)
Build will be failed for
lzma
at arm64 platform.The text was updated successfully, but these errors were encountered: