Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does this not fall over in the circumstance of linking against a C library (not specifically a Python extension) as many Python libraries do?

For e.g. I write “library” of which v1 depends on somelib.so.1.0.0 and v2 depends on somelib.so.2.0.0

If somelib has some symbols clashing in the names this can cause real problems!



They don’t show up in the global symbol namespace usually so it’s fine. It’s only an issue for some libraries that load globally so that one library can reference another c library.


Python dlopens binary wheels with RTLD_LOCAL on Linux, and I assume it does the equivalent on Windows.

There were issues relatively recently with -ffast-math binary wheels in Python packages, as some versions of gcc generates a global constructor with that option that messes with the floating point environment, affecting the whole process regardless of symbol namespaces. It's mostly just an insanity of this option and gcc behavior though.


Windows has a different design where the symbols are not merged, the .dll name is part of the resolution, so you can have 2 different .dll export the same symbol.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: