TEN-framework / TEN-framework/ten-framework
[BUG] Build failed on windows
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1.4k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 22
Description
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
- generator config: tgn gen win x64 debug
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated compile_commands.json from tgn gen win x64 debug and inspect the command used by tgn build win x64 debug for ../../../core/src/ten_runtime/binding/python/native/init.c. Verify how the Python include directory is passed to clang-cl and whether the missing Python.h error is resolved by correcting that argument. Re-run the two reproduction commands on Windows to confirm a successful build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100