-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
haskell.compiler.ghcjs has broken #208812
Comments
So I don't exactly know how to fix it, but I can add what I do know The error is coming from foreign import javascript unsafe "(($1_1,$1_2) => { return h$base_st_mtime($1_1,$1_2); })" st_mtime :: Ptr CStat -> IO CTime … and the error message is coming from here: https://github.com/ghcjs/ghcjs/blob/ghc-8.10/src/Gen2/Generator.hs#L2197 I suspect that it might be related to |
This is not the case. The patch is ghcjs/ghcjs@b7711fb which I tried applying since it changed the offending line, but it doesn't change the result of the compilation, i.e. the error is the same with and without this patch. |
Yeah, this is kind of confusing for me because my understanding from reading the code is that this should only trigger that error message if either:
(which is also what the error message says) However, the line number from the error message doesn't quite match up with the source code I linked to, so there is a possible discrepancy. Is there a way you could get the |
@Gabriella439 |
@Gabriella439 3a46b46 is the first bad commit
So my first hunch that is was the 9.2 migration was totally wrong. Maybe it's:
|
ghcjs:
ghc master:
|
Yeah, that would do it. … which triggers the fallback case because |
Hi, not very familiar with Nix. Is there a workaround to get this working for now? And is there a fix planned? |
You can use a nixpkgs commit prior to ghcjs breaking. Not sure if someone plans on looking into a patch to solve this (likely a version of ghcjs/ghcjs@b7711fb that actually works). |
The documentation for that function is lacking, and the length checking of the JS expression was introduced about 10 years ago and it's not clear right now why |
@sternenseemann Thanks. Again, as a complete Nix noob, is there a way to specify the nixpkgs commit on the command line? Currently, I'm doing nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
nix-env -iA nixpkgs.haskell.compiler.ghcjs |
@brandonchinn178 substitute the nixpkgs snapshot with your own checkout hash:
you almost never need |
Does anyone know if upgrading further emscripten can help here, or is it definitely broken for all further versions of emscripten? (1) Would usually the solution to fix ghcjs? |
@RaitoBezarius I don't think emscripten is going to revert time_t to 32bit any time soon… I think it should be easy to patch ghcjs given that we can get ahold of someone that understands the ghcjs ffi syntax and knows how to adjust this. I was hoping that @dfordivam / @obsidian-systems-maintenance could look into it, since they reintroduced ghcjs and provided the additional patches we are using. Since they use NixOS stable channels, maybe they have a renewed interest in fixing this. Personally I'm fine with just having ghcjs be broken on release. If it has downstream users, they will eventually get to fixing it and we can backport that. For nixpkgs ghcjs is a leaf package, so no big deal. |
@sternenseemann the patch you found does work, you just need to apply it before the configure phase! |
This is presumably a result of #202022, but is hard to determine. I have already fixed some build failures leading up to ghcjs (webdriver and optparse-applicative) and we are now left with the following failure I don't understand:
cc @dfordivam @Gabriella439
The text was updated successfully, but these errors were encountered: