Skip to content

Fix recipes that do not link to their dependencies correctly#4878

Merged
hoodmane merged 1 commit intopyodide:mainfrom
ryanking13:fix-lib-deps
Jun 21, 2024
Merged

Fix recipes that do not link to their dependencies correctly#4878
hoodmane merged 1 commit intopyodide:mainfrom
ryanking13:fix-lib-deps

Conversation

@ryanking13
Copy link
Member

Description

Splitted off from #4876.

What this PR does is basically fixing incorrect shared library dependencies.

For instance, cryptography package depends on openssl, so the python extension should link to libssl.so.

However, before this PR, it was not linked correctly.

$  pyodide auditwheel show cryptography-42.0.5-cp312-cp312-pyodide_2024_0_wasm32.whl
{'cryptography\\hazmat\\bindings\\_rust.cpython-312-wasm32-emscripten.so': []}

After this PR, it is linked correctly.

$ pyodide auditwheel show cryptography-42.0.5-cp312-cp312-pyodide_2024_0_wasm32.whl
{
│   'cryptography\\hazmat\\bindings\\_rust.cpython-312-wasm32-emscripten.so': [
│   │   'libssl.so',
│   │   'libcrypto.so'
│   ]
}

Why do we need this change?

Because it is how shared libraries should work.

Why was this working before?

Because we loaded dependencies globally. openssl is loaded globally, so its symbols were visible to cryptography even if they are not linked. However, #4876 will change all library loading mechanism to local, so all shared libraries should now have correct dependencies to work.

package:
name: openssl
version: 1.1.1n
version: 1.1.1w
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not version update, the version number was incorrect.

Copy link
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

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

Thanks!

@hoodmane hoodmane merged commit 21625f0 into pyodide:main Jun 21, 2024
@hoodmane hoodmane deleted the fix-lib-deps branch June 21, 2024 19:56
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.

2 participants