gongminmin / KlayGE

KlayGE is a cross-platform open source game engine with plugin-based architecture.
http://www.klayge.org
GNU General Public License v2.0
2.09k stars 351 forks source link

build fail on win #213

Closed mavis-zhang closed 4 years ago

mavis-zhang commented 4 years ago

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.

gongminmin commented 4 years ago

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.