iokiwi / moneyapp

Parsing OFX files for personal budgeting and financial insights
Mozilla Public License 2.0
3 stars 2 forks source link

gRPC wheel fails to build in docker container on M1 mac. Missing compiler flags or system dependencies. #15

Closed iokiwi closed 1 year ago

iokiwi commented 1 year ago

On an M1 mac simply do a docker-compose build and observe the app container fail to build.

iokiwi commented 1 year ago
#0 368.6         File "/tmp/pip-install-iviwk34r/grpcio_912bb080aacf427594b55bf381cdffce/src/python/grpcio/_parallel_compile_patch.py", line 64, in _parallel_compile
#0 368.6           multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
#0 368.6         File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 367, in map
#0 368.6           return self._map_async(func, iterable, mapstar, chunksize).get()
#0 368.6                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 368.6         File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 774, in get
#0 368.6           raise self._value
#0 368.6         File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 125, in worker
#0 368.6           result = (True, func(*args, **kwds))
#0 368.6                           ^^^^^^^^^^^^^^^^^^^
#0 368.6         File "/usr/local/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
#0 368.6           return list(map(*args))
#0 368.6                  ^^^^^^^^^^^^^^^^
#0 368.6         File "/tmp/pip-install-iviwk34r/grpcio_912bb080aacf427594b55bf381cdffce/src/python/grpcio/_parallel_compile_patch.py", line 59, in _compile_single_file
#0 368.6           self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
#0 368.6         File "/usr/local/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 188, in _compile
#0 368.6           raise CompileError(msg)
#0 368.6       distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
#0 368.6       
#0 368.6       [end of output]
#0 368.6   
#0 368.6   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 368.6   ERROR: Failed building wheel for grpcio
#0 368.6   Running setup.py clean for grpcio
#0 369.3 Successfully built ofxparse mysqlclient
#0 369.3 Failed to build grpcio
#0 369.3 ERROR: Could not build wheels for grpcio, which is required to install pyproject.toml-based projects
------
failed to solve: executor failed running [/bin/sh -c apk update &&     apk add --no-cache         mariadb-dev         build-base &&     pip install -r requirements.txt &&     apk del         build-base &&     rm -rf /var/cache/apk/*]: exit code: 1
iokiwi commented 1 year ago

GPT suggests we may be missing one or more of these dependencies

RUN apk add libffi-dev python3-dev build-base