Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.7: build fails with USE_GTEST=ON #1135

Open
kloczek opened this issue May 19, 2024 · 1 comment
Open

5.7: build fails with USE_GTEST=ON #1135

kloczek opened this issue May 19, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented May 19, 2024

I'm using gtest 1.14.0.
Here is cmake setup (cmake -L output)

-- Cache values
ALLOCATOR:STRING=jemalloc
BTRFSUTIL_LIB:FILEPATH=BTRFSUTIL_LIB-NOTFOUND
Boost_FILESYSTEM_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_filesystem.so.1.84.0
Boost_INCLUDE_DIR:PATH=/usr/include
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:STRING=/usr/lib64/libboost_program_options.so.1.84.0
CAPS:FILEPATH=/usr/lib64/libcap.so
CEPHFS_LIBRARY:FILEPATH=/usr/lib64/libcephfs.so
CEPHFS_POSIX_ACL:STRING=DEFAULT_ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
COVERAGE:BOOL=OFF
DEBUG_MDCACHE:BOOL=OFF
DEBUG_SAL:BOOL=OFF
DEBUG_SYMS:BOOL=OFF
DISTNAME_HAS_GIT_DATA:BOOL=OFF
ENABLE_ERROR_INJECTION:BOOL=OFF
ENABLE_LOCKTRACE:BOOL=OFF
ENABLE_RFC_ACL:BOOL=OFF
ENABLE_VFS_DEBUG_ACL:BOOL=OFF
ENABLE_VFS_POSIX_ACL:BOOL=ON
ENFORCE_GCC:BOOL=OFF
GLUSTER_PREFIX:PATH=/usr
GSH_CAN_HOST_LOCAL_FS:BOOL=ON
GTEST:FILEPATH=/usr/lib64/libgtest.so
GTEST_MAIN:FILEPATH=/usr/lib64/libgtest_main.so
KRB5_C_CONFIG:FILEPATH=/usr/bin/krb5-config
LEX_PROGRAM:FILEPATH=/usr/bin/lttng
LIBACL_LIBRARY:FILEPATH=/usr/lib64/libacl.so
LIBBLKID:FILEPATH=/usr/lib64/libblkid.so
LIBURCU_INC:PATH=/usr/include
LIBURCU_LIB:FILEPATH=/usr/lib64/liburcu-bp.so
LIBUUID:FILEPATH=/usr/lib64/libuuid.so
LIB_INSTALL_DIR:PATH=/usr/lib64
LIZARDFS_CLIENT_LIB:FILEPATH=LIZARDFS_CLIENT_LIB-NOTFOUND
LTTNG_CTL_INCLUDE_DIR:PATH=/usr/include
LTTNG_CTL_LIBRARY:FILEPATH=/usr/lib64/liblttng-ctl.so
LTTNG_CTL_LIBRARY_DIR:PATH=/usr/lib64
LTTNG_EXECUTABLE:FILEPATH=/bin/lttng
LTTNG_UST_LIBRARY:FILEPATH=/usr/lib64/liblttng-ust.so
NFSIDMAP_INCLUDE_DIR:PATH=/usr/include
NFSIDMAP_LIBRARY:FILEPATH=/usr/lib64/libnfsidmap.so
NTIRPC_LIBRARY_DIR:PATH=/usr/lib64
NTIRPC_LTTNG:FILEPATH=NTIRPC_LTTNG-NOTFOUND
NTIRPC_TRACEPOINTS:FILEPATH=NTIRPC_TRACEPOINTS-NOTFOUND
PROXYV4_HANDLE_MAPPING:STRING=DEFAULT_OFF
PYUIC:FILEPATH=PYUIC-NOTFOUND
RADOS_LIBRARY:FILEPATH=/usr/lib64/librados.so
RADOS_URLS:STRING=ON
RPCBIND:BOOL=ON
RUNTIMEDIR:PATH=/var/run/ganesha
SANITIZE_ADDRESS:BOOL=OFF
SANITIZE_LINK_STATIC:BOOL=OFF
SANITIZE_MEMORY:BOOL=OFF
SANITIZE_THREAD:BOOL=OFF
SANITIZE_UNDEFINED:BOOL=OFF
SPHINX_BUILD:FILEPATH=/usr/bin/sphinx-build
SYSCONFDIR:PATH=/etc
SYSSTATEDIR:PATH=/var
TIRPC_EPOLL:BOOL=ON
USE_9P:BOOL=OFF
USE_9P_RDMA:BOOL=OFF
USE_ACL_MAPPING:BOOL=ON
USE_ADMIN_TOOLS:STRING=ON
USE_CAPS:STRING=DEFAULT_ON
USE_CB_SIMULATOR:BOOL=OFF
USE_CUNIT:STRING=ON
USE_DBUS:STRING=ON
USE_EFENCE:STRING=DEFAULT_OFF
USE_FSAL_CEPH:STRING=ON
USE_FSAL_GLUSTER:STRING=ON
USE_FSAL_GPFS:STRING=ON
USE_FSAL_KVSFS:STRING=OFF
USE_FSAL_LIZARDFS:STRING=DEFAULT_ON
USE_FSAL_LUSTRE:STRING=OFF
USE_FSAL_MEM:STRING=ON
USE_FSAL_NULL:STRING=ON
USE_FSAL_PROXY_V3:STRING=DEFAULT_ON
USE_FSAL_PROXY_V4:STRING=ON
USE_FSAL_RGW:STRING=OFF
USE_FSAL_VFS:STRING=ON
USE_FSAL_XFS:STRING=DEFAULT_ON
USE_GSS:BOOL=ON
USE_GTEST:STRING=ON
USE_GUI_ADMIN_TOOLS:STRING=DEFAULT_ON
USE_LEGACY_PYTHON_INSTALL:STRING=OFF
USE_LTTNG:STRING=OFF
USE_MAN_PAGE:STRING=ON
USE_MONITORING:STRING=ON
USE_NFS3:BOOL=ON
USE_NFSACL3:STRING=ON
USE_NFSIDMAP:STRING=DEFAULT_ON
USE_NFS_RDMA:BOOL=OFF
USE_NLM:BOOL=ON
USE_RADOS_RECOV:STRING=ON
USE_RQUOTA:BOOL=ON
USE_SYSTEM_NTIRPC:BOOL=ON
USE_TOOL_MULTILOCK:BOOL=OFF
USE_VSOCK:BOOL=OFF
UUID_LIBRARY:FILEPATH=/usr/lib64/libuuid.so
WBCLIENT_INCLUDE_DIR:PATH=/usr/include/samba-4.0
WBCLIENT_LIBRARIES:FILEPATH=/usr/lib64/libwbclient.so
_MSPAC_SUPPORT:STRING=ON
_NO_TCP_REGISTER:BOOL=OFF
_USE_9P:BOOL=OFF
_USE_9P_RDMA:BOOL=OFF
_USE_NFS_RDMA:BOOL=OFF
_VALGRIND_MEMCHECK:BOOL=OFF
civetweb_DIR:PATH=/usr/lib64/cmake/civetweb
prometheus-cpp_DIR:PATH=/usr/lib64/cmake/prometheus-cpp

