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

Build failure with c2hs involving __v8hf #90

Open
sheaf opened this issue Jun 10, 2023 · 3 comments
Open

Build failure with c2hs involving __v8hf #90

sheaf opened this issue Jun 10, 2023 · 3 comments

Comments

@sheaf
Copy link

sheaf commented Jun 10, 2023

I'm getting the following build failure when building hw-json-simd:

Configuring library for hw-json-simd-0.1.1.2..
Preprocessing library for hw-json-simd-0.1.1.2..
c2hs: C header contains errors:

/nix/store/kf147vkmb7a7z17lkpgj2d6y7w75nf7v-gcc-12.2.0/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/include/avx512fp16intrin.h:38: (column 18) [ERROR]  >>> Syntax error !
  The symbol `__v8hf' does not fit here.
@sheaf
Copy link
Author

sheaf commented Jun 10, 2023

A very silly workaround is:

  • comment out #include <immintrin.h> in cbits/intrinsics.h
  • start building the package, it will error out
  • comment back in the include
  • try building the package again; the recompilation logic won't try to start from the beginning, and it will be possible to finish compilation

@sheaf
Copy link
Author

sheaf commented May 2, 2024

This error seems to be specific to nix. Further discussion of the issue can be found here; it concludes:

Thus it appears the error message is coming from c2hs trying to use whatever gcc was used to build GHC.

@tbidne
Copy link

tbidne commented May 8, 2024

@sheaf I actually noticed your (this) issue when I ran into this problem myself in the issue you linked (sorry, should have pinged you). I have yet to make any more progress, however...

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