atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Uncaught Error: spawn EACCES #8

Closed sneiman closed 9 years ago

sneiman commented 9 years ago

[Enter steps to reproduce below:]

  1. open a *.hs file
  2. save it

Atom Version: 0.188.0 System: Mac OS X 10.10.2 Thrown From: haskell-ghc-mod package, v0.4.3

Stack Trace

Uncaught Error: spawn EACCES

At child_process.js:1160

Error: spawn EACCES
    at exports._errnoException (util.js:753:11)
    at ChildProcess.spawn (child_process.js:1160:11)
    at exports.spawn (child_process.js:993:9)
    at Object.exports.execFile (child_process.js:687:15)
    at Object.module.(anonymous function) [as execFile] (ATOM_SHELL_ASAR.js:144:20)
    at GhcModiProcess.module.exports.GhcModiProcess.runModCmd (/Users/seth/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:124:17)
    at GhcModiProcess.runModCmd (/Users/seth/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:3:61)
    at /Users/seth/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:223:24
    at /Users/seth/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:160:16
    at /Applications/Atom.app/Contents/Resources/app/node_modules/temp/lib/temp.js:252:7

Commands

     -0:08.6 core:move-right (atom-text-editor.editor.is-focused)
     -0:07.3 core:move-left (atom-text-editor.editor.is-focused)
     -0:07.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:06.7 core:move-left (atom-text-editor.editor.is-focused)
     -0:06.3 core:move-right (atom-text-editor.editor.is-focused)
     -0:06.1 core:move-left (atom-text-editor.editor.is-focused)
     -0:05.9 core:move-right (atom-text-editor.editor.is-focused)
  5x -0:04.5 core:move-down (atom-text-editor.editor.is-focused)
     -0:00.5 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "one-light-syntax"
    ],
    "audioBeep": false,
    "destroyEmptyPanes": false,
    "projectHome": "/Users/seth/Dev"
  },
  "haskell-ghc-mod": {
    "ghcModPath": "/Users/seth/Library/Haskell/bin",
    "ghcModiPath": "/Users/seth/Library/Haskell/bin"
  }
}

Installed Packages

# User
haskell-ghc-mod, v0.4.3
ide-haskell, v0.3.6
language-haskell, v1.0.0

# Dev
No dev packages
lierdakil commented 9 years ago

It usually means that Atom is unable to run ghc-mod for some reason. Try specifying full path to ghc-mod in plugin settings, and check file permissions.

sneiman commented 9 years ago

thanks This entire message is confidential. If it isn't intended for you, you may not use it – so please throw it away and forget about it.

From: Nikolay Yakimov notifications@github.com<mailto:notifications@github.com> Reply-To: lierdakil/haskell-ghc-mod reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday, March 31, 2015 at 12:44 AM To: lierdakil/haskell-ghc-mod haskell-ghc-mod@noreply.github.com<mailto:haskell-ghc-mod@noreply.github.com> Cc: Seth Neiman seth@lizardms.com<mailto:seth@lizardms.com> Subject: Re: [haskell-ghc-mod] Uncaught Error: spawn EACCES (#8)

It usually means that Atom is unable to run ghc-mod for some reason. Try specifying full path to ghc-mod in plugin settings, and check file permissions.

— Reply to this email directly or view it on GitHubhttps://github.com/lierdakil/haskell-ghc-mod/issues/8#issuecomment-87980797.

davire commented 8 years ago

[Enter steps to reproduce below:]

  1. Start atom from the command line, it opens the last folder I opened and I get:

selection_312

Permission of the directories :

david@pcdavid:~/.local/bin$ ll -d ~/.local ~/.local/bin ~/.local/bin/*
drwxrwxrwx 4 david david 4,0K déc.  11 10:23 /home/david/.local/
drwxrwxrwx 2 david david 4,0K déc.  14 08:43 /home/david/.local/bin/
-rwxr-xr-x 1 david david  12M déc.  11 10:23 /home/david/.local/bin/cabal
-rwxr-xr-x 1 david david  66M déc.  14 08:40 /home/david/.local/bin/ghc-mod
-rwxr-xr-x 1 david david 1,1M déc.  14 08:40 /home/david/.local/bin/ghc-modi
-rwxr-xr-x 1 david david  15M déc.  14 08:43 /home/david/.local/bin/hlint

david@pcdavid:~/.local/bin$ ./ghc-mod --version
ghc-mod version 5.4.0.0 compiled by GHC 7.10.2

david@pcdavid:~/.local/bin$ ./cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library

I know the version 5.4 isn't supported, but the package also mentions:

Please note, that for ghc>=7.10 and/or cabal>=1.22, you need ghc-mod>=5.3.0.0. Ghc-mod versions before 5.3.0.0 won't work.

Atom Version: 1.3.1 System: Ubuntu 13.04 Thrown From: haskell-ghc-mod package, v1.2.0

Stack Trace

Uncaught Error: spawn EACCES

At internal/child_process.js:298

Error: spawn EACCES
    at exports._errnoException (util.js:837:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:351:9)
    at Object.exports.execFile (child_process.js:153:15)
    at Object.module.(anonymous function) [as execFile] (ATOM_SHELL_ASAR.js:163:20)
    at /home/david/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process-base.coffee:83:20
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
    at BufferedProcess.module.exports.BufferedProcess.handleError (/usr/share/atom/resources/app.asar/src/buffered-process.js:251:20)
    at /usr/share/atom/resources/app.asar/src/buffered-process.js:193:26
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)

Commands

Config

{
  "core": {},
  "haskell-ghc-mod": {
    "ghcModPath": "/home/david/.local/bin",
    "ghcModiPath": "/home/david/.local/bin",
    "additionalPathDirectories": [
      "/home/david/.local/bin"
    ],
    "enableGhcModi": false
  }
}

Installed Packages

# User
angularjs, v0.3.3
autocomplete-haskell, v0.6.2
color-picker, v2.0.12
haskell-ghc-mod, v1.2.0
ide-haskell, v1.3.7
language-haskell, v1.5.1
minimap, v4.18.0

# Dev
No dev packages
lierdakil commented 8 years ago

@davire, you need to specify full path to executable file there, not to directory that contains it.