Conversation
Notices
-
Embed this notice
@byte t-they export *the exact same* symbol? then the linker would just use the first one it sees iirc
but like, those libraries are straight up broken, my condolences
- Haelwenn /элвэн/ :triskell: likes this.
-
Embed this notice
@navi I have a funy problem - several libraries export their globally defined new/delete or alloc/free operators. And then during the runtime some application that uses multiple libraries like that loads them, and can allocate memory with operator from one library, but then free using operator from another one. Because of linker fuckery. So i try to fix it all with scripts that unexport linker symbols and by loading libs with RTLD_DEEPBIND.
It's all fucked beyond my imagination
-
Embed this notice
@byte for old libraries, nothing you can do
for new ones, use a decent build system like meson and you have most of the work done for that (tho you still need to, well, use system apis that exist on that platform, but this is a bit of a given on any lang)
-
Embed this notice
@navi I do :blobfoxwoozy:
it's what got me started with rust. fuck library packaging, especially when you need to do it on 5+ platforms
-
Embed this notice
@byte wait huh
i didn't need to do that at all yet
-
Embed this notice
C/C++ is fun until you need to make a dozen of linker scripts to fix undefined behavior in third-party libs and your own legacy code