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

Cross compilation? #38

Open
nomeata opened this issue Apr 7, 2021 · 1 comment
Open

Cross compilation? #38

nomeata opened this issue Apr 7, 2021 · 1 comment

Comments

@nomeata
Copy link

nomeata commented Apr 7, 2021

I am trying to cross-compile a haskell project that uses a .hsc file that uses bindings-DSL, but I get error messages like

src/….hsc:22 directive strict_import cannot be handled in cross-compilation mode

or

src/….hsc:26 directive starttype cannot be handled in cross-compilation mode

https://github.com/haskell/hsc2hs#cross-compilation writes

Only a subset of .hsc syntax is supported by --cross-compile. The following are unsupported: … Custom constructs

Does that mean that using binding-DSL will prevent any kind of cross compilation?

@nomeata
Copy link
Author

nomeata commented Apr 7, 2021

In my concrete case the FFI was small enough to just drop down on “raw” hsc, not using bindings-DSL, so this is not urgent. I guess this issue can serve as a place for people to find more information related to cross compilation and bindings-DSL.

nomeata added a commit to dfinity/ic-hs that referenced this issue May 11, 2021
basvandijk pushed a commit to dfinity/ic-hs that referenced this issue May 28, 2022
sevanspowell added a commit to sevanspowell/bindings-GLFW that referenced this issue Dec 4, 2023
- Custom constructs aren't supported by hsc2hs when cross-compiling (see
https://github.com/haskell/hsc2hs#cross-compilation and
rethab/bindings-dsl#38).
  - Much of bindings-GLFW is using custom-constructs supplied by bindings-DSL,
  and so can't be cross compiled.
  - By manually generating the bindings-GLFW wrapper, instead of using hsc2hs,
  we can support cross compilation.
- Manually create bindings-GLFW wrapper to support cross-compilation.
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

1 participant