linking against pthread for a shared library

Rong-en Fan grafan at
Thu Jul 12 16:34:17 UTC 2007

miwi@ and I are working on solving
an issue with devel/upnp and misc/ushare
problem. Essentially, the problem is that
devel/upnp builds a shared library called which uses threading library.
misc/ushare is a consumer of that library.

On 7.x system, if you ldd on
(this is i386)

./work/libupnp-1.6.0/threadutil/.libs/ => /usr/lib/ (0x2817d000) => /lib/ (0x2807e000) => /lib/ (0x2818d000)

But on 6.x and 5.x, you only get (this is amd64)

./work/libupnp-1.6.0/threadutil/.libs/ => /usr/lib/ (0x800941000)

So, one needs to pass -pthread when using In my understanding, the behavior
on 7.x is more correct (or reasonable).

Any ideas how to solve this problem?

Rong-En Fan

More information about the freebsd-ports mailing list