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

Docker build fails #619

Open
WiseBird opened this issue Nov 24, 2023 · 6 comments
Open

Docker build fails #619

WiseBird opened this issue Nov 24, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@WiseBird
Copy link

Describe the bug
Docker build fails with the next error

20.66
20.66   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
20.66
20.66   Cythonizing sources
20.66   Compiling srsly/msgpack/_unpacker.pyx because it changed.
20.66   Compiling srsly/msgpack/_packer.pyx because it changed.
20.66   [1/2] Cythonizing srsly/msgpack/_packer.pyx
20.66   [2/2] Cythonizing srsly/msgpack/_unpacker.pyx
20.66
20.66   Error compiling Cython file:
20.66   ------------------------------------------------------------
20.66   ...
20.66       object PyMemoryView_GetContiguous(object obj, int buffertype, char order)
20.66
20.66   from libc.stdlib cimport *
20.66   from libc.string cimport *
20.66   from libc.limits cimport *
20.66   ctypedef unsigned long long uint64_t
20.66   ^
20.66   ------------------------------------------------------------
20.66
20.66   srsly/msgpack/_unpacker.pyx:13:0: 'uint64_t' redeclared
20.66
20.66   Error compiling Cython file:
20.66   ------------------------------------------------------------
20.66   ...
20.66   cdef extern from "Python.h":
20.66       ctypedef int int32_t
20.66       ctypedef int int64_t
20.66       ctypedef unsigned int uint32_t
20.66       ctypedef unsigned int uint64_t
20.66       ^
20.66   ------------------------------------------------------------
20.66
20.66   /tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/Cython/Includes/cpython/pyport.pxd:5:4: Previous declaration is here
20.66   Traceback (most recent call last):
20.66     File "/usr/local/poetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
20.66       main()
20.66     File "/usr/local/poetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
20.66       json_out['return_val'] = hook(**hook_input['kwargs'])
20.66     File "/usr/local/poetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
20.66       return hook(config_settings)
20.66     File "/tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
20.66       return self._get_build_requires(config_settings, requirements=['wheel'])
20.66     File "/tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
20.66       self.run_setup()
20.66     File "/tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
20.66       exec(code, locals())
20.66     File "<string>", line 138, in <module>
20.66     File "<string>", line 125, in setup_package
20.66     File "/tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
20.66       cythonize_one(*args)
20.66     File "/tmp/tmp82ajuywo/.venv/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
20.66       raise CompileError(None, pyx_file)
20.66   Cython.Compiler.Errors.CompileError: srsly/msgpack/_unpacker.pyx
20.66
20.66
20.66   at /usr/local/poetry/venv/lib/python3.9/site-packages/poetry/installation/chef.py:152 in _prepare
20.66       148│
20.66       149│                 error = ChefBuildError("\n\n".join(message_parts))
20.66       150│
20.66       151│             if error is not None:
20.66     → 152│                 raise error from None
20.66       153│
20.66       154│             return path
20.66       155│
20.66       156│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
20.66
20.66 Note: This error originates from the build backend, and is likely not a problem with poetry but with srsly (2.4.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "srsly (==2.4.2) ; python_version >= "3.6""'.
20.66
------
Dockerfile:36
--------------------
  35 |     WORKDIR /app
  36 | >>> RUN poetry config virtualenvs.create false && \
  37 | >>>   poetry install --extras ${DEVICE} --no-interaction --no-ansi --no-root $(/usr/bin/test $STAGE == production && echo "--without dev,test,docs")
  38 |
--------------------
ERROR: failed to solve: process "/bin/sh -c poetry config virtualenvs.create false &&   poetry install --extras ${DEVICE} --no-interaction --no-ansi --no-root $(/usr/bin/test $STAGE == production && echo \"--without dev,test,docs\")" did not complete successfully: exit code: 1

Vesion (please complete the following information):

  • OS: MacOS Sonoma 14.0
  • Azimuth version: 2.8.0 (3408104 commit)
@WiseBird WiseBird added the bug Something isn't working label Nov 24, 2023
@gabegma
Copy link
Contributor

gabegma commented Nov 29, 2023

Thanks for filing the bug! @JosephMarinier could you take a look when you have a chance? Thank you!!

@JosephMarinier
Copy link
Contributor

Hi @WiseBird,
I am sorry for the delay. I am not able to reproduce this error. I just updated my Mac to Sonoma 14, so I should have the exact same setup as you.
Could you please confirm if you are still experiencing this issue? And maybe provide more details on how to reproduce?

@WiseBird
Copy link
Author

@JosephMarinier Do you have M1 mac?

@JosephMarinier
Copy link
Contributor

@WiseBird Ah-ha! No. I guess you do?

@WiseBird
Copy link
Author

Yep

@JosephMarinier
Copy link
Contributor

JosephMarinier commented Dec 21, 2023

Maybe you could try to poetry lock --no-update. It might add some file URLs for your specific architecture. 🤷

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

3 participants