ghcjs / ghcjs

Haskell to JavaScript compiler, based on GHC
MIT License
2.61k stars 188 forks source link

Sandboxed ghcjs install: ghcjs-boot --dev fails #318

Open tonyday567 opened 9 years ago

tonyday567 commented 9 years ago

Referencing #191 & #271.

Fresh OSX install using https://github.com/ghcformacosx/ghc-dot-app

# ghc --numeric-version
7.10.1
# cabal --numeric-version
1.22.0.0

Fresh clones of ghcjs & ghcjs-prim. cabal sandbox install of each went well.

ghcjs-boot --dev gives:

# ghcjs-boot --dev
...
/Users/tonyday/git/ghcjs$ [ghcjs]: /Users/tonyday/local/bin/ghcjs "--numeric-ghc-version"
fatal: program /Users/tonyday/local/bin/ghcjs returned a nonzero exit code

# ghcjs --numeric-version
Cannot determine library directory.

GHCJS requires a -B argument to specify the library directory. Usually this argument is provided 
added by a shell script wrapper. Verify that you are not accidentally invoking the executable directly.

I would also note that I do not have the Cabal library anywhere, nor any local libraries beyond what comes with ghc.

Any thoughts?

Tony

luite commented 9 years ago

how did you install ghcjs from the sandbox into /Users/tonyday/local/bin/ghcjs ?

tonyday567 commented 9 years ago

I symlinked directly from the dist directory, so: ghcjs -> /Users/tonyday/git/ghcjs/dist/dist-sandbox-43e8030b/build/ghcjs/ghcjs for example.

luite commented 9 years ago

That does not work, as you've already noticed. Check the sandbox bin dir to see.how the executables and wrappers are organized On 12 Apr 2015 16:02, "Tony Day" notifications@github.com wrote:

I symlinked directly from the dist directory, so: ghcjs -> /Users/tonyday/git/ghcjs/dist/dist-sandbox-43e8030b/build/ghcjs/ghcjs for example.

— Reply to this email directly or view it on GitHub https://github.com/ghcjs/ghcjs/issues/318#issuecomment-91983125.

tonyday567 commented 9 years ago

ok, thanks. Looks like I just have to copy the files in the bin directory to ~/.cabal/bin.

luite commented 9 years ago

Ghcjs-boot relies on installed data-files, so you must keep the sandbox in the same place if you do that On 12 Apr 2015 16:33, "Tony Day" notifications@github.com wrote:

ok, thanks. Looks like I just have to copy the files in the bin directory to ~/.cabal/bin.

— Reply to this email directly or view it on GitHub https://github.com/ghcjs/ghcjs/issues/318#issuecomment-91987072.