Boost logo

Boost-Build :

Subject: [Boost-build] Boost Build (1.55->1.56) breaks python extending with msvc
From: Tom Kent (lists_at_[hidden])
Date: 2015-05-12 21:56:01


Something changed between 1.55 and 1.56 that causes shared libraries with
python to not build correctly. Since there were no changes of substance to
python in this period (same until now in master, however, this also applies
to develop), I’m thinking that it is boost build that isn’t working
correctly. I have been able to manually build a shared library with the
exact same .cpp file using visual studio to build instead of boost build
and it works fine.

This causes the quickstart example (the embedding part anyway) to fail on
windows with msvc, it also causes two of the regression tests to fail
[1][2]: builtin_converters and map_indexing_suite.

The error shows up as an ‘incompatible PDB format’ shown here (full build
output at end):

msvc.link.dll
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd

   Creating library
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb and
object bin\msvc-8.0\debug\address-model-32\threading-multi\extending.exp

LINK : fatal error LNK1207: incompatible PDB format in
'F:\tmp\boost_1_58_0_x1\libs\python\example\quickstart\bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb';
delete and rebuild

        call
"C:\Users\or331c\AppData\Local\Temp\b2_msvc_8.0_vcvarsall_x86.cmd" >nul

link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X86 /MANIFEST
/subsystem:console
/out:"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd"
/IMPLIB:"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb"
/LIBPATH:"C:\Python27-32\libs"
@"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd.rsp"

        if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

...failed msvc.link.dll
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb...

I’ve found lots of examples of people who have tried boost python and
failed with this [3][4], as it is a pretty important part of what boost
python does.

Any thoughts as to what is causing this or how to fix?

Thanks,

Tom

[1]
http://www.boost.org/development/tests/develop/developer/output/teeks99-08b-win2012R2-64on64-boost-bin-v2-libs-python-test-map_indexing_suite-test-msvc-9-0-dbg-adrs-mdl-64-thrd-mlt.html

[2]
http://www.boost.org/development/tests/develop/developer/output/teeks99-08b-win2012R2-64on64-boost-bin-v2-libs-python-test-map_indexing_suite-test-msvc-9-0-dbg-adrs-mdl-64-thrd-mlt.html

[3]
http://stackoverflow.com/questions/29053172/boost-python-quickstart-linker-errors

[4]
http://stackoverflow.com/questions/29450634/compile-boost-python-tutorial-with-vs-2015-ctp-5-and-python-3-5a-on-windows-10-t

Full, example build output

F:\tmp\boost_1_58_0_x1\libs\python\example\quickstart>f:\tmp\boost_1_58_0_x1\b2.exe
address-model=32 test_ext

Performing configuration checks

    - 32-bit : yes (cached)

    - arm : no (cached)

    - mips1 : no (cached)

    - power : no (cached)

    - sparc : no (cached)

    - x86 : yes (cached)

...patience...

...patience...

...found 1921 targets...

...updating 9 targets...

common.mkdir bin\test_ext.test\msvc-8.0\debug\address-model-32

common.mkdir
bin\test_ext.test\msvc-8.0\debug\address-model-32\threading-multi

common.mkdir bin\msvc-8.0\debug\address-model-32

common.mkdir bin\msvc-8.0\debug\address-model-32\threading-multi

compile-c-c++
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.obj

extending.cpp

msvc.link.dll
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd

   Creating library
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb and
object bin\msvc-8.0\debug\address-model-32\threading-multi\extending.exp

LINK : fatal error LNK1207: incompatible PDB format in
'F:\tmp\boost_1_58_0_x1\libs\python\example\quickstart\bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb';
delete and rebuild

        call
"C:\Users\or331c\AppData\Local\Temp\b2_msvc_8.0_vcvarsall_x86.cmd" >nul

link /NOLOGO /INCREMENTAL:NO /DLL /NOENTRY /DEBUG /MACHINE:X86 /MANIFEST
/subsystem:console
/out:"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd"
/IMPLIB:"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb"
/LIBPATH:"C:\Python27-32\libs"
@"bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd.rsp"

        if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%

...failed msvc.link.dll
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pyd
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb...

...removing
bin\msvc-8.0\debug\address-model-32\threading-multi\extending.pdb

...skipped
<pbin\test_ext.test\msvc-8.0\debug\address-model-32\threading-multi>test_ext
for lack of
<pbin\msvc-8.0\debug\address-model-32\threading-multi>extending.pyd...

...failed updating 2 targets...

...skipped 2 targets...

...updated 5 targets...



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk