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

"JavaScript exception: Error: spawn ENAMETOOLONG" during compilation #19

Open
j-mueller opened this issue Sep 17, 2015 · 12 comments
Open

Comments

@j-mueller
Copy link

Windows 10 with GHCJS installed as per the QuickStart instructions (https://github.com/ghcjs/ghcjs/blob/master/README.markdown#quick-start). Node v4.0.0

cabal install ghcjs-dom --ghcjs fails with "JavaScript exception: Error: spawn ENAMETOOLONG".

Build log here: https://gist.github.com/j-mueller/217c26434e91a812ec6e

@LukaHorvat
Copy link

Same issue here. Can't build project with a ghcjs-dom dependency. This time with stack.

@karshan
Copy link

karshan commented Nov 23, 2015

This is probably because the command trying to be executed is too long because of the commandline arguments. On windows commandline arguments must be less than 2047 characters.

C:\Users\User\AppData\Roaming\cabal\bin\ghcjs.exe --make -fbuilding-cabal-package -O -outputdir ....... jsbits/xhr.js

@mgsloan
Copy link

mgsloan commented Nov 23, 2015

Could be the commandline length, but "ENAMETOOLONG" sounds more like the windows MAX_PATH restriction. ghcjs-dom has rather long module names, and they end up in the filepath.

@mantkiew
Copy link

mantkiew commented Dec 5, 2015

Was just trying to build reflex-dom-stack-demo, which depends on ghcjs-dom. Same error on Win 10.

@hherman1
Copy link

Same error here, windows 10, even trying to build in C:
Any tips from those who've been through this already would be great!

@dktr0
Copy link

dktr0 commented Jun 15, 2016

Has anyone got any tips for resolving this?

@cartazio
Copy link
Member

If it's Windows file system and Haskell modules having really long names...
Make the name shorter :)

On Wednesday, June 15, 2016, d0kt0r zer0 [email protected] wrote:

Has anyone got any tips for resolving this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#19 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAAQwr-p_Lq1NzRn7zMHKAkyUwNaD8MMks5qMGzGgaJpZM4F-4h9
.

@dktr0
Copy link

dktr0 commented Jun 15, 2016

Can't really tell if you're joking... anyway, changing the name of the many hundreds of ghcjs-dom modules and then changing the names in all the downstream packages that require them is hardly feasible. I don't believe it's the windows file system that is at fault - looks maybe more like something to do with the size of the invocation of ghcjs when building ghcjs-dom?

@cartazio
Copy link
Member

Windows paths have a 250 char limit last I heard. Find the long name /
module that's triggering the issue.

The gl / OpenGL libs had to shorten their module names / hierarchy to work
on Windows :)

On Wednesday, June 15, 2016, d0kt0r zer0 [email protected] wrote:

Can't really tell if you're joking... anyway, changing the name of the
many hundreds of ghcjs-dom modules and then changing the names in all the
downstream packages that require them is hardly feasible. I don't believe
it's the windows file system that is at fault - looks maybe more like
something to do with the size of the invocation of ghcjs when building
ghcjs-dom?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#19 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAAQwhTiDUdrZ63HXjEwvluRGrECjvCTks5qMIDagaJpZM4F-4h9
.

@clinuxrulz
Copy link

clinuxrulz commented Oct 23, 2016

I've read Window's max path limit has been fixed in "Windows 10 Build 14352." Upgrading windows might be the fix.

See: http://winaero.com/blog/how-to-enable-ntfs-long-paths-in-windows-10/

@clinuxrulz
Copy link

clinuxrulz commented Oct 23, 2016

Tried the windows update, with no success. So I don't believe it to be the max character limit on the windows paths. But rather the total number characters used in the command line parameters when spawning some process becoming too many for windows to handle. (that 2047 characters that @karshan mentioned)

Here we go: VirtualBox + Linux ... sigh

@clinuxrulz
Copy link

clinuxrulz commented Oct 26, 2016

A solution for Windows (untested at the moment):

Edit: Same error in "sh", Windows build tools do not solve the problem.

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

9 participants