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

Building on Docker not working #696

Closed
rolf-d2i opened this issue Nov 8, 2021 · 6 comments
Closed

Building on Docker not working #696

rolf-d2i opened this issue Nov 8, 2021 · 6 comments

Comments

@rolf-d2i
Copy link

rolf-d2i commented Nov 8, 2021

Build fails on Docker when trying to use the following (below is Docker code, possible missing some libs)

FROM python:3-alpine run pip install --upgrade pip RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev RUN pip install cryptography RUN apk add make RUN pip install pynacl

Work around is to use the following instead of "pip install pynacl" to use a prebuilt libsodium library
RUN apk add libsodium RUN apk add libsodium-dev RUN SODIUM_INSTALL=system pip install pynacl

The build crashes for some reason in the Docker container, this could need a fix. Same problem exists in python:3 container.

@ghost
Copy link

ghost commented Dec 21, 2021

It would be really nice to see musllinux wheels for pynacl.

@twbecker
Copy link

twbecker commented Jan 7, 2022

Can confirm. Error is quite nondescript also:

  make: *** [Makefile:514: all-recursive] Error 127
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 230, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 216, in <module>
      setup(
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/tmp/pip-build-env-jf3yebx_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "setup.py", line 184, in run
      subprocess.check_call(["make"] + make_args, cwd=build_temp)
    File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for pynacl

@reaperhulk
Copy link
Member

Building libsodium requires make in addition to the C compiler itself. However, we've now shipped a musl wheel with 1.5.0.

@twbecker
Copy link

twbecker commented Jan 7, 2022

@reaperhulk make is installed in my output above.

@reaperhulk
Copy link
Member

You'll be able to see the output if you add -v to see what the actual failure within make is.

@ghost
Copy link

ghost commented Jan 9, 2022

Awesome, thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants