[Scons-users] scons with mingw

Mats Wichmann mats at wichmann.us
Mon Mar 11 13:45:08 EDT 2019


I mentioned this on IRC but it's better to have it "recorded" by way of
appearing on the mailing list.

I was going to work on a patch which related to use of mingw as the
compiler, but for me, things are more broken than what the bugreport was
reacting to (https://github.com/SCons/scons/issues/2799).

I'm putting this here (rather than scons-dev) because it's more a
question of how we're expected to use scons + mingw and if maybe I've
missed some setup steps or something.

I've got a windows setup with just git and mingw installed - the mingw
is installed by chocolatey, so it's the mingw-w64 version with gcc 8.1:

https://chocolatey.org/packages/mingw

The existing win32 tests don't like this for two reasons:

In one test, scons is supplying Windows-style switches to gcc, which
this gcc doesn't like:

6/6 (100.00%) C:\\Python37\\python.exe -tt test/win32\win32pathmadness.py

STDOUT
=========================================================================
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -IC:\Users\mats\AppData\Local\Temp\testcmd.4656.q3u8fb4p\include /c
C:\Users\mats\AppData\Local\Temp\testcmd.4656.q3u8fb4p\src\foo.c
/FoC:\Users\mats\AppData\Local\Temp\testcmd.4656.q3u8fb4p\build\foo.o
scons: building terminated because of errors.

STDERR
=========================================================================
gcc.exe: error: /c: No such file or directory
gcc.exe: error:
/FoC:\Users\mats\AppData\Local\Temp\testcmd.4656.q3u8fb4p\build\foo.o:
Invalid argument
scons: ***
[C:\Users\mats\AppData\Local\Temp\testcmd.4656.q3u8fb4p\build\foo.o] Error 1


and in another test (the mingw-specific one) when something is built in
a simpler way, it fails because of a missing dll:

4/6 (66.67%) C:\\Python37\\python.exe -tt test/win32\mingw.py

STDOUT
=========================================================================
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o test.o -c test.cpp
scons: building terminated because of errors.

STDERR
=========================================================================
scons: *** [test.o] Error 1

there's a dialog box here (which thus I can't capture through cut and
paste) which objects to the absence of libwinpthread_1.dll

apparently this edition always builds using that library, and so these
test runs stumble across problems as the dll is not sitting in the local
directory as Windows apparently requires.  I'm wondering if this a new
thing for mingw, and something needs to be adjusted to work with it?


Else, am I doing something wrong in the setup?  Or are these tests which
are not expected to work?

I know mingw is in actual use with scons (heard this on IRC)


More information about the Scons-users mailing list