Skip to content

2.18.0: pep517 based build fails #1264

@kloczek

Description

@kloczek

Looks like something is wrong and I'm not sure what I can do more to diagnose this issue 🤔

+ cd pydantic-core-2.18.0
+ export RUST_BACKTRACE=full
+ RUST_BACKTRACE=full
+ ASMFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ CXXFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security'
+ FFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--gc-sections -Wl,--as-needed -Wl,--build-id=sha1 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,pack-relative-relocs -flto=auto -fuse-linker-plugin'
+ RUSTFLAGS='-C codegen-units=1 -C debuginfo=2 -C opt-level=2 -C link-arg=-Wl,--as-needed -C link-arg=-Wl,--build-id=sha1 -C link-arg=-Wl,-z,now -C link-arg=-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -C link-arg=-Wl,-z,pack-relative-relocs -C link-arg=-Wl,-z,relro -C link-arg=-flto=auto --cap-lints=warn'
+ VALAFLAGS=-g
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export ASMFLAGS CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS VALAFLAGS CC CXX FC AR NM RANLIB RUSTFLAGS VALAFLAGS
+ PBR_VERSION=2.18.0
+ PDM_BUILD_SCM_VERSION=2.18.0
+ SETUPTOOLS_SCM_PRETEND_VERSION=2.18.0
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off`
📦 Including license file "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/LICENSE"
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.10 at /usr/bin/python3
📡 Using build options features, bindings from pyproject.toml
   Compiling autocfg v1.1.0
   Compiling target-lexicon v0.12.9
   Compiling proc-macro2 v1.0.76
   Compiling python3-dll-a v0.2.9
   Compiling unicode-ident v1.0.10
   Compiling once_cell v1.18.0
   Compiling libc v0.2.147
   Compiling heck v0.4.1
   Compiling cfg-if v1.0.0
   Compiling rustversion v1.0.13
   Compiling version_check v0.9.4
   Compiling parking_lot_core v0.9.8
   Compiling static_assertions v1.1.0
   Compiling tinyvec_macros v0.1.1
   Compiling scopeguard v1.1.0
   Compiling portable-atomic v1.6.0
   Compiling smallvec v1.13.2
   Compiling serde v1.0.197
   Compiling memchr v2.6.3
   Compiling unicode-bidi v0.3.13
   Compiling zerocopy v0.7.32
   Compiling unindent v0.2.3
   Compiling indoc v2.0.4
   Compiling percent-encoding v2.3.1
   Compiling regex-syntax v0.8.2
   Compiling serde_json v1.0.114
   Compiling hashbrown v0.14.3
   Compiling equivalent v1.0.1
   Compiling ryu v1.0.14
   Compiling itoa v1.0.8
   Compiling uuid v1.7.0
   Compiling base64 v0.21.7
   Compiling lexical-util v0.8.5
   Compiling tinyvec v1.6.0
   Compiling form_urlencoded v1.2.1
   Compiling aho-corasick v1.0.2
   Compiling indexmap v2.2.2
   Compiling lexical-parse-integer v0.8.6
   Compiling quote v1.0.35
   Compiling unicode-normalization v0.1.22
   Compiling lexical-parse-float v0.8.5
   Compiling syn v2.0.48
   Compiling getrandom v0.2.10
   Compiling ahash v0.8.10
   Compiling idna v0.5.0
   Compiling num-traits v0.2.16
   Compiling num-integer v0.1.45
   Compiling lock_api v0.4.10
   Compiling memoffset v0.9.0
   Compiling num-bigint v0.4.4
   Compiling url v2.5.0
   Compiling regex-automata v0.4.5
   Compiling parking_lot v0.12.1
   Compiling pyo3-build-config v0.21.1
   Compiling regex v1.10.3
   Compiling pyo3-macros-backend v0.21.1
   Compiling pyo3-ffi v0.21.1
   Compiling pyo3 v0.21.1
   Compiling jiter v0.2.1
   Compiling pydantic-core v2.18.0 (/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0)
error: failed to run custom build command for `pydantic-core v2.18.0 (/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/target/release/build/pydantic-core-4c590a799fb93a67/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=Py_3_6
  cargo:rustc-cfg=Py_3_7
  cargo:rustc-cfg=Py_3_8
  cargo:rustc-cfg=Py_3_9
  cargo:rustc-cfg=Py_3_10
  cargo:rerun-if-changed=python/pydantic_core/core_schema.py
  cargo:rerun-if-changed=generate_self_schema.py

  --- stderr
  Traceback (most recent call last):
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 241, in <module>
      main()
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 211, in main
      value = get_schema(s, definitions)
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 55, in get_schema
      return type_dict_schema(obj, definitions)
    File "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/generate_self_schema.py", line 151, in type_dict_schema
      raise ValueError(f'Unknown Schema forward ref: {fr_arg}')
  ValueError: Unknown Schema forward ref: list[CoreSchema]
  thread 'main' panicked at build.rs:29:9:
  generate_self_schema.py failed with exit status: 1
  stack backtrace:
     0:     0x55e1a60bfaa6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h69c73a6e4efece9e
     1:     0x55e1a60e191c - core::fmt::write::h5a3206cd19e1398e
     2:     0x55e1a60bd7cd - std::io::Write::write_fmt::hddabb9f61b3df43c
     3:     0x55e1a60bf854 - std::sys_common::backtrace::print::h8725e25cffe00661
     4:     0x55e1a60c0d7b - std::panicking::default_hook::{{closure}}::hb0f936e8957a615f
     5:     0x55e1a60c0ac9 - std::panicking::default_hook::h421e1acaa06b0239
     6:     0x55e1a60c121d - std::panicking::rust_panic_with_hook::hacb2a41eb325ef57
     7:     0x55e1a60c10f2 - std::panicking::begin_panic_handler::{{closure}}::hc4b1d9fd2e2dee4f
     8:     0x55e1a60bff86 - std::sys_common::backtrace::__rust_end_short_backtrace::h6330eede8720241c
     9:     0x55e1a60c0e24 - rust_begin_unwind
    10:     0x55e1a608d735 - core::panicking::panic_fmt::h77d9143ff35fccd0
    11:     0x55e1a608ef8c - build_script_build::generate_self_schema::h7ffd1f75bddb3fff
                                 at /home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/build.rs:29:9
    12:     0x55e1a608ef8c - build_script_build::main::h34cc45bbd9c223f2
                                 at /home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/build.rs:38:5
    13:     0x55e1a608df33 - core::ops::function::FnOnce::call_once::h19a588fac4206bb8
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/core/src/ops/function.rs:250:5
    14:     0x55e1a608df33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h871115d0c341a49e
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/std/src/sys_common/backtrace.rs:155:18
    15:     0x55e1a608df49 - std::rt::lang_start::{{closure}}::h1c150d1ec0997b7b
                                 at /builddir/build/BUILD/rustc-1.77.0-src/library/std/src/rt.rs:166:18
    16:     0x55e1a60b9e83 - std::rt::lang_start_internal::h36bdc61521625955
    17:     0x55e1a608f0df - main
    18:     0x7fca0d96b1c8 - __libc_start_call_main
    19:     0x7fca0d96b28b - __libc_start_main_impl
    20:     0x55e1a608de65 - _start
    21:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.10-64bit" PYO3_PYTHON="/usr/bin/python3" PYTHON_SYS_EXECUTABLE="/usr/bin/python3" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/tkloczko/rpmbuild/BUILD/pydantic-core-2.18.0/Cargo.toml" "--release" "--lib" "--crate-type" "cdylib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python3', '--compatibility', 'off'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions