pythonXX: explicitly link with pthread for semaphores