Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

How to build other packages for wasm32? #17

@brakubraku

Description

@brakubraku

Trying to add some dependencies to the project (entropy package specifically), but I am running into problems, which I assume stem from building for wasm32 architecture.

Failed to build entropy-0.4.1.10-7ad7e63631182fc592b386e6fc995366bf33c32811197665f528cdb53790f8d9. The failure occurred during the configure step. The exception was:
/home/branko/.ghc-wasm/.cabal/logs/ghc-9.10.0.20240509/entropy-0.4.1.10-7ad7e63631182fc592b386e6fc995366bf33c32811197665f528cdb53790f8d9.log: withFile: user error (CallStack (from HasCallStack):
withMetadata, called at src/Distribution/Simple/Utils.hs:447:12 in Cabal-3.11.0.0-inplace:Distribution.Simple.Utils
Error: cabal:
'/nix/store/p64q67ynh6aiblhlca4gdc2ycc6q6p8g-wasm32-wasi-ghc-9.10/bin/wasm32-wasi-ghc'
exited with an error:
wasm-ld: error: unable to find library -lHSrts-1.0.2_thr
wasm32-wasi-clang: error: linker command failed with exit code 1 (use -v to
see invocation)
wasm32-wasi-ghc-9.10.0.20240509: wasm32-wasi-clang' failed in phase Linker'.
(Exit code: 1)

I wonder if there's any generic "step-by-step" of how to update a package for it to compile to wasm32 without issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions