To reproduce on Ubuntu 16.04, I had to add -Wl,--no-as-needed before -lpthread (to make sure the resulting binary really links libpthread.so.0).
To reproduce on Ubuntu 16.04, I had to add -Wl,--no-as-needed before -lpthread (to make sure the resulting binary really links libpthread.so.0).