Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python.h missing on 3.9 and 3.10 #1006

Open
2 of 5 tasks
mkcms opened this issue Jan 10, 2025 · 2 comments
Open
2 of 5 tasks

Python.h missing on 3.9 and 3.10 #1006

mkcms opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mkcms
Copy link

mkcms commented Jan 10, 2025

Description:
A few days ago my builds with Python 3.9 and 3.10 broke due to a missing Python.h include in one of the dependent packages that I build during the process. The same setup builds fine for 3.11, 3.12 and 3.13, and it used to work before that for 3.9 and 3.10 as well.

As far as I know, no changes were made to the dependent package.

Example failing job: https://github.com/mkcms/bdx/actions/runs/12715895623/job/35449032864

A successful build from a week ago: https://github.com/mkcms/bdx/actions/runs/12610330973/job/35144803933

Action version:
Latest master

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

  • 3.9
  • 3.10

Repro steps:
Try to compile a C Python extension that uses Python.h header.

Expected behavior:
No error.

Actual behavior:
The Python.h header can't be found.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../python3 -I.. -I/opt/hostedtoolcache/Python/3.10.15/x64/include/python3.10 -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -MT xapian_wrap.lo -MD -MP -MF .deps/xapian_wrap.Tpo -c ../../python3/xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
../../python3/xapian_wrap.cc:20:10: fatal error: Python.h: No such file or directory
   20 | #include <Python.h>
@mkcms mkcms added bug Something isn't working needs triage labels Jan 10, 2025
@priyagupta108
Copy link
Contributor

Hi @mkcms 👋,
Thank you for your report. We'll investigate the issue and get back to you with the details!

@priyagupta108
Copy link
Contributor

Hi @mkcms,
I have attempted to reproduce the issue by forking your repository and running the same setup with Python 3.9 and 3.10. In my case, I did not encounter the Python.h missing error.

It's possible that the issue might be caused by cached dependencies or artifacts. Could you try clearing the cache and see if that resolves the problem?

Additionally, to ensure you are using the latest updates, could you please check with the actions/setup-python@v5 tag instead of @master in your GitHub Actions workflow? 

Please let me know if this helps or if you have any other details that might be relevant.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants