You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The following fairly trivial SConstruct file fails on MSYS2:
# SConstuctimportosenv=Environment(tools=["default","mingw"])
conf=Configure(env)
conf.env['SIZEOF_INT'] =conf.CheckTypeSize("int")
conf.env['SIZEOF_VOIDP'] =conf.CheckTypeSize("void *")
env=conf.Finish()
print("size of int:",env['SIZEOF_INT'])
print("size of void*:",env['SIZEOF_VOIDP'])
print("env['PLATFORM'] =",env['PLATFORM'])
print("env['HOST_OS'] =",env['HOST_OS'])
env.Program('hello',['hello.c'])
// hello.c#include<stdio.h>intmain(void){fprintf(stderr,"hello from C\n"); return0;}
The output is below. The output '.sconf_temp' is not recognized comes from Windows being passed a forward-slash-separated path, because on this version of Python, os.path.sep is set to /.
john@WIN-HG6RBDGB9LV UCRT64 ~/testsize
$ scons --config=force
scons: Reading SConscript files ...
'.sconf_temp' is not recognized as an internal or external command,
operable program or batch file.
Checking size of int ... no
'.sconf_temp' is not recognized as an internal or external command,
operable program or batch file.
Checking size of void * ... no
size of int: 0
size of void*: 0
env['PLATFORM'] = win32
env['HOST_OS'] = win32
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
A solution for this issue would be the automatic detection of the MSYS platform, (issue #4311), but there may be other simpler fixes to consider.
The workaround for this issue is to invoke MSYSTEM= scons, which disables MSYS2's Python from setting os.path.sep to /. However, this is inconvenient and undesirable for other reasons, as a 'general solution'.
A lot of the discussion around the questions opened by this ended up discussed elsewhere, but this particular issue should actually have been resolved by PR #4307.
Describe the bug
The following fairly trivial SConstruct file fails on MSYS2:
The output is below. The output
'.sconf_temp' is not recognized
comes from Windows being passed a forward-slash-separated path, because on this version of Python,os.path.sep
is set to/
.A solution for this issue would be the automatic detection of the MSYS platform, (issue #4311), but there may be other simpler fixes to consider.
Required information
pip install scons
scons --config=force
The text was updated successfully, but these errors were encountered: