andyarvanitis / purescript-native

A native compiler backend for PureScript (via C++ or Golang)
http://purescript.org
Other
632 stars 40 forks source link

Instructions for spago and go do not work #43

Open danielo515 opened 4 years ago

danielo515 commented 4 years ago

Hello! I already posted this on spago repository, but maybe it is best suited here, so please forgive me if this duplication causes any problem or overload the same team in some way. I'm having problems on macOS to run spago build using psgo as backend. I have Go toolchain installed and I can run go in any terminal.

Here is my spago.dhall:

{ name = "my-project"
, dependencies = [ "console", "effect", "psci-support" ]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
, backend = "psgo"
}

And here is the error I'm getting:

➜  spago build
[info] Installation complete.
[info] Build succeeded.
/bin/sh: psgo: command not found
[error] Backend "psgo" exited with error:127

I followed all the isntruction shtat I have found and I'm not sure what else should I try or install. Compiling to JS has no problems. Thanks in advance.

danielo515 commented 4 years ago

Ok, I just found the way to solve this. I download a psgo binary and put it on a binary folder that was on my path. After that, everything worked without problem and now I have my native build file called Main. I think psgo installation instructions are not clear. I expected spago to download the psgo binary, or to compile it from source if necessary. There is nothing on the instructions saying that you should make psgo available yourself. Please consider updating them. Thanks for this awesome project. I'll let you the decision about closing this issue to you.

leoxiang66 commented 1 year ago

Hi, have you fund a psgo binary for windows?