Skip to content

Installing haddock3 on apple-m3 fails (maybe) #1262

Open
@AnnaKravchenko

Description

@AnnaKravchenko

I tried to install latest version of haddok3 following instructions from github.
Pip install faild with:

      cc1: error: unknown value 'apple-m3' for ‘-march’
      cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8-r native

I managed to resolve this issue by removing all march=naive from setup.py.

Important!: I do have a copy of mac-arm64-darwin cns, given to me piror to this installation attempt.

I do not know if this issue is due to the existing cns version, thus already covered in the installation troubleshooting, or an actual bug.

Fuller log:

      running build_ext
      Building HADDOCK3 C/C++ binary dependencies…
      moving contact_fcc -> src/haddock/bin/contact_fcc
      copying src/haddock/bin/contact_fcc -> build/lib.macosx-11.0-arm64-cpython-39/haddock/bin
      cc1: error: unknown value 'apple-m3' for ‘-march’
      cc1: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8-r native
      Successfully built and moved contact_fcc
      Error building fast-rmsdmatrix: Command '['gcc', '-Wall', '-O3', '-march=native', '-std=c99', '-o', 'fast-rmsdmatrix', 'src/haddock/deps/fast-rmsdmatrix.c', '-lm']' returned non-zero exit status 1.
      Traceback (most recent call last):
        File "/Users/Kravc006/postdoc/tools/mambaforge/envs/haddock3/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/Users/Kravc006/postdoc/tools/mambaforge/envs/haddock3/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs”])
        File "/Users/Kravc006/postdoc/tools/mambaforge/envs/haddock3/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 435, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 140, in <module>
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1104, in run_command
          super().run_command(command)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command(“build”)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1104, in run_command
          super().run_command(command)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1104, in run_command
          super().run_command(command)
        File "/private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-build-env-8yduu_2z/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "<string>", line 47, in run
        File "<string>", line 70, in build_executable
        File "/Users/Kravc006/postdoc/tools/mambaforge/envs/haddock3/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['gcc', '-Wall', '-O3', '-march=native', '-std=c99', '-o', 'fast-rmsdmatrix', 'src/haddock/deps/fast-rmsdmatrix.c', '-lm']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for haddock3
  DEPRECATION: Building 'freesasa' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'freesasa'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for freesasa (setup.py) … done
  Created wheel for freesasa: filename=freesasa-2.2.1-cp39-cp39-macosx_11_0_arm64.whl size=285687 sha256=de6f26ffdb3f26736fd311682500147f8e411544fa50ac51037183cbdc41ad83
  Stored in directory: /private/var/folders/cv/r0bdb1yd7hg89t1lxw6z90lc0000gn/T/pip-ephem-wheel-cache-5q72lpl4/wheels/cd/f0/b5/1b158a3b1fba5bf481e7af23a8c7479146296531f22f7fee67
Successfully built freesasa
Failed to build haddock3
ERROR: Failed to build installable wheels for some pyproject.toml based projects (haddock3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions