classification
Title: Disutils on windows debug build fails without -j1
Type: compile error Stage: resolved
Components: Distutils, Windows Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, jpe, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-10-19 16:04 by jpe, last changed 2020-10-19 17:45 by jpe. This issue is now closed.

Messages (3)
msg378959 - (view) Author: John Ehresman (jpe) * Date: 2020-10-19 16:04
Compiling pillow for a debug build fails without -j1 because distutils parallelizes the build, but there are problems with locking the .pdb file during when compiling the C files.  An example of the error message from a cl.exe command is:

fatal error C1041: cannot open program database 'C:\src\tmp\pillow-test\Pillow-7.2.0\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS

Building works with setup.py build_ext --disable-jpeg --disable-tiff --disable-zlib --debug build -j1

My guess is the fix is not to parallelize by default in a debug build; a /FS arg to cl.exe could be used, but that doesn't seem to be recommended.

I realize this might be considered a pillow bug, but my guess is that it affects other packages as well
msg378961 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-10-19 16:57
If you're building through setuptools, then it's a setuptools bug (they own distutils going forward). https://github.com/pypa/setuptools

If you're not, please try with setuptools in the picture. It shouldn't require any more than just importing its "setup()" function instead of distutils's.
msg378973 - (view) Author: John Ehresman (jpe) * Date: 2020-10-19 17:45
It is a setuptools bug and I've opened a setuptools issue at https://github.com/pypa/setuptools/issues/2442

Thanks!
History
Date User Action Args
2020-10-19 17:45:35jpesetstatus: open -> closed
resolution: third party
messages: + msg378973

stage: resolved
2020-10-19 16:57:13steve.dowersetmessages: + msg378961
2020-10-19 16:04:08jpecreate