[New-bugs-announce] [issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

Mateusz Loskot report at bugs.python.org
Thu May 8 11:03:42 CEST 2014


New submission from Mateusz Loskot:

While building Python 3.2 or Python 3.4 with Visual Studio 2013 on Windows 8.1, pythoncore.vcxproj fails to build due to illformed pre-link event command.
(FYI, I have upgraded all .vcxproj files to VS2013 locally.)

Here is the command and the error:

<pre>
1>PreLinkEvent:
1>  Description: Generate build information...
1>  cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG -MDd ..\Modules\getbuildinfo.c -Fo"D:\tmp\Python-3.4.0-vs2013\PCbuild\Win32-temp-Debug\pythoncore" \getbuildinfo.o" -I..\Include -I..\PC
1>  getbuildinfo.c
1>..\Modules\getbuildinfo.c(1): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
</pre>


Notice the superfluous double quote followed by whitespace in the following argument:

<pre>
-Fo"D:\tmp\Python-3.4.0-vs2013\PCbuild\Win32-temp-Debug\pythoncore" \getbuildinfo.o"
</pre>

The problem is somewhat known as there is related comment in the make_buildinfo.c file about the custom commands arguments parsing:

<pre>
/* Hack fix for bad command line:  If the command is issued like this:
 * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"
 * we will get a trailing quote because IntDir ends with a backslash that then
 * escapes the final ".  To simplify the life for developers, catch that problem
 * here by cutting it off.
 * The proper command line, btw is:
 * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
 * Hooray for command line parsing on windows.
 */
</pre>

There are two solutions possible:

1) Correct the PreLinkEvent command in make_buildinfo.vcxproj according to the comment above:

<pre>
$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
</pre>

2) Patch make_buildinfo.c (attached).

Then, the cl.exe command is correct:

<pre>
1>  cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG -MDd ..\Modules\getbuildinfo.c -Fo"F:\V81-VS2013.win32\Librarie
s\External\Source\Python\Debug\PCbuild\Win32-temp-Debug\pythoncore\getbuildinfo.o" -I..\Include -I..\PC
1>  getbuildinfo.c
</pre>


I'm not sure why this problems leaks while building with VS2013.
I have been building Python 3.2 with VS2012 for long time w/o any issues.
Perhaps, it is related to combination of VS2013 and Windows 8.1.
Although, I'm not observing this problem while building with VS2012 on Windows 8.1,
it would be helpful if someone else who uses VS2012 or VS2013 could confirm my results.

----------
components: Build
files: Python340-make_buildinfo-vs2013.patch
keywords: patch
messages: 218097
nosy: mloskot
priority: normal
severity: normal
status: open
title: make_buildinfo.exe with VS2013 fails due ill-formed IntDir path
type: compile error
versions: Python 3.2, Python 3.4
Added file: http://bugs.python.org/file35183/Python340-make_buildinfo-vs2013.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21452>
_______________________________________


More information about the New-bugs-announce mailing list