Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore-packages.cmd for Python on Windows broken due to Numpy 2 release, breaks Boost build #54

Closed
seantleonard opened this issue Jun 24, 2024 · 0 comments · Fixed by #53

Comments

@seantleonard
Copy link
Contributor

seantleonard commented Jun 24, 2024

What is the issue

Build pipeline breaks due to failure to compile boost on Windows

Building Boost (b2.exe <options) fails with following console logging.

Boost Console Output with `--verbose` flag

[1] msvc-14.2

Component configuration:

- atomic                   : not building
- charconv                 : not building
- chrono                   : not building
- cobalt                   : not building
- container                : not building
- context                  : not building
- contract                 : not building
- coroutine                : not building
- date_time                : not building
- exception                : not building
- fiber                    : not building
- filesystem               : not building
- graph                    : not building
- graph_parallel           : not building
- headers                  : not building
- iostreams                : not building
- json                     : not building
- locale                   : not building
- log                      : not building
- math                     : not building
- mpi                      : not building
- nowide                   : not building
- program_options          : not building
- python                   : building
- random                   : not building
- regex                    : not building
- serialization            : not building
- stacktrace               : not building
- system                   : not building
- test                     : not building
- thread                   : not building
- timer                    : not building
- type_erasure             : not building
- url                      : not building
- wave                     : not building

...patience...
...patience...
...found 35849 targets...
...updating 5 targets...
compile-c-c++ bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi\numpy\dtype.obj
dtype.cpp
libs\python\src\numpy\dtype.cpp(101): error C2039: 'elsize': is not a member of '_PyArray_Descr'
C:\Python310\lib\site-packages\numpy_core\include\numpy\ndarraytypes.h(618): note: see declaration of '_PyArray_Descr'

call "bin.v2\standalone\msvc\msvc-14.2\msvc-setup.bat"  >nul

cl /Zm800 -nologo "libs\python\src\numpy\dtype.cpp" -c -Fo"bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi\numpy\dtype.obj" -TP /wd4675 /EHs /GR /Zc:throwingNew /Z7 /Od /Ob0 /W3 /MDd /Zc:forScope /Zc:wchar_t /Zc:inline /favor:blend -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_NUMPY_SOURCE -DBOOST_NUMPY_STATIC_LIB -DBOOST_PYTHON_STATIC_LIB "-I." "-IC:\Python310\include" "-IC:\Python310\lib\site-packages\numpy_core\include"

...failed compile-c-c++ bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi\numpy\dtype.obj...
...skipped <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy310-vc142-mt-gd-x64-1_85.lib for lack of <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>numpy\dtype.obj...
...skipped pC:\Users\seleonar.NORTHAMERICA\Documents\Dev\lang_ext\packages\output\liblibboost_numpy310-vc142-mt-gd-x64-1_85.lib for lack of <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy310-vc142-mt-gd-x64-1_85.lib...
...skipped <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy-variant-vc142-mt-gd-x64-1_85-static-py3.10.cmake for lack of <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy310-vc142-mt-gd-x64-1_85.lib...
...skipped pC:\Users\seleonar.NORTHAMERICA\Documents\Dev\lang_ext\packages\output\lib\cmake\boost_numpy-1.85.0libboost_numpy-variant-vc142-mt-gd-x64-1_85-static-py3.10.cmake for lack of <pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy-variant-vc142-mt-gd-x64-1_85-static-py3.10.cmake...

...skipped 4 targets...
pC:\Users\seleonar.NORTHAMERICA\Documents\Dev\lang_ext\packages\output\liblibboost_numpy310-vc142-mt-gd-x64-1_85.lib
pC:\Users\seleonar.NORTHAMERICA\Documents\Dev\lang_ext\packages\output\lib\cmake\boost_numpy-1.85.0libboost_numpy-variant-vc142-mt-gd-x64-1_85-static-py3.10.cmake
<pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy-variant-vc142-mt-gd-x64-1_85-static-py3.10.cmake
<pbin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi>libboost_numpy310-vc142-mt-gd-x64-1_85.lib

...failed updating 1 target...
compile-c-c++ bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi\numpy\dtype.obj

The following error message led me to the root cause:

compile-c-c++ bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.10\threading-multi\numpy\dtype.obj
dtype.cpp
libs\python\src\numpy\dtype.cpp(101): error C2039: 'elsize': is not a member of '_PyArray_Descr'
C:\Python310\lib\site-packages\numpy_core\include\numpy\ndarraytypes.h(618): note: see declaration of '_PyArray_Descr'

Which then led me to finding that the following two files differ where Windows does not explicitly set Numpy and Pandas versions while the Linux script does: (Numpy-1.22.3 and Panda-1.4.2)

  • C:\enlistment\language-extensions\python\build\linux\restore-packages.sh
  • C:\enlistment\language-extensions\python\build\windows\restore-packages.cmd

External Reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant