Skip to content

Fail to build on Fedora27 #9

@Striver00

Description

@Striver00

Hi ,
When I build the .so file from the source package, got below error:

-- Configuring incomplete, errors occurred!
See also "/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeOutput.log".
See also "/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeError.log".
failed to configure the project

file CMakeFiles/CMakeError.log:

Determining if the function dladdr exists failed with the following output:
Change Dir: /home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_3f2f1/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_3f2f1.dir/build.make CMakeFiles/cmTC_3f2f1.dir/build
gmake[1]: вход в каталог «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_3f2f1.dir/CheckFunctionExists.c.o
/usr/bin/gcc   -DCHECK_FUNCTION_EXISTS=dladdr   -o CMakeFiles/cmTC_3f2f1.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_3f2f1
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3f2f1.dir/link.txt --verbose=1
/usr/bin/gcc  -DCHECK_FUNCTION_EXISTS=dladdr    -rdynamic CMakeFiles/cmTC_3f2f1.dir/CheckFunctionExists.c.o  -o cmTC_3f2f1 
CMakeFiles/cmTC_3f2f1.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x10): undefined reference to `dladdr'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
gmake[1]: *** [CMakeFiles/cmTC_3f2f1.dir/build.make:98: cmTC_3f2f1] Ошибка 1
gmake[1]: выход из каталога «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
gmake: *** [Makefile:126: cmTC_3f2f1/fast] Ошибка 2


Determining if the pthread_create exist failed with the following output:
Change Dir: /home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_c587c/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_c587c.dir/build.make CMakeFiles/cmTC_c587c.dir/build
gmake[1]: вход в каталог «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_c587c.dir/CheckSymbolExists.c.o
/usr/bin/gcc   -fno-strict-aliasing    -o CMakeFiles/cmTC_c587c.dir/CheckSymbolExists.c.o   -c /home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_c587c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c587c.dir/link.txt --verbose=1
/usr/bin/gcc  -fno-strict-aliasing     -rdynamic CMakeFiles/cmTC_c587c.dir/CheckSymbolExists.c.o  -o cmTC_c587c 
CMakeFiles/cmTC_c587c.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
gmake[1]: *** [CMakeFiles/cmTC_c587c.dir/build.make:98: cmTC_c587c] Ошибка 1
gmake[1]: выход из каталога «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
gmake: *** [Makefile:126: cmTC_c587c/fast] Ошибка 2

File /home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_7cdc3/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_7cdc3.dir/build.make CMakeFiles/cmTC_7cdc3.dir/build
gmake[1]: вход в каталог «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_7cdc3.dir/CheckFunctionExists.c.o
/usr/bin/gcc   -fno-strict-aliasing -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_7cdc3.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_7cdc3
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7cdc3.dir/link.txt --verbose=1
/usr/bin/gcc  -fno-strict-aliasing -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_7cdc3.dir/CheckFunctionExists.c.o  -o cmTC_7cdc3 -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
gmake[1]: *** [CMakeFiles/cmTC_7cdc3.dir/build.make:98: cmTC_7cdc3] Ошибка 1
gmake[1]: выход из каталога «/home/user1/libhdfs3-downstream-master/libhdfs3/build/CMakeFiles/CMakeTmp»
gmake: *** [Makefile:126: cmTC_7cdc3/fast] Ошибка 2

please help to solve, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions