runtime library [libpthread.so] in /usr/lib64 may be hidden by files in:
/lib64

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:29 (add_executable):
Cannot generate a safe runtime search path for target myloader because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libpthread.so] in /usr/lib64 may be hidden by files in:
/lib64

I was having a similar issue but with libz.so
The problem was that for a reason unkown, the lib exists like a symbolic link in /usr/lib64 but was linked to an incorrect location (an inexistent libz.so.1.2.3)
I just remove the bad ln and create a new (and correct one)