Building wheels on WSL fails
Vuizur opened this issue · 0 comments
Vuizur commented
Hi,
when I try to install the package (poetry install
) in a poetry project with the following pyproject.toml
:
[tool.poetry]
name = "whispercppy-test"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "whispercppy_test"}]
[tool.poetry.dependencies]
python = "^3.10"
whispercpp = {git = "https://github.com/o4dev/whispercpp.py"}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
I get the following error when building the whispercpp.py wheels:
pux@Hannes-PC:/mnt/c/Programs/whispercppy-test$ poetry install
Installing dependencies from lock file
Warning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies. Run `poetry lock [--no-update]` to fix it.
Package operations: 1 install, 0 updates, 0 removals
• Installing whispercpp (1.0 275783f): Failed
CalledProcessError
Command '['/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10', '--upgrade', '--no-deps', '/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/src/whispercpp.py']' returned non-zero exit status 1.
at /usr/lib/python3.10/subprocess.py:524 in run
520│ # We don't call process.wait() as .__exit__ does that for us.
521│ raise
522│ retcode = process.poll()
523│ if check and retcode:
→ 524│ raise CalledProcessError(retcode, process.args,
525│ output=stdout, stderr=stderr)
526│ return CompletedProcess(process.args, retcode, stdout, stderr)
527│
528│
The following error occurred when trying to handle this error:
EnvCommandError
Command ['/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10', '--upgrade', '--no-deps', '/home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/src/whispercpp.py'] errored with the following return code 1, and output:
Processing /home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/src/whispercpp.py
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: whispercpp
Building wheel for whispercpp (pyproject.toml): started
Building wheel for whispercpp (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for whispercpp (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
./whisper.cpp/ggml.c: In function ‘ggml_time_ms’:
./whisper.cpp/ggml.c:269:5: warning: implicit declaration of function ‘clock_gettime’ [-Wimplicit-function-declaration]
269 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~
./whisper.cpp/ggml.c:269:19: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
269 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~~~
./whisper.cpp/ggml.c:269:19: note: each undeclared identifier is reported only once for each function it appears in
./whisper.cpp/ggml.c: In function ‘ggml_time_us’:
./whisper.cpp/ggml.c:275:19: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
275 | clock_gettime(CLOCK_MONOTONIC, &ts);
| ^~~~~~~~~~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-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 whispercpp
Failed to build whispercpp
ERROR: Could not build wheels for whispercpp, which is required to install pyproject.toml-based projects
at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1540 in _run
1536│ output = subprocess.check_output(
1537│ command, stderr=subprocess.STDOUT, env=env, **kwargs
1538│ )
1539│ except CalledProcessError as e:
→ 1540│ raise EnvCommandError(e, input=input_)
1541│
1542│ return decode(output)
1543│
1544│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
The following error occurred when trying to handle this error:
PoetryException
Failed to install /home/pux/.cache/pypoetry/virtualenvs/whispercppy-test-yr7ZLSr5-py3.10/src/whispercpp.py
at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:58 in pip_install
54│
55│ try:
56│ return environment.run_pip(*args)
57│ except EnvCommandError as e:
→ 58│ raise PoetryException(f"Failed to install {path.as_posix()}") from e
59│
(I just tested it with pip, there I get the same error.)
PS: Thanks a lot for all the work you put in this valuable project!