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

Can't compile with scons on Windows #173

Closed
Mako88 opened this issue Dec 31, 2015 · 4 comments
Closed

Can't compile with scons on Windows #173

Mako88 opened this issue Dec 31, 2015 · 4 comments
Assignees

Comments

@Mako88
Copy link
Collaborator

Mako88 commented Dec 31, 2015

When trying to compile I get this error:

DXX-Archive.3: checking version of C++ compiler 'g++' ...
ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr:
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 3693:
    d.init(substenv)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 3413:
    DXXProgram.static_archive_construction[self.user_settings.builddir] = DXXArchive(self.user_settings)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 3130:
    self.configure_environment()
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 3154:
    getattr(conf, k.name)()
  File "c:\Python27\Lib\site-packages\scons-2.4.0\SCons\SConf.py", line 668:
    ret = self.test(context, *args, **kw)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 411:
    most_recent_error = self._check_cxx_works(context)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 477:
    self._show_tool_version(context, CXX, 'C++ compiler')
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 436:
    v = StaticSubprocess.get_version_head(tool)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 75:
    v = _qcall('%s %s' % (cmd, '--version'), stderr=subprocess.PIPE)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 72:
    return _pcall(_shlex_split(args),stderr)
  File "C:\MinGW\msys\1.0\home\Sewanee\dxx-rebirth\SConstruct", line 67:
    p = subprocess.Popen(args, executable=args[0], stdout=subprocess.PIPE, stderr=stderr, close_fds=True)
  File "c:\Python27\lib\subprocess.py", line 667:
    raise ValueError("close_fds is not supported on Windows")
@Mako88
Copy link
Collaborator Author

Mako88 commented Jan 2, 2016

@vLKp Anyway you could fix this soonish? I just switched from Linux to Windows so all the beta builds (and the official release) will be built on Windows now.

@vLKp
Copy link
Contributor

vLKp commented Jan 2, 2016

I will fix it when I get back to working on Rebirth. It looks like this has been broken since I committed Cache scons subprocess calls in April 2015.

@Mako88
Copy link
Collaborator Author

Mako88 commented Jan 2, 2016

Thanks man! :) You're the most bestest!

@vLKp vLKp self-assigned this Jan 2, 2016
vLKp added a commit that referenced this issue Jan 3, 2016
Per the documentation, on Linux, the default is true.  On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.

Reported-by: Mako88 <#173>
Fixes: bb3f414 ("Cache scons subprocess calls")
@vLKp
Copy link
Contributor

vLKp commented Jan 3, 2016

A developer-only feature set close_fds=True ("Explicit is better than implicit.") when it was added. Cache scons subprocess calls refactored several subprocess calls and happened to copy from the one which explicitly requested close_fds=True. This worked fine on Linux systems, where closing descriptors is easy. It broke on Windows because of the strange way that process creation works there.

@vLKp vLKp closed this as completed Jan 9, 2016
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

2 participants