Skip to content
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

Failure building on linux with _xgetbv #629

Open
ax3l opened this issue Jul 30, 2024 · 3 comments
Open

Failure building on linux with _xgetbv #629

ax3l opened this issue Jul 30, 2024 · 3 comments

Comments

@ax3l
Copy link
Contributor

ax3l commented Jul 30, 2024

Describe the bug
I observe a compile issue of downstream packages (i.e., adios2) built against c-blosc2 using the Spack package manager. Somehow, c-blosc2 links against _xgetbv. Is this used in c-blosc2?

To Reproduce
Detailed in spack/spack#45253

Expected behavior
Should build. Looks like a transitive dependency is not exposed as public in CMake?

Logs
If applicable, add logs to help explain your problem.

System information:

  • OS: Ubuntu 22.04
  • Compiler: Clang 7 & 8
  • Version: 2.11.1
@FrancescAlted
Copy link
Member

Yes, it does: https://github.com/Blosc/c-blosc2/blob/main/blosc/shuffle.c#L221

In principle GCC folks added _xgetbv in immintrin.h starting in GCC 9. If using a GCC less than this, an internal implementation is provided. Not sure what you mean by transitive dependency, but if you think something is missing, please tell us.

Maybe unrelated, but in newest (and just tagged) 2.15.1 we have fixed some issues related with compiling shuffle.c (#622). Can you try with this version?

@ax3l
Copy link
Contributor Author

ax3l commented Aug 5, 2024

Thank you for the details.
Ah, that makes sense.

I double checked, and I do see the issues with Clang 7 and 8 in CI... I wondered if a compiler flag that adds an intrinsic or external library for these calls is only added PRIVATE (during c-blosc2 compile) but might be missing to append an extra library in the PUBLIC CMake library interfaces.

I'll give the latest release a try! spack/spack#45582

@FrancescAlted
Copy link
Member

Ping? Can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants