-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
cygwin / mintty stdin is not readable with libuv #4589
Comments
@vtjnash what do we make of this? |
that you shouldn't use windows for serious work? oh, you meant about getting it fixed. i stopped looking at all issue reports after the summer, so I don't think i saw this one. I also haven't built julia for windows since the summer -- loladiro switch the virtualization program, and I couldn't get windows to install correctly (although I did find at least half a dozen ways to corrupt or crash the installer). I'll PM you. |
FWIW, I've continued to build on windows without any problems. Though it seems every once in a while something gets screwy and I have to start over from scratch. At those times, I will usually make sure my msys2 build is on the latest (new releases get pushed pretty frequently) and just start the build from scratch. I don't think I've run into anything totally blocking for a while now. I'm on windows 8 though, so I'm not sure if that makes a difference. What msys2 release are you using? |
@loladiro How do we fix the virtualization stuff? @vtjnash Would it help if I ship you a laptop for running windows? |
the virtualization program is excellent. The problem was that windows didn't support most of the options. For example: if the installation disk was smaller than 90GB, it wouldn't let me log in after the installation was complete. If I forgot the network card, the setup program after installation would crash and I would have to reinstall from scratch. If I emulated Haswell, or chose the wrong type of hardware, the desktop would crash after setup and then it couldn't boot and I would have to reinstall from scratch. After a few hours, I ran out of time to deal with it. @ViralBShah no. the problem is that I don't like using window, so I don't have much time or interest to work on supporting it. I have plenty of licenses and virtual installations of windows around. Remote-ing into a virtual setup reduced that effort somewhat. @karbarcca I recall something about PCRE failing tests when built this way, was that ever resolved? I agree that rebuilding from scratch is necessary more frequently on Windows. I have not had good experiences when switching compilers, so if you change versions of mingw, it is sometimes also necessary to rebuild-the-world. |
Yeah, the failing PCRE tests is the one additional thing when building with msys2. The solution is to just put an empty file named |
Wow, that's a really weird solution. |
Not really, that's what our build system does to avoid checking everything every time you do |
Does upgrading to the latest pcre help? |
Ah, that makes sense.
|
@ViralBShah, I think somebody tried the latest PCRE, but it didn't seem to make a difference. |
I haven't built Julia on Windows recently to contribute to the discussion (due to moving house and changing academic institution I have access to a Linux machine only at the moment). I will let you know if I get the chance to rebuild on Windows. |
I tried upgrading pcre and it didn't help. I decided to give up on msys2 for a while after BSOD'ing my laptop three times during builds (the only time this has ever happened on Win7). Should probably try again though, because they were fixing things quickly. |
@Scidom, when you're back up and running, I'd suggest going with @Alexpux's suggestion for mingw64 build here: I've been building native windows 8.1 with that mingw64 and msys2. |
Hi, all! Regards, |
I think you need the sjlj tool chain, or c++ code may crash, because of limitations of error handlers on JIT code Msys2 just keeps getting better! Thanks Alexey. |
Correction: dwarf may have issues with JIT code. seh should be fine. (sjlj is also fine). I tried to test this, but couldn't get LLVM to compile on my XP-64 VM. |
I got a bit further with mingw-build/x64-4.8.1-win32-seh-rev5 and msys2/x86_64-20131113:
|
I can replicate @jiahao's error in both cross-compile and mingw64 build. The uv_pipe_open failure is in SetNamedHandleState:
However, it appears that the underlying cause may be stack corruption in
The value of
@jiahao and I are using different mingw and msys builds, although both fairly new. However, this also fails with a known-good xcompile setup. I also tried building v0.2.0 with this stack and I get the same segfault as seen at the top of this thread. So this is weird. |
I can run image creation and the resulting julia successfully under The same binary segfaults with same error under This points toward a library problem/conflict with something from msys, but I'm unsure what library. Still baffled at the segfault in cross-compile. |
did you update MSYS2 packages via pacman? |
@ihnorton what happened to the call |
I see what is going wrong, I'm attempting a fix now. |
The problem occurs because of a recent (circa 2011?) change to cygwin / mintty that started to create stdin as a pipe. This would be fine, except cygwin doesn't give libuv enough permission to configure the read end of the pipe (we expect to have I would classify this as a bug in cygwin since there isn't much the client can do about it, except stay within the cygwin sandbox. It I disable the error check, Julia works, although it doesn't print the prompt since it detects that it is reading from a pipe. |
One day #4589 will be fixed and these will be useful.
We can detect that it is a cygwin pty (instead of a pipe) by using the following patch which compares the name of the pipe server against the following regex |
I looked into this more today -- the issues here are actually with our hacked up version of readline, cygwin, and mintty. But by using a normal version of readline with a normal version of ncurses, and the following command line to start julia (using a cygwin |
Towards the end of Julia's native build on Win7 (x64) using msys2 I got the following segmentation fault (I used the Julia commit d073213, which builds without giving this segfault on msys, so the error is msys2-specific) :
The text was updated successfully, but these errors were encountered: