-
Notifications
You must be signed in to change notification settings - Fork 88
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
Cannot import LZ4 #506
Comments
I had forgotten to put the link for the full build and test log, it's now here as well as in the corrected link in the original post. |
Ok, so apparently for some reason the import fails if the package is built without the This build (CFLAGS are "-march=native -O2 -pipe"), results in:
This build (CFLAGS are "-march=native -O2 -pipe -flto=auto") works fine. This build (CFLAGS are "-march=native -O2 -pipe" but it also has I have no idea what this could be about. Do any of you know more? |
See also: zarr-developers/numcodecs#506 (comment) Signed-off-by: Horea Christian <[email protected]>
cc: @jakirkham |
I was working out a similar issue earlier. From my experience that error occurred when the lz4.h was not found when the .pyx is compiled. For me adding the following to the extension resolved the issue
|
@leaver2000 what do you mean by “adding” — is this some sort of patch that could be applied to the source code to make it less fragile to compiler options? |
@TheChymera The error you described was identical to the issue I ran into when the lz4_sources could not be found during setup
https://github.com/zarr-developers/numcodecs/blob/main/setup.py#L188 extensions = [
Extension('numcodecs.lz4',
sources=sources + lz4_sources,
include_dirs=include_dirs,
define_macros=define_macros,
extra_compile_args=extra_compile_args,
libraries="lz4", # adding resolved my issues.
),
] Maybe just chuck a in an assert into the setup.py, to insure your compiler flags are not messing the install.
|
For context, though probably not relevant, I am trying to debug this issue with a package which uses numcodecs.
I have installed numcodecs via the Gentoo Linux package manager full build and test log here.
The lz4 test is indeed skipped:
But the build says the module is being built:
Any idea what might be going on here?
The text was updated successfully, but these errors were encountered: