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

Can't build using x86_64-pc-windows-gcc #147

Closed
Quogu opened this issue May 28, 2021 · 7 comments
Closed

Can't build using x86_64-pc-windows-gcc #147

Quogu opened this issue May 28, 2021 · 7 comments

Comments

@Quogu
Copy link

Quogu commented May 28, 2021

I'm not able to build the html-py-ever example project on Windows using the x86_64-pc-windows-gcc target.

To reproduce, I did the following:

rustup default stable-x86_64-pc-windows-gnu
conda create -n test python=3.7.* setuptools-rust # This installed setuptools-rust 0.12.1
conda activate test
git clone https://github.com/PyO3/setuptools-rust
cd setuptools-rust/examples/html-py-ever
python setup.py develop

I get the following error log:

running develop
running egg_info
writing html_py_ever.egg-info\PKG-INFO
writing dependency_links to html_py_ever.egg-info\dependency_links.txt
writing requirements to html_py_ever.egg-info\requires.txt
writing top-level names to html_py_ever.egg-info\top_level.txt
reading manifest file 'html_py_ever.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'html_py_ever.egg-info\SOURCES.txt'
running build_ext
running build_rust
cargo rustc --lib --manifest-path Cargo.toml --features pyo3/extension-module --target x86_64-pc-windows-msvc --verbose -- --crate-type cdylib
       Fresh unicode-xid v0.2.1
       Fresh ppv-lite86 v0.2.9
       Fresh proc-macro-hack v0.5.18
   Compiling cfg-if v0.1.10
   Compiling siphasher v0.3.3
   Compiling new_debug_unreachable v1.0.4
   Compiling smallvec v1.4.2
   Compiling mac v0.1.1
   Compiling precomputed-hash v0.1.1
   Compiling lazy_static v1.4.0
   Compiling dtoa v0.4.6
     Running `rustc --crate-name cfg_if --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\cfg-if-0.1.10\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=f6ab1f9c3538b7df -C extra-filename=-f6ab1f9c3538b7df --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name siphasher C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\siphasher-0.3.3\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=15abcfe96d4590ba -C extra-filename=-15abcfe96d4590ba --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name debug_unreachable --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\new_debug_unreachable-1.0.4\src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=706dc9e679fcc757 -C extra-filename=-706dc9e679fcc757 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name smallvec --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\smallvec-1.4.2\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=ddf27e99bd3760a2 -C extra-filename=-ddf27e99bd3760a2 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name mac C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\mac-0.1.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=a320dbb8deb8ed2d -C extra-filename=-a320dbb8deb8ed2d --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name precomputed_hash C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\precomputed-hash-0.1.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=5142dfb86ec1810c -C extra-filename=-5142dfb86ec1810c --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name lazy_static C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\lazy_static-1.4.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=8e08195e3ab61984 -C extra-filename=-8e08195e3ab61984 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
   Compiling utf-8 v0.7.5
   Compiling nodrop v0.1.14
   Compiling scopeguard v1.1.0
   Compiling matches v0.1.8
   Compiling itoa v0.4.6
   Compiling stable_deref_trait v1.2.0
   Compiling instant v0.1.6
   Compiling thin-slice v0.1.1
   Compiling cfg-if v1.0.0
   Compiling unindent v0.1.6
     Running `rustc --crate-name dtoa C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\dtoa-0.4.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=257e57fd765b2ca3 -C extra-filename=-257e57fd765b2ca3 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name utf8 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\utf-8-0.7.5\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=f41f97e56e220b63 -C extra-filename=-f41f97e56e220b63 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name nodrop C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\nodrop-0.1.14\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=bf053b1e51d379cc -C extra-filename=-bf053b1e51d379cc --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name scopeguard C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\scopeguard-1.1.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=4617ee9355e8fdff -C extra-filename=-4617ee9355e8fdff --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name matches C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\matches-0.1.8\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=18303a96de5ee605 -C extra-filename=-18303a96de5ee605 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name itoa C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\itoa-0.4.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=def4bf60c7f6fe2f -C extra-filename=-def4bf60c7f6fe2f --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name stable_deref_trait C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\stable_deref_trait-1.2.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"alloc\"" --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C metadata=17dba0079d6dfdb0 -C extra-filename=-17dba0079d6dfdb0 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name instant --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\instant-0.1.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=74469682a789725f -C extra-filename=-74469682a789725f --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name thin_slice C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\thin-slice-0.1.1\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=015d35098ab4c270 -C extra-filename=-015d35098ab4c270 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name cfg_if --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\cfg-if-1.0.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=484fa1ee9d19618f -C extra-filename=-484fa1ee9d19618f --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
     Running `rustc --crate-name unindent --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\unindent-0.1.6\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d49b154cd069f982 -C extra-filename=-d49b154cd069f982 --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow`
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if`

Caused by:
  process didn't exit successfully: `rustc --crate-name cfg_if --edition=2018 C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\cfg-if-0.1.10\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=f6ab1f9c3538b7df -C extra-filename=-f6ab1f9c3538b7df --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps --target x86_64-pc-windows-msvc -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-msvc\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-pc-windows-msvc` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: build failed
error: cargo failed with code: 101

If I then do:

$env:CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu"
python setup.py develop

Then I instead get the following error:

running develop
running egg_info
writing html_py_ever.egg-info\PKG-INFO
writing dependency_links to html_py_ever.egg-info\dependency_links.txt
writing requirements to html_py_ever.egg-info\requires.txt
writing top-level names to html_py_ever.egg-info\top_level.txt
reading manifest file 'html_py_ever.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'html_py_ever.egg-info\SOURCES.txt'
running build_ext
running build_rust
cargo rustc --lib --manifest-path Cargo.toml --features pyo3/extension-module --target x86_64-pc-windows-gnu --verbose -- --crate-type cdylib
       Fresh unicode-xid v0.2.1
       Fresh ppv-lite86 v0.2.9
       Fresh proc-macro-hack v0.5.18
       Fresh cfg-if v0.1.10
       Fresh siphasher v0.3.3
       Fresh smallvec v1.4.2
       Fresh new_debug_unreachable v1.0.4
       Fresh mac v0.1.1
       Fresh precomputed-hash v0.1.1
       Fresh utf-8 v0.7.5
       Fresh lazy_static v1.4.0
       Fresh dtoa v0.4.6
       Fresh nodrop v0.1.14
       Fresh stable_deref_trait v1.2.0
       Fresh instant v0.1.6
       Fresh itoa v0.4.6
       Fresh matches v0.1.8
       Fresh scopeguard v1.1.0
       Fresh thin-slice v0.1.1
       Fresh cfg-if v1.0.0
       Fresh unindent v0.1.6
       Fresh phf_shared v0.8.0
       Fresh futf v0.1.4
       Fresh paste-impl v0.1.18
       Fresh proc-macro2 v1.0.21
       Fresh getrandom v0.1.15
       Fresh ryu v1.0.5
       Fresh dtoa-short v0.3.2
       Fresh lock_api v0.4.1
       Fresh servo_arc v0.1.1
       Fresh quote v1.0.7
       Fresh rand_core v0.5.1
       Fresh serde_json v1.0.57
       Fresh serde v1.0.116
       Fresh log v0.4.11
       Fresh winapi-x86_64-pc-windows-gnu v0.4.0
       Fresh byteorder v1.3.4
       Fresh tendril v0.4.1
       Fresh bitflags v1.2.1
       Fresh libc v0.2.77
       Fresh paste v0.1.18
       Fresh syn v1.0.41
       Fresh rand_pcg v0.2.1
       Fresh rand_chacha v0.2.2
       Fresh winapi v0.3.9
       Fresh string_cache v0.8.0
       Fresh fxhash v0.2.1
       Fresh rand v0.7.3
       Fresh serde_derive v1.0.116
       Fresh cssparser-macros v0.6.0
       Fresh parking_lot_core v0.8.0
       Fresh indoc-impl v0.3.6
       Fresh ctor v0.1.15
       Fresh ghost v0.1.2
       Fresh inventory-impl v0.1.9
       Fresh derive_more v0.99.10
       Fresh pyo3-macros-backend v0.13.2
       Fresh phf_generator v0.8.0
       Fresh pyo3-macros v0.13.2
       Fresh indoc v0.3.6
       Fresh inventory v0.1.9
       Fresh parking_lot v0.11.0
       Fresh phf_codegen v0.8.0
       Fresh phf_macros v0.8.0
       Fresh string_cache_codegen v0.5.1
       Fresh pyo3 v0.13.2
       Fresh phf v0.8.0
       Fresh cssparser v0.27.2
       Fresh markup5ever v0.10.0
       Fresh selectors v0.22.0
       Fresh html5ever v0.25.1
       Fresh kuchiki v0.8.1
   Compiling html-py-ever v0.1.0 (C:\Users\ellio\source\setuptools-rust\examples\html-py-ever)
     Running `rustc --crate-name html_py_ever --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --crate-type cdylib -C metadata=9011da7cc229275c --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps --target x86_64-pc-windows-gnu -C incremental=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\incremental -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --extern kuchiki=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libkuchiki-ffa9541125987fa0.rlib --extern pyo3=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libpyo3-1a07499e9b3e1cb1.rlib --extern tendril=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libtendril-27a3eea10a7e8f68.rlib -L native=C:\Users\ellio\miniconda3\envs\setuptoolsrusttest\libs -L native=C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\winapi-x86_64-pc-windows-gnu-0.4.0\lib`
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.0.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.1.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.10.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.11.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.12.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.13.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.14.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.15.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.2.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.3.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.4.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.5.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.6.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.7.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.8.rcgu.o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.html_py_ever.2a5j5y54-cgu.9.rcgu.o" "-o" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.dll" "-Wl,C:\\Users\\ellio\\AppData\\Local\\Temp\\rustciKoiR8\\list.def" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\html_py_ever.4nimc31wx4uvvk51.rcgu.o" "-Wl,--gc-sections" "-shared" "-Wl,--out-implib=C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libhtml_py_ever.dll.a" "-nodefaultlibs" "-L" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps" "-L" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\debug\\deps" "-L" "C:\\Users\\ellio\\miniconda3\\envs\\setuptoolsrusttest\\libs" "-L" "C:\\Users\\ellio\\.cargo\\registry\\src\\jackfan.us.kg-1ecc6299db9ec823\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libkuchiki-ffa9541125987fa0.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libselectors-559fc9f8f448935e.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libthin_slice-eecf7378e417b095.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libservo_arc-edfa0c57db28c8df.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libstable_deref_trait-c8560d01dbd7c075.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libnodrop-a8234fbbf9b1bcea.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libfxhash-fc87b6d7fc03ece9.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libbyteorder-0fdd4e397258e0b5.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libbitflags-5631bf252c9c3005.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libcssparser-b121a2ab764b6905.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libitoa-7ebecf9581c6d5ee.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libdtoa_short-56861e927f3c12a9.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libdtoa-a4a04e778c0f3e73.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libmatches-9575a7113aef0318.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libhtml5ever-44583293ba1166f1.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\liblog-73e443be41d0a088.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libmarkup5ever-73b1c2810df0577f.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libstring_cache-f43fa3fe5e03e6e3.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libprecomputed_hash-e430e8a50718a2be.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libserde-f45f708a9c8fca17.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\liblazy_static-d644dca7d7b8e3a5.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libphf-423edb5ee61a2556.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libphf_shared-b179013129b983f0.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libsiphasher-fb118a93f1baaaae.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libtendril-27a3eea10a7e8f68.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libutf8-431913b207ae8c50.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libfutf-3a7b708f01b7169e.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libdebug_unreachable-c91b546dfae5611a.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libmac-2e424fa0bd74251b.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libpyo3-1a07499e9b3e1cb1.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libcfg_if-524858edd7502eac.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libparking_lot-1fe3b11389aa5305.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libparking_lot_core-16a1c5bb7b261cb0.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libwinapi-acfdc3b0fa3d9314.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libsmallvec-3ed321d405938ac0.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libcfg_if-1794dd0e73f2ffe3.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\liblock_api-02de8150714ff723.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libscopeguard-eb4980d02e37c971.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libinstant-e37c387cb40b7fb2.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\liblibc-d2b5e11eb1c80baf.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libunindent-ac3f3abd656f1a88.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libpaste-231c75c8b520bf51.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libinventory-a1b5b773e1d555a2.rlib" "C:\\Users\\ellio\\source\\setuptools-rust\\examples\\html-py-ever\\target\\x86_64-pc-windows-gnu\\debug\\deps\\libindoc-e428dacb09643326.rlib" "-Wl,--start-group" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-5c720e8db4b99e37.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-29283164da786e03.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libobject-1776be3a32adbb49.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libaddr2line-0892c1b32ffa2c4d.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libgimli-517a95b0a57b9e8e.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_demangle-82d48d88ac13ce1c.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libhashbrown-37de12e440fa77bc.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-7549ba16005c4b88.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-b131f4022158fa79.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcfg_if-bfa5ff0422f13358.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-454b6cdb3888a4db.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-90ee5fe37d1109a4.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_core-f5802464b35b87c4.rlib" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-7ca46f1af2cdfb26.rlib" "-Wl,--end-group" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-13d041c714b5c5f4.rlib" "-Wl,-Bdynamic" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lpython3.7" "-lwinapi_advapi32" "-lwinapi_cfgmgr32" "-lwinapi_kernel32" "-lwinapi_user32" "-ladvapi32" "-lws2_32" "-luserenv" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\Users\\ellio\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython3.7
          collect2.exe: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `html-py-ever`

Caused by:
  process didn't exit successfully: `rustc --crate-name html_py_ever --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --crate-type cdylib -C metadata=9011da7cc229275c --out-dir C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps --target x86_64-pc-windows-gnu -C incremental=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\incremental -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps -L dependency=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\debug\deps --extern kuchiki=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libkuchiki-ffa9541125987fa0.rlib --extern pyo3=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libpyo3-1a07499e9b3e1cb1.rlib --extern tendril=C:\Users\ellio\source\setuptools-rust\examples\html-py-ever\target\x86_64-pc-windows-gnu\debug\deps\libtendril-27a3eea10a7e8f68.rlib -L native=C:\Users\ellio\miniconda3\envs\setuptoolsrusttest\libs -L native=C:\Users\ellio\.cargo\registry\src\jackfan.us.kg-1ecc6299db9ec823\winapi-x86_64-pc-windows-gnu-0.4.0\lib` (exit code: 1)
error: cargo failed with code: 101

The Rust version is rustc 1.52.1 (9bc8c42bb 2021-05-09), and the example code I'm using is at revision 75787159051f133f24dbceeb143ee5ae976c7244. I'm on Windows 10 build 19042.985. My GCC toolchain version is gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0.

Would it be possible to allow setuptools-rust to successfully build against x86_64-pc-windows-gnu please?

@messense
Copy link
Member

I'm not able to help because I don't own a Windows PC, so help wanted.

@davidhewitt
Copy link
Member

Hi @Quogu, sorry it has taken me so long to investigate this.

It is possible to build using x86_64-pc-windows-gnu (I was able to build succesfully on my machine just now), but the Python you are building with must also be compiled against the x86_64-pc-windows-gnu target. I think that conda (which you were using above) uses the msvc target. This is also why you had to manually override target - setuptools_rust had detected that your Python was built using msvc.

I had to use the msys2 package mingw-w64-x86_64-python to get a successful build.

@Quogu
Copy link
Author

Quogu commented Jul 29, 2021

Thanks for the reply, @davidhewitt!

What I don't understand is why this requirement has been added in more recent versions of setuptools-rust / PyO3 - previously we were able to build using x86_64-pc-windows-gnu against a "normal" Python install rather than needing to use a non-standard Python.

As an example, if I checkout dca1a01fc1eed1ea91cf04432240e31d78eac6d2 (the release of 0.10.6, which I'm using internally), and apply the following patch:

diff --git a/html-py-ever/Cargo.toml b/html-py-ever/Cargo.toml
index 526cc40..e01e0e2 100644
--- a/html-py-ever/Cargo.toml
+++ b/html-py-ever/Cargo.toml
@@ -5,7 +5,7 @@ authors = ["konstin <[email protected]>"]

 [dependencies]
 kuchiki = "0.7.2"
-pyo3 = {git = "https://github.com/PyO3/pyo3", features = ["extension-module"]}
+pyo3 = { version = "~0.12.1", features = ["extension-module"]}
 tendril = "0.4.0"

 [lib]
diff --git a/html-py-ever/src/lib.rs b/html-py-ever/src/lib.rs
index e382f99..5c7406f 100644
--- a/html-py-ever/src/lib.rs
+++ b/html-py-ever/src/lib.rs
@@ -12,7 +12,7 @@ use std::path::Path;
 use tendril::stream::TendrilSink;

 /// A parsed html document
-#[pyclass]
+#[pyclass(unsendable)]
 struct Document {
     node: NodeRef,
 }
@@ -55,10 +55,10 @@ fn parse_text(text: &str) -> PyResult<Document> {
     Ok(document)
 }

-#[pymodinit]
+#[pymodule]
 fn html_py_ever(_py: Python, m: &PyModule) -> PyResult<()> {
-    m.add_function(wrap_function!(parse_file))?;
-    m.add_function(wrap_function!(parse_text))?;
+    m.add_wrapped(wrap_pyfunction!(parse_file))?;
+    m.add_wrapped(wrap_pyfunction!(parse_text))?;
     m.add_class::<Document>()?;

     Ok(())

If I then run:

rustup default nightly-x86_64-pc-windows-gnu
conda create -n test2 python=3.7.* setuptools-rust=0.10.6
conda activate test2
python setup.py develop

It will successfully build the extension, and I'm able to launch Python and use the module successfully too.

Given that this used to work in previous versions of setuptools-rust and PyO3, this seems like a regression to me. Does that sound reasonable to you, and if so, could this issue be re-opened and investigated, please?

Thanks very much for your time.

@davidhewitt
Copy link
Member

davidhewitt commented Aug 3, 2021

Thanks for the reply @Quogu.

So I've done some research and it sounds like DLLs linked with msvc (which your Python from conda will be) can be linked into binaries with the gnu target, as long as the symbols are just plain old C symbols. (From stack overflow it sounds like the issues come from different C++ symbol mangling schemes from the two compilers.)

So yes, I'm happy to consider this a regression. The original change probably came from PyO3/pyo3#1423, which supported the mingw lib name on Windows with the gnu target.

Rather than revert that PR, I'd like to provide a way to configure the DLL name to link against.

@davidhewitt davidhewitt reopened this Aug 3, 2021
@davidhewitt
Copy link
Member

(Or even better, I think I might be able to use sysconfig.get_platform() to automatically decide what lib name to use. I'm aiming to put something into PyO3 0.14.2 and release within the next couple of days.)

@davidhewitt
Copy link
Member

davidhewitt commented Aug 7, 2021

This should be fixed in PyO3 0.14.2, which I'll put live tomorrow. PyO3/pyo3#1760

Will close again as fixed, please report back if 0.14.2 still doesn't work for you.

@Quogu
Copy link
Author

Quogu commented Aug 12, 2021

Hi @davidhewitt,

Just to let you know, I managed to test out this change, it took me longer than I was hoping so apologies for that, but it seems good! We get far further than we did the last time we attempted to upgrade, now it's just a case of fixing up the breaking changes between 0.12 and 0.14. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants