> as you hint, add a rule that every program in pkgsrc that can
> possibly dlopen anything be linked with pthreads.
This has happened a long time ago, hasn't it?
I looked in doc/pkgsrc.txt and didn't find any such guidance.
In the current PG case, it seems that perhaps only the server should
be linked threaded, and not the client libraries. That might ease
the ap-php pain.