Can you create "dummy" libraries for -lpthread, -lrt, and -ldl?

The version of glibc you use in the latest version of OpenMandriva integrates pthread, dl, and rt libraries, but a lot of programs will want to continue supporting older versions of glibc and will therefore continue linking against these libraries.

Red Hat seems to have a solution that enables one to avoid linker errors when programs try to link against these libraries with newer glibc.

While it is technically possible to deal with this issue by conditionally removing all references to -lpthread and company in a patch for each package, it would probably be easier for both your package maintainers and upstream developers targeting OpenMandriva for you to have your own version of Red Hat’s solution here.

It is just a suggestion… this can be worked around, but it would be appreciated if you could make this a little easier, because I’m sure the package I was trying to build isn’t the only one that has a ton of -lpthread and -ldl directrives that will now throw bizarre linker errors a lot of developers will never have seen before due to some major distros having a workaround.

Thanks for contacting us.

Something similar is what we have been doing for a while. The changes were made to the Cooker release, with the Rolling release and the stable Lx 5.0 coming there as well (soon).

and

and

If I am wrong in something, let @bero correct me, he is responsible for glibc and these changes.

1 Like

Ah, I’m glad to hear you guys are already on that issue and have a fix in the works. Thank you very much. :slight_smile:

I actually noticed that the Cooker had a workaround right after I posted this thread… I searched the forums, but didn’t think to look on GitHub for some reason. Probably because I was thinking of it as a feature request rather than an actual bug, due to glibc integrating those libs and it technically being “wrong” to link against them now.

1 Like