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

Feature Request: Opt ouf of blosc_get_cpu_features #602

Closed
milesgranger opened this issue Apr 19, 2024 · 3 comments
Closed

Feature Request: Opt ouf of blosc_get_cpu_features #602

milesgranger opened this issue Apr 19, 2024 · 3 comments

Comments

@milesgranger
Copy link
Contributor

Hello there.

I'm trying to build on musllinux, and also had this issue on x86_64-apple-darwin when statically linking:

/usr/local/musl/bin/../lib/gcc/x86_64-unknown-linux-musl/11.2.0/../../../../x86_64-unknown-linux-musl/bin/ld: /tmp/rustc88VirH/libblosc2-d98c3a018c009f3b.rlib(shuffle.c.o): in function `bitunshuffle':
          shuffle.c:(.text+0x523): undefined reference to `__cpu_model'

full example from workflow: https://github.com/milesgranger/cramjam/actions/runs/8749803819/job/24012143129#step:10:361


It appears this is based off determining HAVE_CPU_FEAT_INTRIN here:

#define HAVE_CPU_FEAT_INTRIN

Then will try to get cpu features here:

#if defined(HAVE_CPU_FEAT_INTRIN)


Feature request

I've found if I add an additional logic to opt out, ex "OPT_OUT_CPU_FEAT" to get this function instead, then everything is happy again. But there is also a good chance I'm missing something here. :)

static blosc_cpu_features blosc_get_cpu_features(void) {

@milesgranger
Copy link
Contributor Author

The workflow originally linked is to cramjam, some python bindings to the Rust bindings (blosc2-rs)

There is maybe a more relevant representation of the issue, you can see I have builds for other environment types and the one added here is failing for musl: https://github.com/milesgranger/blosc2-rs/actions/runs/8804935253/job/24166419904?pr=10#step:5:173

Happy to try out any forks/branches if that's helpful, thank you. 👍

@FrancescAlted
Copy link
Member

I'm not the one who contributed that part of the code, but I'll be happy to try your approach. I suggest you to send a PR, let it run in the CI Actions here and see how it goes. Thank you!

@milesgranger
Copy link
Contributor Author

xref: #603 (comment)

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

Successfully merging a pull request may close this issue.

2 participants