./nptl/pthread_kill.c: No such file or directory

I’m developing an app and sometimes, when I compile with Debug and run the program with gdb, I get this error:

./nptl/pthread_kill.c: No such file or directory

Searching this forum doesn’t give any results, so I started a new topic. Anyone know how this can be solved?
Here’s the complete output of gdb:

Thread 1 "livelily_debug" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737280949696) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.

I have exactly the same problem. My code works when I manually compile with gcc, but when using automake my program core dumps:

Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=274931665280) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.

What do you mean “manually compile with gcc” and “using automake”? What’s your OS? I’m on Linux and I compile with make. Do you have any suggestion as to how to compile?