-
Notifications
You must be signed in to change notification settings - Fork 841
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
Can't setup ghcjs with stack: ghcjs version could not be determined. #1496
Comments
Is the project you are trying to build hosted somewhere?
I only see you are using I am using my own |
aupiff is also getting this, as mentioned in the #ghcjs channel. He's using the same version, I haven't seen such issues with the old-base sdist or fizruk's improved-base sdist. Can you please post up your particular |
It's our own project. We've just started using ghcjs, my colleagues have managed to setup it, but I get this error. Looks like we have same versions of everything (i. e. stack, cabal, ghc, ghcjs), but for some strange reason this error occurs only on my machine. I tried using
I tried running
Sorry, I don't know what is |
Ah, looks like it's from Actually, as I said, the same error occurs with other configurations too (e. g. this: https://github.com/tolysz/video/blob/ghcjs/client/stack.yaml) |
(I have deleted something that I find irrelevant now) EDIT: looks like I am getting this error always now (when I am running only one
but there were upgrades of other packages globally installed (like EDIT EDIT:
and same errors for |
After full system update (including update of ghc, happy and alex) I still had the same error. Stack downloaded GHC 7.10.2 and installed it into it's own directory, because system-wide GHC upgraded to 7.10.3. Then I downgraded system-wide GHC to 7.10.2 and (magic!) Finally, I removed ~/.cabal, ~/.stack, ~/.ghcjs, ~/.ghc, .stack-work and ran
Surprisingly, |
I'm also experiencing this problem — I never used to have this problem some time ago; perhaps an update of stack to 0.1.10 caused it? (EDIT: nope, just downgraded and the problem's still there) @gromakovsky I can confirm the errors are non-deterministic. I didn't try |
For the record, it's also happening with Also, as you can see, I tried with |
Interesting though, running repeatedly
This successfully builds the whole project, despite bunch of errors/retries. NOTE: you should modify this command to repeat only on this type of error (ie grep-ing |
Actually this morning I've gotten to a point where it's always failing immediately and always at the same package (http-conduit but I doubt that package has anything to do with this). P.S. But then again, the |
Furthermore, the error generally seems to occur faster with parallelism — when I tried with |
Note that these error messages are coming from the Cabal library - and something very similar is happening with cabal-install ghcjs/ghcjs#451 . I'll leave this open for now, though. Probably the place to fix this is ghcjs itself or Cabal, but first we've got to figure out what's happening. |
I have this problem too on Arch Linux - both on my everyday machine and in a clean docker build with Arch, GHCJS boot (reliably) fails. I'm trying exactly the same GHCJS/GHC versions as @gromakovsky, and log is exactly the same too. Interestingly, in a clean Ubuntu docker container (using the same procedure, except for installing necessary packages using apt-get instead of pacman) it boots successfully. So looks for me as a difference in environment coming from different OS. Didn't have time to look further yet. |
I am facing the same issue on Arch too:
|
I have the same issue on macos, stack from git 1.0.1. |
Same issue on Mac OS X and very recent stack (Version 1.0.1, Git revision d0d6819 x86_64). |
@3noch i don't think it's related to stack, other people had it while using cabal the binary. however that seems to be something newish. I wonder where it could possibly come from. |
@mgsloan and Stack devs: Given the frequency of this issue, is there any effort to co-ordinate a fix with the GHCJS/Cabal team? |
Could anyone give a Docker example when it fails? |
@tolysz Here is my dockerfile for booting GHCJS on Arch Linux (that's what I'm struggling with): https://gist.github.com/quyse/4441543374b3102f7fd5 |
I've tried building some larger projects (ghcjs-improved-base-2 branch of reflex-dom) along with ghcjs-0.2.0.20151230.3_ghc-7.10.2 , and encountered no problems. Since I can't reproduce the issue, I can't look into fixing it (and the issue doesn't directly affect me). It would be very helpful if people had public projects that reproduce the issue, and better yet, as @tolysz mentions, a reproduction in a docker image would be great. I'm 90% sure the root cause of this is in Cabal or GHCJS. Leaving the issue open since this seems to be the main place to collect info about the problem. |
Strange, I ran a successful
stack.yaml:
|
Ok for me on ArchLinux (x64) - it was definitly the nodejs 5.5
now compiling of packets and everything else seems to work again. |
I have to report back that my nodejs 5.5 installation encountered the bug some days after the initial |
Same issue on OSX, |
On OSX rolling node back |
Looks like the issue is indeed because of bad Should one have a bad (for ghcjs) node version at the moment of installation it will be remembered and used later, even when one reinstalls node (into some other filesystem path, leaving old one intact (some package managers do this)). There is also a text file The solution for me was to create a symlink with a name of the wrong node version pointing to a dir with right node version. Reinstalling Interestingly enough, with this kind of setup Actually Hope this will help. |
is there a definitive procedure for getting rid of this problem ? Can we assert that's not linked to a particular version but to a change in version ? |
I believe something important for ghcjs broke in nodejs after some change in nodejs in some version. I'm not sure which version exactly. nodejs v0.10.47 works for sure, node v5.* doesn't. |
GHCJS works for me currently with latest official |
wow that would be cool, I will try to reproduce :-) |
Actually GHCJS fixed this issue, as long as you grab a recent build (last couple weeks). |
@3noch I still use GHCJS from here https://github.com/nrolland/ghcjs/releases/tag/v0.2.0.20151029 which is several months old, so unless GHCJS has downloaded some freshly fixed code during boot process, I guess the fix is in node actually. However I would greatly appreciate some short wrap-up on the issue from someone who knows more what was going on. |
@quyse I believe this was the root cause: nodejs/node#5034 And yes, it looks like |
@quyse Also, little known fact: you can get newer sdists of GHCJS here: http://ghcjs.luite.com/ I use them with |
@3noch Yep, I think so too, but I don't see an easy way to understand what version of node.js contains the fix. And thanks for the link, I need to update then :) |
I was about to craft a new one based on that happy news.. but it's even better if it's already compiled ! @3noch we should probably update stack's ghcjs documentation no ? this looks like a more reliable source |
unfortunately I can't boot with 20160315.. I get an error when booting on my mac and targeting http://ghcjs.luite.com/ (is it just me ?) I am now building an sdist on my mac, to see if that makes a difference.. not sure why
|
Could you post your |
It goes : https://gist.github.com/nrolland/75535e7255c52da67a83 trying to pin down that node version too with nix. may be that's the culprit |
@nrolland That looks right. I've never used the |
yes nix was the pb. (probably some dependency declaration missing somewhere..), I am all good as far as install is concerned after removing it In summary, what I did to get rid of the pb was :
ps : I would like to say a big Thank you to @awpr for finding and documenting the issue on node's end. I would certainly never have been able to pinpoint that down, and such is the case for many other users. so thank you.. |
@nrolland Rock on! Yes many thanks to those who solved it. |
Just a note:
|
I am seeing this problem: Very recent ghcjs, based on GHC-8.0, and node version v6.11.2:
Didn’t someone say the problem was fixed? |
@nomeata Unfortunately, many things could cause such a problem. What's the output of |
The cause in my case was this bug, since then fixed in GHCJS: ghcjs/ghcjs#606 |
I'm trying to use stack with ghcjs. I've created dummy project (stack.yaml file is in gist, other files are hardly relevant). After that I run
stack setup
and get this error:Even if I do
mv ~/.stack ~/.stack.bk; mv ~/.cabal ~/.cabal.bk
I get the same error. You can take a look at the complete output ofstack setup
in gist. By the way, I'm running on Archlinux.Here is gist: https://gist.github.com/gromakovsky/660735e773213b989d44
Some information about versions:
Please ask me to provide more information about my environment if you need it.
The text was updated successfully, but these errors were encountered: