How do I create libpthread.so from source?

I need an unoccupied version of libpthread.so for debugging. How can I compile it from source? The host is Linux 2.6.

+2


a source to share


1 answer


If you are using an RPM based system, use rpm -qf .../libpthread.so

to find out which package is installed in the file (if that does not work, the .so file is probably a link, then run the command on the link points).

If you have a package name, find "source package". How this works depends on the distribution you are using. For openSUSE, you have to add the source repository using Yast. After that, you can install the source package which will give you some entries in the section /usr/src/packages

. To create a package, go to /usr/src/packages/SPECS

and run rpmbuild

with a file pthread.spec

as a parameter.



When the build is complete, edit the file .spec

and modify it so it doesn't break symbols.

Alternatively, see if the package is there *-debug

(replace "*" with the package name) and install it. It should contain the symbolic version of the library.

0


a source







All Articles