Skip to content

cmake error undefined reference to `getpeereid' #13

@poudink

Description

@poudink

Trying to get this working, but I get this error no matter what I try (from the CMakeError.log):

Change Dir: /home/poudink/kgtk/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_149f5/fast && /usr/bin/make  -f CMakeFiles/cmTC_149f5.dir/build.make CMakeFiles/cmTC_149f5.dir/build
make[1]: Entering directory '/home/poudink/kgtk/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_149f5.dir/CheckFunctionExists.c.o
/usr/bin/cc -D_GNU_SOURCE -D_LARGEFILE64_SOURCE  -fno-common -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wmissing-format-attribute -Wwrite-strings -Werror=implicit-function-declaration -DCHECK_FUNCTION_EXISTS=getpeereid -o CMakeFiles/cmTC_149f5.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_149f5
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_149f5.dir/link.txt --verbose=1
/usr/bin/cc  -fno-common -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wmissing-format-attribute -Wwrite-strings -Werror=implicit-function-declaration -DCHECK_FUNCTION_EXISTS=getpeereid -rdynamic CMakeFiles/cmTC_149f5.dir/CheckFunctionExists.c.o -o cmTC_149f5 
/usr/bin/ld: CMakeFiles/cmTC_149f5.dir/CheckFunctionExists.c.o: in function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `getpeereid'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_149f5.dir/build.make:99: cmTC_149f5] Error 1
make[1]: Leaving directory '/home/poudink/kgtk/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_149f5/fast] Error 2```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions