LuisMayo / objection_engine

Library that turns comment chains into ace attorney scenes, used in several bots
MIT License
107 stars 20 forks source link

Issue trying to build image on Apple Silicon (M1) #76

Open pedroroutaboul opened 2 years ago

pedroroutaboul commented 2 years ago

Issue trying to build image on Apple Silicon (M1)

This is what I get when I run docker build -t objection_engine .

#8 374.0 Collecting pycld2
#8 374.0   Downloading pycld2-0.41.tar.gz (41.4 MB)
#8 380.2      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 MB 6.2 MB/s eta 0:00:00
#8 381.4   Preparing metadata (setup.py): started
#8 381.5   Preparing metadata (setup.py): finished with status 'done'
#8 381.6 Collecting morfessor
#8 381.6   Downloading Morfessor-2.0.6-py3-none-any.whl (35 kB)
#8 381.6 Collecting polyglot
#8 381.7   Downloading polyglot-16.7.4.tar.gz (126 kB)
#8 381.7      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.3/126.3 KB 10.5 MB/s eta 0:00:00
#8 381.7   Preparing metadata (setup.py): started
#8 381.8   Preparing metadata (setup.py): finished with status 'done'
#8 381.8 Building wheels for collected packages: pyICU, pycld2, polyglot
#8 381.8   Building wheel for pyICU (pyproject.toml): started
#8 396.3   Building wheel for pyICU (pyproject.toml): finished with status 'done'
#8 396.3   Created wheel for pyICU: filename=PyICU-2.9-cp37-cp37m-linux_aarch64.whl size=324259 sha256=0ce1f8c8dde617c79db24edc145ea7b78ae3da9d94e6ae419ebf489b138d8933
#8 396.3   Stored in directory: /root/.cache/pip/wheels/28/88/93/6c1b06361e4cbd4e7f793fb456729f69798f9aa3fc2a791cd7
#8 396.3   Building wheel for pycld2 (setup.py): started
#8 396.5   Building wheel for pycld2 (setup.py): finished with status 'error'
#8 396.5   error: subprocess-exited-with-error
#8 396.5   
#8 396.5   × python setup.py bdist_wheel did not run successfully.
#8 396.5   │ exit code: 1
#8 396.5   ╰─> [20 lines of output]
#8 396.5       running bdist_wheel
#8 396.5       The [wheel] section is deprecated. Use [bdist_wheel] instead.
#8 396.5       running build
#8 396.5       running build_py
#8 396.5       creating build
#8 396.5       creating build/lib.linux-aarch64-3.7
#8 396.5       creating build/lib.linux-aarch64-3.7/pycld2
#8 396.5       copying pycld2/__init__.py -> build/lib.linux-aarch64-3.7/pycld2
#8 396.5       running build_ext
#8 396.5       building 'pycld2._pycld2' extension
#8 396.5       creating build/temp.linux-aarch64-3.7
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal
#8 396.5       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/bindings
#8 396.5       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal -I/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/public -I/usr/local/include/python3.7m -c /tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal/cld2_generated_cjk_compatible.cc -o build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal/cld2_generated_cjk_compatible.o -w -O2 -m64 -fPIC
#8 396.5       gcc: error: unrecognized command line option ‘-m64’
#8 396.5       error: command 'gcc' failed with exit status 1
#8 396.5       [end of output]
#8 396.5   
#8 396.5   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 396.5   ERROR: Failed building wheel for pycld2
#8 396.5   Running setup.py clean for pycld2
#8 396.6   Building wheel for polyglot (setup.py): started
#8 396.7   Building wheel for polyglot (setup.py): finished with status 'done'
#8 396.7   Created wheel for polyglot: filename=polyglot-16.7.4-py2.py3-none-any.whl size=52577 sha256=21380294e0dff9bdfb6b6122f4ceae8918347f92441a91c81f9da2e1feebf8cb
#8 396.7   Stored in directory: /root/.cache/pip/wheels/09/bc/67/75c9de8e9726460bc0b101ad225ad025cb8ce9e0759beb9d52
#8 396.8 Successfully built pyICU polyglot
#8 396.8 Failed to build pycld2
#8 397.0 Installing collected packages: pyICU, pycld2, polyglot, morfessor
#8 397.0   Running setup.py install for pycld2: started
#8 397.1   Running setup.py install for pycld2: finished with status 'error'
#8 397.1   error: subprocess-exited-with-error
#8 397.1   
#8 397.1   × Running setup.py install for pycld2 did not run successfully.
#8 397.1   │ exit code: 1
#8 397.1   ╰─> [19 lines of output]
#8 397.1       running install
#8 397.1       running build
#8 397.1       running build_py
#8 397.1       creating build
#8 397.1       creating build/lib.linux-aarch64-3.7
#8 397.1       creating build/lib.linux-aarch64-3.7/pycld2
#8 397.1       copying pycld2/__init__.py -> build/lib.linux-aarch64-3.7/pycld2
#8 397.1       running build_ext
#8 397.1       building 'pycld2._pycld2' extension
#8 397.1       creating build/temp.linux-aarch64-3.7
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal
#8 397.1       creating build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/bindings
#8 397.1       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal -I/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/public -I/usr/local/include/python3.7m -c /tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal/cld2_generated_cjk_compatible.cc -o build/temp.linux-aarch64-3.7/tmp/pip-install-qh5ogj7_/pycld2_ddd530e084954878803c8b3d40c6f8cd/cld2/internal/cld2_generated_cjk_compatible.o -w -O2 -m64 -fPIC
#8 397.1       gcc: error: unrecognized command line option ‘-m64’
#8 397.1       error: command 'gcc' failed with exit status 1
#8 397.1       [end of output]
#8 397.1   
#8 397.1   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 397.1 error: legacy-install-failure
#8 397.1 
#8 397.1 × Encountered error while trying to install package.
#8 397.1 ╰─> pycld2
#8 397.1 
#8 397.1 note: This is an issue with the package mentioned above, not pip.
#8 397.1 hint: See above for output from the failure.
#8 397.1 WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
#8 397.1 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c apt-get update &&   apt-get install ffmpeg libsm6 libxext6 g++ pkg-config libicu-dev -y &&   pip install -r requirements.txt &&   python -m spacy download en_core_web_sm &&   pip install pyICU pycld2 morfessor polyglot &&   apt-get clean &&   rm -rf ~/.cache/pip/*]: exit code: 1
LuisMayo commented 2 years ago

This seems like an issue with pycld2. Try using pip install pycld2 and come back with the results Thanks!