-
Notifications
You must be signed in to change notification settings - Fork 90
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
Error when trying to install javascript-unknown-ghcjs-xxx
using the tui interface
#1047
Comments
|
Ah, thanks. I didn't know that also works. The other problem I noticed is that the users guide mentions installing Maybe both of these issues can be solved by an addition in the specific section in the user guide? I could open a fix for that. |
We will need a pre-install message for that here: https://github.com/haskell/ghcup-metadata/blob/94a79c488a01bc6b84e2e724246647ba70e91f5e/ghcup-cross-0.0.8.yaml#L30 viPreInstall: |
To install javascript cross backend, you need emscripten 1.57 Or something... can you open a PR? |
Yes, I can open a PR. I guess |
I tried to investigate whether any part of the GHC codebase hardcodes the dependency on a specific version of the emscripten toolchain. That does not seem to be the case. Instead, the logic in this file https://gitlab.haskell.org/ghc/ghc/-/blob/3fff09779d5830549ae455a15907b7bb9fe7859a/distrib/configure.ac.in hardcodes the version of emscripten that was used to build the binary distribution into the configure script which is then checked at installation time. This just happens to be version 1.57 for the binary distribution which is configured in https://github.com/haskell/ghcup-metadata/blob/94a79c488a01bc6b84e2e724246647ba70e91f5e/ghcup-cross-0.0.8.yaml#L30 This behaviour was implemented in the following PR: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10918 See in particular the discussion on the PR here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10918#note_514310 I think this means that the section in the GHCup user guide about the javascript backend must be updated: For every javascript bindist there is exactly one specific emscripten toolchain that is compatible with it, and the user must install that specific toolchain. I will open a PR about this. |
That makes sense. Can you provide a PR?
I'd argue the configure script error is highly misleading and this warrants a GHC bug report.
|
Problem Description
A while ago I succesfully installed the compiler
javascript-unknown-ghcjs-9.6.2
using the instructions in the user guide. That means that I added an additional release channel and installed an emscripten toolchain.I now updated ghcup using
ghcup upgrade
and saw that a new compilerjavascript-unknown-ghcjs-9.10.0.20240413
is available in the tui interface. Trying to install this new version using the tui interface fails with the following error:Relevant logs:
.ghcup/logs/ghcup.log
.ghcup/logs/ghc-configure.log
Diagnosis
Installation via the tui doesn't correctly wrap the invocation of
ghcup install
in an invocation ofemconfigure
. This is why the installation fails with the messagechecking emsdk version... configure: error: could not determine emsdk version. Perhaps CC is not emcc?
Workaround
Manually call
emconfigure ghcup install ghc --set javascript-unknown-ghcjs-9.10.0.20240413
instead of trying to install via the tui.Expected Behaviour
Either don't allow the option to install the javascript targets in the tui (which would be acceptable since it is an experimental opt-in feature) or correctly wrap the invocation of the install script with
emconfigure
.The text was updated successfully, but these errors were encountered: