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

RFC: consider dropping support for old MSYS/MinGW #97

Open
rprichard opened this issue Jan 18, 2017 · 1 comment
Open

RFC: consider dropping support for old MSYS/MinGW #97

rprichard opened this issue Jan 18, 2017 · 1 comment
Labels

Comments

@rprichard
Copy link
Owner

rprichard commented Jan 18, 2017

If anyone sees this and is currently using winpty with old MSYS/MinGW (not MSYS2 or MinGW-w64), please let me know!

The old MSYS/MinGW environment is lacking relative to MSYS2/MinGW-w64 and MSVC in various ways. It would be convenient for me if winpty did not support it anymore.

Issues with native compilation ("MinGW"):

  • winpty uses DACLs to secure its named pipes, and Windows provides functions to convert between SIDs/SDs and strings. winpty doesn't actually use these functions (because they're slow), but it has convenience C++ wrappers for the APIs to aid in debugging. MinGW (a) doesn't define the SD functions, (b) doesn't define SDDL_VERSION, and (c) defines ConvertStringSidToSidW incorrectly. [src]

  • MinGW does not define the "LVB" console cell attributes. [src1] [src2]

  • MinGW provides an swprintf matching VC6's prototype. Unlike the other compilers, its swprintf doesn't conform to C99. vsnprintf is provided, but requires passing -std=g++11 even though vsnprintf is part of C99 (and therefore C++11). [src]

  • MinGW lacks PIPE_REJECT_REMOTE_CLIENTS. [src]

  • MinGW lacks MAPVK_VK_TO_VSC. [src] [added 2017-01-31]

  • MinGW lacks the new version-checking APIs that MSVC and MinGW-w64 provide.[src]

  • Parallel make hangs -- parallel mingw32-make works better but tends to interleave output on a byte-by-byte basis. [src]

Issues with the UNIX adapter ("MSYS"):

  • While the MinGW project updates its native-targeting (the "MinGW") toolchain, the MSYS-targeting toolchain is permanently locked at GCC 3.4.x, which lacks support for things like std::wstring and modern C++.

  • The native code uses pre-compiled headers, but the UNIX adapter must compile without them because MSYS GCC doesn't support them.

  • select can return EAGAIN. Contemporary Cygwin/MSYS2 can return EINTR, but not EAGAIN. [src]

  • At some point after MSYS forked Cygwin, the path conversion APIs were deprecated, and new ones were introduced. The winpty UNIX adapter supports both APIs. [src]

  • MSYS does not support the static-libstdc++ compiler option. [src]

  • MSYS lacks the pipe2 API. [commit]

  • Miscellaneous bugs in MSYS:

  • MSYS errno isn't thread-local. [added 2017-02-01]

  • MSYS lacks wcscpy and wcscat. [added 2017-02-01]

@rprichard
Copy link
Owner Author

I've noticed recently that MSYS winpty tends to crash:

rprichard@ATOM-W10 /c/rprichard/proj/winpty
$ ./build/winpty ls
error reading from internal wakeup pipe: error 0
      0 [sig] winpty 4908 open_stackdumpfile: Dumping stack trace to winpty.exe.stackdump
LICENSE   README.md    VERSION.txt  config.mk  misc  src          winpty.exe.stackdump
Makefile  RELEASES.md  build        configure  ship  vcbuild.bat
Aborted (core dumped)

I think this is a race condition involving errno -- read fails and sets errno to something, but errno is reset to 0 by another thread. errno is thread-local on all non-obsolete systems. The fix is probably to kill off the MSYS winpty support. To start, I'll probably omit the MSYS package from the next release.

rprichard added a commit that referenced this issue Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant