]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: link ceph-fuse against librt 31531/head
authorwy7980 <wy7980@sina.com>
Mon, 11 Nov 2019 13:01:52 +0000 (08:01 -0500)
committerwy7980 <wy7980@sina.com>
Mon, 11 Nov 2019 13:08:35 +0000 (08:08 -0500)
ceph-fuse: fix error of building ceph-fuse
fix linking error of without -lrt for ceph-fuse.

error message:
```
[100%] Building CXX object src/CMakeFiles/ceph-fuse.dir/ceph_fuse.cc.o
[100%] Building CXX object src/CMakeFiles/ceph-fuse.dir/client/fuse_ll.cc.o
[100%] Linking CXX executable ../bin/ceph-fuse
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: CMakeFiles/ceph-fuse.dir/ceph_fuse.cc.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
//lib64/librt.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [bin/ceph-fuse] Error 1
make[2]: *** [src/CMakeFiles/ceph-fuse.dir/all] Error 2
make[1]: *** [src/CMakeFiles/ceph-fuse.dir/rule] Error 2
make: *** [ceph-fuse] Error 2
```

Signed-off-by: Yong Wang <wy7980@sina.com>
src/CMakeLists.txt

index 8109e3af0f3292a24563147dd770e8edc8ba6f56..46742dc306cd4fdc3711d2b331030e9c2fec49f1 100644 (file)
@@ -689,7 +689,7 @@ if(WITH_FUSE)
     client/fuse_ll.cc)
   add_executable(ceph-fuse ${ceph_fuse_srcs})
   target_link_libraries(ceph-fuse ${FUSE_LIBRARIES}
-    ${GSSAPI_LIBRARIES} client ceph-common global-static)
+    ${GSSAPI_LIBRARIES} client ceph-common global-static ${EXTRALIBS})
   set_target_properties(ceph-fuse PROPERTIES
     COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}"
     POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE})