gongminmin/KlayGE

build fail on win

mavis-zhang opened this issue · 1 comments

cmake version 3.17.1
Python 2.7.18

Error:

CMake Error at D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:398 (add_executable):
Cannot find source file:

D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/Python/Modules/zipimport.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx

CMake Error at D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:442 (add_executable):
Cannot find source file:

D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/Python/Parser/bitset.c

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx

CMake Error at D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:398 (add_executable):
No SOURCES given to target: _freeze_importlib

CMake Error at D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:442 (add_executable):
No SOURCES given to target: pgen

CMake Error at D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:469 (add_library):
No SOURCES given to target: libpython-static
Call Stack (most recent call first):
D:/work/temp/KlayGE/KlayGE-develop/KlayGE-develop/External/python-cmake-buildsystem/cmake/libpython/CMakeLists.txt:592 (add_libpython)

CMake Generate step failed. Build files cannot be regenerated correctly.

Try to remove External\python-cmake-buildsystem and try again. zipimport.c and bitset.c don't exist in Python 3.8, but seems your python-cmake-buildsystem is not patched to support 3.8.

The patch is External\Build\CMake\Python\python-cmake-buildsystemPatches\0011-Adapt-to-python-3.8.patch. It should be automatically applied during cmake configuration.