Open aidatorajiro opened 1 week ago
Note: instead of replacing the script, simply appending --with-hsc2hs=javascript-unknown-ghcjs-hsc2hs-9.10.0.20240413
to cabal build
(along with --with-ghc=javascript-unknown-ghcjs-ghc-9.10.0.20240413 --with-ghc-pkg=javascript-unknown-ghcjs-ghc-pkg-9.10.0.20240413
) also fixes build.
This is expected. You have to tell cabal exactly what toolchain to use.
That's a bit cumbersome and could be documented.
It would be good if you could tell cabal a prefix it will then prepend to all tools. I thought there is a ticket for it, but I can't find it. Feel free to create one.
What went wrong
Cabal fails clock-0.8.4 build.
Way to reproduce
clock
.cabal build --with-ghc=javascript-unknown-ghcjs-ghc-9.10.0.20240413 --with-ghc-pkg=javascript-unknown-ghcjs-ghc-pkg-9.10.0.20240413
Software versions
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-cross-0.0.8.yaml
)cause of the problem
The shell script file
~/.ghcup/ghc/javascript-unknown-ghcjs-9.10.0.20240413/bin/hsc2hs-ghc-9.10.0.20240413
has the wrong executable path.quick solution for the problem
Adding
javascript-unknown-ghcjs
prefix to$executablename
in~/.ghcup/ghc/javascript-unknown-ghcjs-9.10.0.20240413/bin/hsc2hs-ghc-9.10.0.20240413
fixes the build issue.Replace
~/.ghcup/ghc/javascript-unknown-ghcjs-9.10.0.20240413/bin/hsc2hs-ghc-9.10.0.20240413
with the following script.