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

Compilation Issues (grpcio dependency) on Apple M1 (ARM) #187

Closed
phutelmyer opened this issue Dec 9, 2021 · 2 comments · Fixed by #189
Closed

Compilation Issues (grpcio dependency) on Apple M1 (ARM) #187

phutelmyer opened this issue Dec 9, 2021 · 2 comments · Fixed by #189
Assignees
Labels
bug Something isn't working

Comments

@phutelmyer
Copy link
Contributor

Describe the bug
While compiling the current version of Strelka on a Macbook M1 (using ARM), an error is thrown while compiling grpcio

#17 21.14   Downloading grpcio-1.27.2.tar.gz (16.9 MB)
#17 24.60     ERROR: Command errored out with exit status 1:
#17 24.60      command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cba9d7s2/grpcio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cba9d7s2/grpcio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-cba9d7s2/grpcio/pip-egg-info
#17 24.60          cwd: /tmp/pip-install-cba9d7s2/grpcio/
#17 24.60     Complete output (13 lines):
#17 24.60     /tmp/pip-install-cba9d7s2/grpcio/src/python/grpcio/commands.py:102: SyntaxWarning: "is not" with a literal. Did you mean "!="?
#17 24.60       if exit_code is not 0:
#17 24.60     Traceback (most recent call last):
#17 24.60       File "<string>", line 1, in <module>
#17 24.60       File "/tmp/pip-install-cba9d7s2/grpcio/setup.py", line 191, in <module>
#17 24.60         if check_linker_need_libatomic():
#17 24.60       File "/tmp/pip-install-cba9d7s2/grpcio/setup.py", line 149, in check_linker_need_libatomic
#17 24.60         cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'],
#17 24.60       File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
#17 24.60         self._execute_child(args, executable, preexec_fn, close_fds,
#17 24.60       File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
#17 24.60         raise child_exception_type(errno_num, err_msg, err_filename)
#17 24.60     FileNotFoundError: [Errno 2] No such file or directory: 'cc'
#17 24.60     ----------------------------------------
#17 24.67 ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c pip3 install --no-cache-dir -r /strelka/requirements.txt]: exit code: 1

Steps to reproduce
Steps to reproduce the behavior:

  1. Run docker-compose -f build/docker-compose.yml build on an ARM host with docker and docker-compose installed.

Expected behavior
No compilation errors

Screenshots
See error above

Release

  • Release: 0.21.11.29

Additional context
N/A

@phutelmyer phutelmyer added the bug Something isn't working label Dec 9, 2021
@phutelmyer phutelmyer self-assigned this Dec 9, 2021
@phutelmyer
Copy link
Contributor Author

For awareness, the grpcio Python package is used in both the mmrpc and backend images. If a fix is to be applied to one, an assumption can be made that the other will fail. If identified, apply fix to both images

@phutelmyer
Copy link
Contributor Author

phutelmyer commented Dec 9, 2021

Applying the following commands to the mmrpc image allows grpcio to compile properly:

RUN apt-get install --no-install-recommends -qq build-essential

As the backend image already includes build-essential, it is able to successfully build grpcio. If successful build and execution, create a PR and test on x86/x64 architecture.

@phutelmyer phutelmyer linked a pull request Dec 9, 2021 that will close this issue
5 tasks
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

Successfully merging a pull request may close this issue.

1 participant