Sorry about all my confusing questions but I guess the reason was that I did not choose the x11 and text distribution sets when I installed netbsd. I did not think that they were paramount for building x11 applications. But I guess I should have found that in the pkgsrc-guide.
Without those I got all sorts of errors