TEN-Agent icon indicating copy to clipboard operation
TEN-Agent copied to clipboard

[BUG] Build failed on windows

Open sandsc opened this issue 11 months ago • 1 comments

Description

I was trying to build ten-framework on windows, After successfully executing the "tgn gen win x64 debug" command, when I ran the "tgn build win x64 debug" command, I encountered the following error:

../../../core/include_internal/ten_runtime/binding/python/common/python_stuff.h(15, 10): fatal error: 'Python.h' file not found.

I've checked the generated compile_commands.json and found that the command-line arguments include the Python directory using "/I"" instead of "-I". Could this be the cause of the problem?

  "command": "ninja.exe -t msvc -e ten_framework/out/win/x64/environment.x64 -- clang-cl.exe /nologo /showIncludes  -DTEN_PLATFORM -DOS_WINDOWS -DTEN_RUNTIME_EXPORT -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -DTEN_LOG_DEF_LEVEL=TEN_LOG_DEBUG -DTEN_ENABLE_TEN_RUST_APIS -DTARGET_OS_WIN -D_UNICODE -DUNICODE -D_DEBUG  -Isrc -I. -Iobj -I../../../core -I../../../core/src -I../../../core/include -I../../.. -Igen -Igen/core/src/ten_rust -Igen/cmake/jansson/install/include  /wd4312 /wd4305 /wd5105 /wd5103 /wd4996 /FC /MTd /Gy /FS /bigobj /Zi /d2FastFail /Zc:sizedDealloc- -m64 /MTd -I\"C:\\Python\\Python313\\Include\"  /TC /c ../../../core/src/ten_runtime/binding/python/native/init.c /Fo obj/core/src/ten_runtime/binding/python/native/ten_runtime_python/init.obj /Fd\"obj/core/src/ten_runtime/binding/python/native/ten_runtime_python_c.pdb\""

Environment

Win32

Steps to reproduce

  1. generator config: tgn gen win x64 debug
  2. build: tgn build win x64 debug

Expected behavior

build successfully.

Actual behavior

fatal error: 'Python.h' file not found.

Version

The latest code on the current main branch.

Severity

Minor

Additional Information

No response

sandsc avatar Jan 07 '25 06:01 sandsc

Well, thanks for your report. I don’t have a Windows machine, so I can’t handle this problem very efficiently. You could try experimenting a bit. However, from the command line you posted, it seems like there’s no /I option either?

halajohn avatar Jan 09 '25 06:01 halajohn