just needed to compile with -lrt, now it's working
test/countBy appears to be working now