Skip to content
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

Arguments empty when executing external processess #606

Closed
nomeata opened this issue Sep 5, 2017 · 7 comments
Closed

Arguments empty when executing external processess #606

nomeata opened this issue Sep 5, 2017 · 7 comments

Comments

@nomeata
Copy link

nomeata commented Sep 5, 2017

When executing an external process, the argument actually passed to the execve sys call is "", no matter what I have in the code:

$ cat Test.hs 
import System.Process
main = rawSystem "echo" ["first_argument"]
/tmp $ ghcjs -O Test.hs 
[1 of 1] Compiling Main             ( Test.hs, Test.js_o )
Linking Test.jsexe (Main)
/tmp $ node Test.jsexe/all.js

/tmp $ 

Affects Cabal: haskell/cabal#4742 (comment)

This is ghcjs, ghc-8.0 branch, bootstrapped a week ago, and node v6.11.2.

@luite
Copy link
Member

luite commented Sep 5, 2017

I saw this problem for the first time last week with a Cabal setup script.

I'm pretty sure that this used to work, but I haven't had time to investigate yet. Are you using linux?

@nomeata
Copy link
Author

nomeata commented Sep 5, 2017

Yes, Debian unstable.

@nomeata
Copy link
Author

nomeata commented Sep 5, 2017

As an additional data point: I have also seen it on Travis, with

The common theme is a recent version of node? Did you yourself upgrade node last week?

@cocreature
Copy link

I have been experiencing the same problem on Archlinux with node v8.4.0 but weirdly enough only with the ghcjs that I’ve bootstrapped manually. ghcjsHEAD from nixpkgs as well as a version bootstrapped via stack from http://ghcjs.tolysz.org/ghc-8.0-2017-02-05-lts-7.19-9007019.tar.gz seem to work just fine for me on the same system. While nix ships its own version of node, stack should be using the globally installed version on my system which seems to suggest that maybe node is not the problem here.

@luite
Copy link
Member

luite commented Sep 5, 2017

Okay it's more widespread than I initially thought then. I was trying to build something on a fresh macOS install with a new node.js and thought it might be just macOS.

I'll check linux with a newer node.js

@luite
Copy link
Member

luite commented Sep 11, 2017

this should be fixed in ghcjs/shims@85395dc

@nomeata
Copy link
Author

nomeata commented Sep 17, 2017

That seems to work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants