I ran into this problem a couple of weeks ago and just now had time to dig into it a little more, I found a thread that provided this solution:

ar -rc /usr/lib/libpthread.a
to create an archive file that is missing.

Also, for serialport specifically it looks like someone has tackled that: