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

Container does not build on m1 #4

Closed
dacort opened this issue Oct 17, 2022 · 1 comment · Fixed by #5
Closed

Container does not build on m1 #4

dacort opened this issue Oct 17, 2022 · 1 comment · Fixed by #5

Comments

@dacort
Copy link
Contributor

dacort commented Oct 17, 2022

When trying to build on mac m1, the following error is encountered:

#0 7.218     gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -moutline-atomics -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=592 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-aarch64-3.7/psutil/_psutil_common.o
#0 7.218     unable to execute 'gcc': No such file or directory
#0 7.218     C compiler or Python headers are not installed on this system. Try to run:
#0 7.218     sudo yum install gcc python3-devel
#0 7.218     error: command 'gcc' failed with exit status 1
#0 7.218     ----------------------------------------
#0 7.219 ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e9rvp54h/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e9rvp54h/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-05nv3pe8/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7m/psutil Check the logs for full command output.
------
ERROR: failed to solve: executor failed running [/bin/sh -c python3 -m pip install -U pip ipykernel]: exit code: 1
@dacort
Copy link
Contributor Author

dacort commented Oct 17, 2022

ipykernel depends on psutil, which unfortunately does not publish wheels for aarch64.

So if running on non-amd64, we need to install gcc and python3-devel in the image.

dacort added a commit that referenced this issue Oct 17, 2022
- Install gcc/python3-devel for non amd64 arch
- Split out pip install so later pip installs can benefit
@dacort dacort closed this as completed in #5 Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant