Skip to content

internal: [codex] try fix mingw libname#6164

Open
chirizxc wants to merge 14 commits into
PyO3:mainfrom
chirizxc:fix-mingw-libname
Open

internal: [codex] try fix mingw libname#6164
chirizxc wants to merge 14 commits into
PyO3:mainfrom
chirizxc:fix-mingw-libname

Conversation

@chirizxc

Copy link
Copy Markdown
Contributor

No description provided.

ognevny and others added 2 commits June 26, 2026 10:13
usually mingw version of python are shipped with `lib` prefix, so we need to add it for proper
linking
@chirizxc

Copy link
Copy Markdown
Contributor Author

@ognevny can you try in this Git branch?

@chirizxc chirizxc changed the title [codex] try fix mingw libname internal: [codex] try fix mingw libname Jun 26, 2026
@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

IIUC you just let the agent fix the things? I'll try to cherry-pick some good changes if I find them

@chirizxc

Copy link
Copy Markdown
Contributor Author

IIUC you just let the agent fix the things?

yes

@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

this time ai was smarter than me. I just forgot about dot separating major and minor version! that could be an issue...

@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

@chirizxc

Copy link
Copy Markdown
Contributor Author

maybe this?

@chirizxc

Copy link
Copy Markdown
Contributor Author

сodex went a bit overboard, but I hope it will help clarify the problem itself

Comment thread pyo3-ffi/build.rs Outdated
@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

it worked!

/ucrt64/lib/python3.14/site-packages/cryptography/hazmat/bindings/_rust.pyd:
  	libpython3.dll => D:\M\msys64\ucrt64\bin\libpython3.dll (0x00000211316c0000)
  	libcrypto-3-x64.dll => D:\M\msys64\ucrt64\bin\libcrypto-3-x64.dll (0x0000021132040000)
  	libssl-3-x64.dll => D:\M\msys64\ucrt64\bin\libssl-3-x64.dll (0x00000211316c0000)

but the latest change seem to be a workaround... anyway I'll give up with my branch

@chirizxc

Copy link
Copy Markdown
Contributor Author

it worked!

/ucrt64/lib/python3.14/site-packages/cryptography/hazmat/bindings/_rust.pyd:
  	libpython3.dll => D:\M\msys64\ucrt64\bin\libpython3.dll (0x00000211316c0000)
  	libcrypto-3-x64.dll => D:\M\msys64\ucrt64\bin\libcrypto-3-x64.dll (0x0000021132040000)
  	libssl-3-x64.dll => D:\M\msys64\ucrt64\bin\libssl-3-x64.dll (0x00000211316c0000)

but the latest change seem to be a workaround... anyway I'll give up with my branch

You can add fix to your branch; the main issue is that we need to test these builds in CI

Comment thread pyo3-build-config/src/lib.rs Outdated
@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

You can add fix to your branch; the main issue is that we need to test these builds in CI

I closed my PR. anyway my was different only in a kind of style, so I'll let maintainers review your change

Comment thread pyo3-ffi/src/impl_/macros.rs Outdated
Comment thread pyo3-build-config/src/lib.rs Outdated
Comment thread pyo3-ffi/src/impl_/macros.rs Outdated
@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

oh I didn't see you wrote comments on the same lines 😅

@chirizxc chirizxc closed this Jun 26, 2026
@chirizxc chirizxc reopened this Jun 26, 2026
Comment thread noxfile.py Outdated
@chirizxc

Copy link
Copy Markdown
Contributor Author

@ognevny сould you take another look? I'm not sure about some of comments, since I haven't worked with MINGW

Comment thread pyo3-ffi/build.rs Outdated
@ognevny

ognevny commented Jun 26, 2026

Copy link
Copy Markdown

fine with the comments, but you seem to duplicate them in one place

Comment thread pyo3-ffi/build.rs Outdated
@chirizxc chirizxc closed this Jun 26, 2026
@chirizxc chirizxc reopened this Jun 26, 2026
@chirizxc

Copy link
Copy Markdown
Contributor Author

I saw this PR, If anyone would like to help add MSYS2 to CI, please submit a PR to branch linked in this PR

Comment thread pyo3-ffi/build.rs Outdated
Comment on lines +228 to +230
// GNU-family Windows targets still need an import library for any non-Rust
// objects participating in the final link, such as CFFI-generated C code.
println!("cargo:rustc-link-lib={import_lib_name}");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some test / CI evidence to this?

@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.99%

❌ 1 regressed benchmark
✅ 139 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_empty_class_init 14.3 µs 16.3 µs -11.99%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing chirizxc:fix-mingw-libname (95f27c3) with main (87dc97c)

Open in CodSpeed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants