SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.51k stars 1.11k forks source link

build issue with build openage #1657

Open vihoc opened 1 week ago

vihoc commented 1 week ago

try to build the project on MacOS 14.5 (23F79) M2 pro chip already installed all the dependency package. Here are the steps I followed:

./configure --compiler=$(which clang++) --mode=release --download-nyan
make -j$(sysctl -n hw.ncpu)

However, I encountered an error during the build process:

file was not listed via add_py_module: lib/python3.11/site-packages/Cython/Build/BuildExecutable.py
....(thousand line here)
file was not listed via add_py_module: lib/python3.11/site-packages/toml/tz.py
res1
CMake Error at buildsystem/python.cmake:570 (message):
  .py file listing inconsistent
Call Stack (most recent call first):
  CMakeLists.txt:259 (python_finalize)

To proceed, I commented out lines 568-571 in buildsystem/python.cmake:

    if(NOT res EQUAL 0)
        message(res "${res}")
        message(FATAL_ERROR ".py file listing inconsistent")
    endif() 

After making this change, the build process succeeded, although I encountered a few warnings:

CMake Warning at /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/FindWrapOpenGL.cmake:48 (target_link_libraries):
  Target "libopenage" requests linking to directory "/usr/X11R6/lib".
  Targets may link only to libraries.  CMake is dropping the item.
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.29.6/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:36 (find_dependency)
  /opt/homebrew/opt/qt/lib/cmake/Qt6Gui/Qt6GuiDependencies.cmake:33 (_qt_internal_find_third_party_dependencies)
  /opt/homebrew/opt/qt/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake:43 (include)
  /opt/homebrew/Cellar/cmake/3.29.6/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /opt/homebrew/Cellar/qt/6.7.0_1/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
  /opt/homebrew/opt/qt/lib/cmake/Qt6Quick/Qt6QuickDependencies.cmake:42 (_qt_internal_find_qt_dependencies)
  /opt/homebrew/opt/qt/lib/cmake/Qt6Quick/Qt6QuickConfig.cmake:43 (include)
  /opt/homebrew/opt/qt/lib/cmake/Qt6/Qt6Config.cmake:167 (find_package)
  libopenage/CMakeLists.txt:65 (find_package)

Despite these warnings, the build process completed with the following message:

[100%] creating in-place modules

here is the screenshot of my bin dir

Screenshot 2024-06-21 at 10 48 03 AM

However, I encountered another issue when trying to run the project using make test or make run:

cd bin && ./run test -a
usage: openage [-h] [--version] {main,game,test,convert,convert-file,convert-export-api,codegen} ...
openage: error: code was not yet generated. Did you run the command from the build directory (bin/)?
See doc/building.md for more information.
make: *** [tests] Error 2