and build fails with

make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/x86_64-redhat-linux-gnu'
[ 82%] Building CXX object gtest/CMakeFiles/test_ci_hash_dist1.dir/test_ci_hash_dist1.cc.o
cd /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/x86_64-redhat-linux-gnu/gtest && /usr/bin/g++ -DHAS_DOFF -D_GNU_SOURCE=1 -I/usr/include/uuid -I/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/x86_64-redhat-linux-gnu/include -I/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include -I/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/os/linux -I/include -I/usr/include/ntirpc -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -std=gnu++14 -fpermissive -Wnon-virtual-dtor -Wno-invalid-offsetof -O2 -g -DNDEBUG -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -mtls-dialect=gnu2 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -std=gnu++14 -fpermissive -Wnon-virtual-dtor -Wno-invalid-offsetof -I/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest -I/usr/include -fno-strict-aliasing -MD -MT gtest/CMakeFiles/test_ci_hash_dist1.dir/test_ci_hash_dist1.cc.o -MF CMakeFiles/test_ci_hash_dist1.dir/test_ci_hash_dist1.cc.o.d -o CMakeFiles/test_ci_hash_dist1.dir/test_ci_hash_dist1.cc.o -c /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc
In file included from /usr/include/urcu/call-rcu.h:33,
                 from /usr/include/urcu/urcu-bp.h:197,
                 from /usr/include/urcu-bp.h:2,
                 from /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/fsal_api.h:44,
                 from /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/fsal.h:63,
                 from /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/export_mgr.h:43,
                 from /home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:43:
