Repository navigation
hostedtoolcache not exists #489
Description
Description:
Hi,
github action failed with building a python package lanms-neo. According to the error log, the file Python.h not found because include dir /opt/hostedtoolcache/Python/3.7.13/x64/include/python3.7m not exists.
Action version:
Specify the action version
2.295.0
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
failed github action log: https://github.com/open-mmlab/mmdeploy/runs/7988673786?check_suite_focus=true
succeeded github action just a few days ago: https://github.com/open-mmlab/mmdeploy/runs/7911687136?check_suite_focus=true
github workflow: https://github.com/open-mmlab/mmdeploy/blob/21775ce584cf9589ebade133e46d008ee60acf9d/.github/workflows/build.yml#L91
Expected behavior:
A description of what you expected to happen.
Actual behavior:
failed with building lanms-neo python package.
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.7.13/x64/include/python3.7m -c flagcheck.cpp -o flagcheck.o -std=c++17
Building wheels for collected packages: lanms-neo
Building wheel for lanms-neo (pyproject.toml): started
Building wheel for lanms-neo (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for lanms-neo (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [29 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-37
creating build/lib.linux-x86_64-cpython-37/lanms
copying lanms/__init__.py -> build/lib.linux-x86_64-cpython-37/lanms
running build_ext
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.7.13/x64/include/python3.7m -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'lanms._C' extension
creating build/temp.linux-x86_64-cpython-37
creating build/temp.linux-x86_64-cpython-37/lanms
creating build/temp.linux-x86_64-cpython-37/lanms/csrc
creating build/temp.linux-x86_64-cpython-37/lanms/csrc/clipper
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-llqxv5qc/lanms-neo_5d0f0b899c4343379f6fcb6c75e93813/lanms/csrc -I/tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include -I/opt/hostedtoolcache/Python/3.7.13/x64/include/python3.7m -c lanms/csrc/clipper/clipper.cpp -o build/temp.linux-x86_64-cpython-37/lanms/csrc/clipper/clipper.o -std=c++17 -fvisibility=hidden -g0
lanms/csrc/clipper/clipper.cpp: In member function ‘void ClipperLib::Clipper::FixupFirstLefts3(ClipperLib::OutRec*, ClipperLib::OutRec*)’:
lanms/csrc/clipper/clipper.cpp:3665:13: warning: unused variable ‘firstLeft’ [-Wunused-variable]
OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);
^~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-llqxv5qc/lanms-neo_5d0f0b899c4343379f6fcb6c75e93813/lanms/csrc -I/tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include -I/opt/hostedtoolcache/Python/3.7.13/x64/include/python3.7m -c lanms/csrc/lanms.cpp -o build/temp.linux-x86_64-cpython-37/lanms/csrc/lanms.o -std=c++17 -fvisibility=hidden -g0
In file included from /tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include/pybind11/detail/../attr.h:13:0,
from /tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include/pybind11/detail/class.h:12,
from /tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include/pybind11/pybind11.h:13,
from lanms/csrc/lanms.cpp:1:
/tmp/pip-build-env-w6kvz5n0/overlay/lib/python3.7/site-packages/pybind11/include/pybind11/detail/../detail/common.h:212:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lanms-neo
ERROR: Could not build wheels for lanms-neo, which is required to install pyproject.toml-based projects
Activity
dmitry-shibanov commentedon Aug 24, 2022
Hello @RunningLeon. Thank you for your report. I suppose it fails because the succeded build lanms-neo was not build but installed that is why it didn't produce the error. For the failed build it tried to build it from source code but it tries to find the python include directory on
/opt/hostedtoolcache/Python/3.7.13/x64/includebut in the container it's__t/Python/3.7.13/x64/include. Could you please try to specify environment variableCPATHfor this step.RunningLeon commentedon Aug 25, 2022
@dmitry-shibanov Hi, thanks for you answer. We understand that the host directory
/opt/hostedtoolcacheis mapped to/__tin container, but why building lanms-neo is added with a host including directory? This is a bit weird. Adding a environment variable may work, but due to the python version is changing(for example the path would be/__t/Python/3.8.13/x64/include/python3.8ifpython==3.8) and mapped container directory may change (say not always is to/__t), so is there a better solution for this problem?dmitry-shibanov commentedon Aug 25, 2022
You can try to use such configuration
RunningLeon commentedon Aug 26, 2022
Great. Thanks a lot.