On 02/09/2020 14:48, Robin Becker wrote:
looking here for build expertise apologies if not suitable

After a python source change one of my appveyor builds has started to fail compiling an extension. The previous build 28/August succeeded completely, but now I see a failure in the third sub-build. No change was made in the c source code.

Python 2.7 X86 OK
Python 2.7 AMD64 OK
Python 3.5 X86 Fails compiling _renderPM.c at line 2150

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION=\"2.3.21\" -Isrc\rl_addons\renderPM -Isrc\rl_addons\renderPM\libart_lgpl -Isrc\rl_addons\renderPM\gt1 -Iwinstuff\include\freetype2 -Ic:\Python35\include -Ic:\Python35\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt /Tcsrc\rl_addons\renderPM\_renderPM.c /Fobuild\temp.win32-3.5\Release\src\rl_addons\renderPM\_renderPM.obj
_renderPM.c
src\rl_addons\renderPM\_renderPM.c(2150): error C2017: illegal escape sequence
src\rl_addons\renderPM\_renderPM.c(2150): error C2001: newline in constant
src\rl_addons\renderPM\_renderPM.c(2151): error C2143: syntax error: missing 
')' before 'if'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 
14.0\\VC\\BIN\\cl.exe' failed with

the code there looks like this

     PyModule_AddObject(m, "_version", obj);

     obj = PyUnicode_FromString(LIBART_VERSION);  /* this is line 2150 */
     if(!obj)goto err;
     PyModule_AddObject(m, "_libart_version", obj);

so it looks like the -DLIBART_VERSION=\"2.3.21\"  is failing to pass stuff 
correctly.

.........
Should I be using a stringify macro?


turns out I guessed correctly and some change in the image / shell / python 3.5 environment means I have to pass the LIBART_VERSION using -DLIBART_VERSION=2.3.21 and then use a STRINGIFY macro in the code to turn it into a string.
-flailing about-ly yrs-
Robin Becker
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/N7V32QXVPU6GPM7V42CWR5FADAXMPDRO/

Reply via email to