systemtap 1.8 build fails
Mark Wielaard
mjw@redhat.com
Wed Jun 20 10:50:00 GMT 2012
On Tue, 2012-06-19 at 22:50 +0200, Jiri Slaby wrote:
> I have to add the pthread lib to be linked with stap_serverd to be
> able to build systemtap. Like in this diff:
> https://build.opensuse.org/package/view_file?file=link-with-pthread.patch&package=systemtap&project=devel%3Atools&rev=257b076be8a17310ddf6787741dae3c3
>
> Otherwise a build error occurs:
> CXXLD stap-serverd
> .../ld: stap_serverd-stap-serverd.o: undefined reference to symbol
> 'sem_getvalue@@GLIBC_2.2.5'
> .../ld: note: 'sem_getvalue@@GLIBC_2.2.5' is defined in DSO
> /lib64/libpthread.so.0 so try adding it to the linker command line
> /lib64/libpthread.so.0: could not read symbols: Invalid operation
> collect2: error: ld returned 1 exit status
>
> This is because sem_getvalue needs -lpthread, according to the man page.
You are right. It is better to add that explicitly since we are using
sem_getvalue explicitly in our own code. But normally nss_LIBS will
include that flag. Did something change so that linking against nss
doesn't include that anymore? If nss isn't available stap-serverd
shouldn't be build.
I added the following. Hopefully similar to what you did (the above URL
doesn't work for me).
Thanks,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread.patch
Type: text/x-patch
Size: 1842 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20120620/6f44ab8a/attachment.bin>
More information about the Systemtap
mailing list