Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

cargo metadata --manifest-path Cargo.toml --format-version 1 --locked errors on macos-12 builds #2166

Closed
1 of 2 tasks
chenrui333 opened this issue Jul 28, 2024 · 7 comments
Closed
1 of 2 tasks
Labels
bug Something isn't working upstream Upstream issue

Comments

@chenrui333
Copy link

chenrui333 commented Jul 28, 2024

Bug Description

Whenever building maturin deps for homebrew python formulae, I often saw the "error: cargo metadata --manifest-path Cargo.toml --format-version 1 --locked failed with code -6" errors.

example error log

error build log
�[34m==>�[0m �[1mpython3.12 -m pip --python=/usr/local/Cellar/moto/5.0.11/libexec/bin/python install --verbose --no-deps --no-binary=:all: --ignore-installed --no-compile /private/tmp/moto--pydantic-core-20240708-11584-k0tjst/pydantic_core-2.20.1�[0m
Using pip 24.0 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)
Processing /private/tmp/moto--pydantic-core-20240708-11584-k0tjst/pydantic_core-2.20.1
  Installing build dependencies: started
  Running command pip subprocess to install build dependencies
  Collecting maturin<2,>=1
    Downloading maturin-1.7.0.tar.gz (188 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 188.3/188.3 kB 2.8 MB/s eta 0:00:00
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Collecting typing-extensions!=4.7.0,>=4.6.0
    Downloading typing_extensions-4.12.2.tar.gz (85 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.3/85.3 kB 2.5 MB/s eta 0:00:00
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: maturin, typing-extensions
    Building wheel for maturin (pyproject.toml): started
    Building wheel for maturin (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error

    × Building wheel for maturin (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [274 lines of output]
        /private/tmp/pip-build-env-7eo8w5p4/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:79: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
          corresp(dist, value, root_dir)
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.macosx-12.0-x86_64-cpython-312
        creating build/lib.macosx-12.0-x86_64-cpython-312/maturin
        copying maturin/__init__.py -> build/lib.macosx-12.0-x86_64-cpython-312/maturin
        copying maturin/__main__.py -> build/lib.macosx-12.0-x86_64-cpython-312/maturin
        running egg_info
        creating maturin.egg-info
        writing maturin.egg-info/PKG-INFO
        writing dependency_links to maturin.egg-info/dependency_links.txt
        writing requirements to maturin.egg-info/requires.txt
        writing top-level names to maturin.egg-info/top_level.txt
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching '*.json' under directory 'src/python_interpreter'
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        warning: build_py: byte-compiling is disabled, skipping.

        running build_ext
        running build_rust
            Updating crates.io index
         Downloading crates ...
          Downloaded adler v1.0.2
          Downloaded serde_json v1.0.120
          Downloaded toml_edit v0.22.14
          Downloaded num-conv v0.1.0
          Downloaded libc v0.2.155
          Downloaded linux-raw-sys v0.4.14
          Downloaded windows-sys v0.52.0
          Downloaded windows-sys v0.48.0
          Downloaded winapi-x86_64-pc-windows-gnu v0.4.0
          Downloaded winapi-i686-pc-windows-gnu v0.4.0
          Downloaded windows_aarch64_msvc v0.48.5
          Downloaded ring v0.17.8
          Downloaded idna v0.5.0
          Downloaded zerocopy v0.7.34
          Downloaded winsafe v0.0.19
          Downloaded winnow v0.6.13
          Downloaded winnow v0.5.40
          Downloaded windows_x86_64_msvc v0.52.5
          Downloaded windows_x86_64_msvc v0.48.5
          Downloaded windows_x86_64_gnullvm v0.52.5
          Downloaded windows_x86_64_gnullvm v0.48.5
          Downloaded windows_x86_64_gnu v0.52.5
          Downloaded windows_x86_64_gnu v0.48.5
          Downloaded windows_i686_msvc v0.52.5
          Downloaded windows_i686_msvc v0.48.5
          Downloaded windows_i686_gnullvm v0.52.5
          Downloaded windows_i686_gnu v0.52.5
          Downloaded windows_i686_gnu v0.48.5
          Downloaded windows_aarch64_msvc v0.52.5
          Downloaded windows_aarch64_gnullvm v0.52.5
          Downloaded windows_aarch64_gnullvm v0.48.5
          Downloaded nu-ansi-term v0.46.0
          Downloaded normpath v1.2.0
          Downloaded normalize-line-endings v0.3.0
          Downloaded nom v7.1.3
          Downloaded multipart v0.18.0
          Downloaded msi v0.7.0
          Downloaded miniz_oxide v0.7.3
          Downloaded minimal-lexical v0.2.1
          Downloaded minijinja v1.0.21
          Downloaded mime_guess v2.0.4
          Downloaded mime v0.3.17
          Downloaded mimalloc v0.1.42
          Downloaded memchr v2.7.2
          Downloaded matchers v0.1.0
          Downloaded mailparse v0.15.0
          Downloaded lzxd v0.2.5
          Downloaded log v0.4.21
          Downloaded lock_api v0.4.12
          Downloaded libredox v0.1.3
          Downloaded libmimalloc-sys v0.1.38
          Downloaded lddtree v0.3.5
          Downloaded lazy_static v1.4.0
          Downloaded itoa v1.0.11
          Downloaded itertools v0.12.1
          Downloaded is_terminal_polyfill v1.70.0
          Downloaded instant v0.1.13
          Downloaded indoc v2.0.5
          Downloaded indicatif v0.17.8
          Downloaded indexmap v2.2.6
          Downloaded indexmap v1.9.3
          Downloaded ignore v0.4.22
          Downloaded humantime-serde v1.1.1
          Downloaded humantime v2.1.0
          Downloaded home v0.5.9
          Downloaded heck v0.5.0
          Downloaded zip v1.1.4
          Downloaded zip v0.6.6
          Downloaded zeroize v1.8.1
          Downloaded zerocopy-derive v0.7.34
          Downloaded yansi v0.5.1
          Downloaded xwin v0.5.1
          Downloaded xattr v1.3.1
          Downloaded windows-targets v0.52.5
          Downloaded windows-targets v0.48.5
          Downloaded winapi-util v0.1.8
          Downloaded winapi v0.3.9
          Downloaded wild v2.2.1
          Downloaded which v6.0.1
          Downloaded which v5.0.0
          Downloaded webpki-roots v0.26.2
          Downloaded wasi v0.11.0+wasi-snapshot-preview1
          Downloaded walkdir v2.5.0
          Downloaded wait-timeout v0.2.0
          Downloaded versions v6.2.0
          Downloaded version_check v0.9.4
          Downloaded valuable v0.1.0
          Downloaded uuid v1.8.0
          Downloaded utf8parse v0.2.2
          Downloaded urlencoding v2.1.3
          Downloaded url v2.5.2
          Downloaded ureq v2.9.7
          Downloaded untrusted v0.9.0
          Downloaded unscanny v0.1.0
          Downloaded unicode-xid v0.2.4
          Downloaded unicode-width v0.1.13
          Downloaded unicode-normalization v0.1.23
          Downloaded unicode-linebreak v0.1.5
          Downloaded unicode-ident v1.0.12
          Downloaded unicode-bidi v0.3.15
          Downloaded unicase v2.7.0
          Downloaded typenum v1.17.0
          Downloaded twox-hash v1.6.3
          Downloaded trycmd v0.15.4
          Downloaded tracing-subscriber v0.3.18
          Downloaded tracing-serde v0.1.3
          Downloaded tracing-log v0.2.0
          Downloaded tracing-core v0.1.32
          Downloaded tracing-attributes v0.1.27
          Downloaded tracing v0.1.40
          Downloaded sharded-slab v0.1.7
          Downloaded sha2 v0.10.8
          Downloaded serde_spanned v0.6.6
          Downloaded serde_derive v1.0.204
          Downloaded serde v1.0.204
          Downloaded semver v1.0.23
          Downloaded scroll_derive v0.12.0
          Downloaded scroll v0.12.0
          Downloaded scopeguard v1.2.0
          Downloaded same-file v1.0.6
          Downloaded ryu v1.0.18
          Downloaded rustversion v1.0.17
          Downloaded rustls-webpki v0.102.4
          Downloaded rustls-pki-types v1.7.0
          Downloaded rustls-pemfile v2.1.2
          Downloaded rustls v0.22.4
          Downloaded rustix v0.38.34
          Downloaded rustc_version v0.4.0
          Downloaded rstest_macros v0.21.0
          Downloaded rstest v0.21.0
          Downloaded rfc2047-decoder v1.0.5
          Downloaded relative-path v1.9.3
          Downloaded regex-syntax v0.8.4
          Downloaded regex-syntax v0.6.29
          Downloaded regex-automata v0.4.7
          Downloaded regex-automata v0.1.10
          Downloaded regex v1.10.5
          Downloaded redox_users v0.4.5
          Downloaded redox_syscall v0.5.1
          Downloaded redox_syscall v0.4.1
          Downloaded rayon-core v1.12.1
          Downloaded rayon v1.10.0
          Downloaded rand_core v0.6.4
          Downloaded rand_chacha v0.3.1
          Downloaded rand v0.8.5
          Downloaded quoted_printable v0.5.0
          Downloaded quote v1.0.36
          Downloaded python-pkginfo v0.6.2
          Downloaded pyproject-toml v0.10.0
          Downloaded psm v0.1.21
          Downloaded proc-macro2 v1.0.85
          Downloaded proc-macro-crate v3.1.0
          Downloaded pretty_assertions v1.4.0
          Downloaded ppv-lite86 v0.2.17
          Downloaded powerfmt v0.2.0
          Downloaded portable-atomic v1.6.0
          Downloaded platform-info v2.0.3
          Downloaded plain v0.2.3
          Downloaded pkg-config v0.3.30
          Downloaded pin-utils v0.1.0
          Downloaded pin-project-lite v0.2.14
          Downloaded percent-encoding v2.3.1
          Downloaded pep508_rs v0.4.2
          Downloaded pep440_rs v0.5.0
          Downloaded path-slash v0.2.1
          Downloaded paste v1.0.15
          Downloaded parking_lot_core v0.9.10
          Downloaded parking_lot v0.12.3
          Downloaded overload v0.1.1
          Downloaded os_pipe v1.2.0
          Downloaded option-ext v0.2.0
          Downloaded once_cell v1.19.0
          Downloaded number_prefix v0.4.0
          Downloaded num_enum_derive v0.7.2
          Downloaded num_enum v0.7.2
          Downloaded heck v0.4.1
          Downloaded toml_edit v0.21.1
          Downloaded toml_datetime v0.6.6
          Downloaded toml v0.8.14
          Downloaded toml v0.5.11
          Downloaded tinyvec_macros v0.1.1
          Downloaded tinyvec v1.7.0
          Downloaded time-macros v0.2.18
          Downloaded time-core v0.1.2
          Downloaded time v0.3.36
          Downloaded thread_local v1.1.8
          Downloaded thiserror-impl v1.0.61
          Downloaded thiserror v1.0.61
          Downloaded textwrap v0.16.1
          Downloaded terminal_size v0.3.0
          Downloaded termcolor v1.4.1
          Downloaded tempfile v3.10.1
          Downloaded target-lexicon v0.12.14
          Downloaded tar v0.4.41
          Downloaded syn v2.0.66
          Downloaded syn v1.0.109
          Downloaded subtle v2.5.0
          Downloaded strsim v0.11.1
          Downloaded static_assertions v1.1.0
          Downloaded stacker v0.1.15
          Downloaded spin v0.9.8
          Downloaded socks v0.3.4
          Downloaded snapbox-macros v0.3.9
          Downloaded snapbox v0.6.10
          Downloaded smawk v0.3.2
          Downloaded smallvec v1.13.2
          Downloaded slab v0.4.9
          Downloaded similar v2.5.0
          Downloaded shlex v1.3.0
          Downloaded shell-words v1.1.0
          Downloaded flate2 v1.0.30
          Downloaded filetime v0.2.23
          Downloaded fat-macho v0.4.8
          Downloaded fastrand v2.1.0
          Downloaded expect-test v1.5.0
          Downloaded errno v0.3.9
          Downloaded encoding_rs v0.8.34
          Downloaded encode_unicode v0.3.6
          Downloaded either v1.12.0
          Downloaded dunce v1.0.4
          Downloaded dissimilar v1.0.9
          Downloaded displaydoc v0.2.4
          Downloaded dirs-sys v0.4.1
          Downloaded dirs v5.0.1
          Downloaded digest v0.10.7
          Downloaded diff v0.1.13
          Downloaded dialoguer v0.11.0
          Downloaded derive_arbitrary v1.3.2
          Downloaded derivative v2.2.0
          Downloaded deranged v0.3.11
          Downloaded data-encoding v2.6.0
          Downloaded crypto-common v0.1.6
          Downloaded crossbeam-utils v0.8.20
          Downloaded crossbeam-epoch v0.9.18
          Downloaded crossbeam-deque v0.8.5
          Downloaded crossbeam-channel v0.5.13
          Downloaded crc32fast v1.4.2
          Downloaded content_inspector v0.2.4
          Downloaded console v0.15.8
          Downloaded configparser v3.1.0
          Downloaded colorchoice v1.0.1
          Downloaded clap_lex v0.7.1
          Downloaded clap_derive v4.5.5
          Downloaded clap_complete_nushell v0.1.11
        error: `cargo metadata --manifest-path Cargo.toml --format-version 1 --locked` failed with code -6
        -- Output captured from stdout:

        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for maturin
    Building wheel for typing-extensions (pyproject.toml): started
    Building wheel for typing-extensions (pyproject.toml): finished with status 'done'
    Created wheel for typing-extensions: filename=typing_extensions-4.12.2-py3-none-any.whl size=37438 sha256=d71cbf489b3fdba367abe29caff360de908625b027db57ef9e463784064b65a6
    Stored in directory: /Users/brew/Library/Caches/Homebrew/pip_cache/wheels/cc/d7/e0/01a4e9a11dee2698cfa7e32d2cdb65ade91303986b2fc7d84f
  Successfully built typing-extensions
  Failed to build maturin
  ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects


I also saw macos-12 is missing in the build matrix, might be good to add it there.

Your maturin version (maturin --version)

1.7.0

Your Python version (python -V)

3.12.4

Your pip version (pip -V)

24.0

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

full build log in here, https://github.com/Homebrew/homebrew-core/actions/runs/10127044668/job/28016456364

it usually succeeds after a rerun.


@chenrui333 chenrui333 added the bug Something isn't working label Jul 28, 2024
@messense
Copy link
Member

I've never seen this exit code -6 in local environment, it seems that this is happened when building maturin from source using setuptools-rust. @davidhewitt any ideas?

@chenrui333
Copy link
Author

I am seeing this with homebrew CI build today

Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/tmp/pip-modern-metadata-55lvce58', '--interpreter', '/usr/local/Cellar/checkov/3.2.210/libexec/bin/python']' returned non-zero exit status 1.

relates to Homebrew/homebrew-core#178830

@messense
Copy link
Member

We are calling cargo metadata in subprocess in both setuptools-rust and maturin, IMHO it might be an issue in cargo (or how Homebrew builds cargo that was different with official rust-lang release since we never seen this when using cargo from rustup?).

@branchvincent
Copy link

Yea this is an issue with cargo: rust-lang/cargo#10060

@messense messense added the upstream Upstream issue label Aug 1, 2024
@messense
Copy link
Member

messense commented Aug 1, 2024

Closing since there is no action we can take here in maturin.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2024
@chenrui333
Copy link
Author

yeah, rust 1.81.0 resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

3 participants