Public bug reported: == Summary ==
rdma-core fails to build on armhf with the following assembler errors: /tmp/ccBfz4JC.s:11110: Error: symbol `__fcntl_time64' is already defined /tmp/ccBfz4JC.s:12341: Error: symbol `sendfile64' is already defined Build log: https://launchpadlibrarian.net/862937268/buildlog_ubuntu- stonking-armhf.rdma- core_63.0-1ubuntu1~ppa1779876167+2176672_BUILDING.txt.gz == Root Cause == On armhf, glibc activates __USE_TIME64_REDIRECTS when _TIME_BITS=64 and __TIMESIZE=32 (armhf is the only Ubuntu architecture where time_t is natively 32-bit). This causes fcntl.h to define: #define fcntl64 __fcntl_time64 #define fcntl __fcntl_time64 Similarly sys/sendfile.h maps sendfile64 to __sendfile_time64. In librdmacm/preload.c, both fcntl() and fcntl64() function definitions are compiled when RDMA_PRELOAD_WRAP_LFS64=1. After macro expansion, both expand to __fcntl_time64(), producing two definitions of the same symbol in the same translation unit — causing the assembler error. The same applies to sendfile() and sendfile64() both expanding to __sendfile_time64(). The forward declarations at the top of preload.c are correctly guarded with !RDMA_PRELOAD_FCNTL64_IN_HEADER and !RDMA_PRELOAD_SENDFILE64_IN_HEADER, but the function *definitions* lower in the file lack these same guards. == Fix == Change the guards on the fcntl64 and sendfile64 function definitions from: #if RDMA_PRELOAD_WRAP_LFS64 to: #if RDMA_PRELOAD_WRAP_LFS64 && !RDMA_PRELOAD_FCNTL64_IN_HEADER #if RDMA_PRELOAD_WRAP_LFS64 && !RDMA_PRELOAD_SENDFILE64_IN_HEADER This matches the guards already used for the forward declarations. When RDMA_PRELOAD_FCNTL64_IN_HEADER=1 the symbol is provided inline/aliased by the header and cannot be interposed by LD_PRELOAD anyway, so skipping the wrapper definition is both correct and safe. == Affected versions == rdma-core 63.0-1ubuntu1 (stonking/armhf) ** Affects: rdma-core (Ubuntu) Importance: Undecided Status: New ** Tags: armhf ftbfs stonking -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2154575 Title: rdma-core FTBFS on armhf: duplicate symbol definitions for fcntl64/sendfile64 with _TIME_BITS=64 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/rdma-core/+bug/2154575/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