/usr/include/urcu/wfcqueue.h:511:35: error: conflicting declaration of C function ‘cds_wfcq_head_ptr_t cds_wfcq_head_cast_cpp(cds_wfcq_head*)’
  511 | static inline cds_wfcq_head_ptr_t cds_wfcq_head_cast_cpp(struct cds_wfcq_head *head)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/urcu/wfcqueue.h:505:35: note: previous declaration ‘cds_wfcq_head_ptr_t cds_wfcq_head_cast_cpp(__cds_wfcq_head*)’
  505 | static inline cds_wfcq_head_ptr_t cds_wfcq_head_cast_cpp(struct __cds_wfcq_head *head)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/urcu/wfcqueue.h:517:1: error: template with C linkage
  517 | template<typename T> static inline bool cds_wfcq_empty(T head,
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:523:1: error: template with C linkage
  523 | template<typename T> static inline bool cds_wfcq_enqueue(T head,
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:530:1: error: template with C linkage
  530 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_dequeue_blocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:536:1: error: template with C linkage
  536 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_dequeue_with_state_blocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:543:1: error: template with C linkage
  543 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_dequeue_nonblocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:549:1: error: template with C linkage
  549 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_dequeue_with_state_nonblocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:556:1: error: template with C linkage
  556 | template<typename T, typename U> static inline enum cds_wfcq_ret __cds_wfcq_splice_blocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:568:1: error: template with C linkage
  568 | template<typename T, typename U> static inline enum cds_wfcq_ret __cds_wfcq_splice_nonblocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:580:1: error: template with C linkage
  580 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_first_blocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:586:1: error: template with C linkage
  586 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_first_nonblocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:592:1: error: template with C linkage
  592 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_next_blocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/usr/include/urcu/wfcqueue.h:600:1: error: template with C linkage
  600 | template<typename T> static inline struct cds_wfcq_node *__cds_wfcq_next_nonblocking(
      | ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/gtest/test_ci_hash_dist1.cc:38:1: note: ‘extern "C"’ linkage started here
   38 | extern "C" {
      | ^~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/fsal_api.h: In function ‘void export_root_object_put(fsal_obj_handle*)’:
/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/include/fsal_api.h:3156:17: warning: unused variable ‘ref’ [-Wunused-variable]
 3156 |         int32_t ref = atomic_dec_int32_t (&obj_hdl->exp_refcnt);
      |                 ^~~
make[2]: *** [gtest/CMakeFiles/test_ci_hash_dist1.dir/build.make:79: gtest/CMakeFiles/test_ci_hash_dist1.dir/test_ci_hash_dist1.cc.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:2323: gtest/CMakeFiles/test_ci_hash_dist1.dir/all] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/nfs-ganesha-5.7/src/x86_64-redhat-linux-gnu'
@dang
Copy link
Contributor

dang commented May 20, 2024

https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1194724

Should be merged this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants