Closed leftaroundabout closed 1 month ago
Yes, that's why I made a modification to the language-c library to handle _Alignas. I did a PR but I don't think the maintainer for that project accepted it yet. You'll need that and a modified version of c2hs which uses it in order to compile cuda-12.2. Sorry, I should have mentioned that.
@noahmartinwilliams right, https://github.com/visq/language-c/pull/94 seems to fix this issue.
Not completely sure as I'm getting different compilation errors now...
@leftaroundabout , What are the new errors?
@noahmartinwilliams I think it is completely unrelated to this issue. The error is
undefined symbol: _ZSt7nothrow
This happens specifically when I'm running Template Haskell splices while depending on cublas
(regardless of whether I actually use anything the cublas
package exports).
It does not seem to happen when I only depend on cuda
, nor when compiling a TH-free program with cublas
and it certainly hasn't to do with C headers, so I'm closing this here.
This is using the unmerged PR version that addresses v0.12.2, but the error is actually the same on the
master
version.Ubuntu 22.04, cabal 3.6.2, GHC 9.2.7, c2hs 0.28.8.
It appears like
_Alignas
is a macro which is available when compiling with a C compiler, butc2hs
is not aware of it.