Source: nfstrace
Version: 0.4.3.2+git20200805+b220d04-1
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear maintainer,

The glibc SunRPC implementation has been marked obsolete for some time.
It has been removed upstream from glibc 2.32, and it got disabled in the
recent glibc uploads. The TI RPC implementation should be used instead.

For this reason nfstrace now fails to build from source. You will find
attached a patch to switch to the TI RPC implementation, fixing the
FTBFS.

Regards,
Aurelien
--- nfstrace-0.4.3.2+git20200805+b220d04/debian/control
+++ nfstrace-0.4.3.2+git20200805+b220d04/debian/control
@@ -10,7 +10,9 @@
     libgtest-dev,
     google-mock,
     libncurses5-dev,
-    libjson-c-dev
+    libjson-c-dev,
+    libtirpc-dev,
+    pkg-config
 Build-Depends-Indep:
     doxygen,
     graphviz,
--- nfstrace-0.4.3.2+git20200805+b220d04/debian/patches/series
+++ nfstrace-0.4.3.2+git20200805+b220d04/debian/patches/series
@@ -0,0 +1 @@
+tirpc.patch
--- nfstrace-0.4.3.2+git20200805+b220d04/debian/patches/tirpc.patch
+++ nfstrace-0.4.3.2+git20200805+b220d04/debian/patches/tirpc.patch
@@ -0,0 +1,30 @@
+Build with TI RPC instead of GNU libc RPC
+
+--- nfstrace-0.4.3.2+git20200805+b220d04.orig/CMakeLists.txt
++++ nfstrace-0.4.3.2+git20200805+b220d04/CMakeLists.txt
+@@ -29,6 +29,9 @@ if ("${PCAP_LIBRARY}" STREQUAL "PCAP_LIB
+     message (FATAL_ERROR "Could NOT find PCAP")
+ endif ()
+ 
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(TIRPC REQUIRED libtirpc)
++
+ # build application 
============================================================
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pedantic -Wall -Werror 
-Wextra -Wno-invalid-offsetof -Wno-error=address-of-packed-member -fPIC 
-fvisibility=hidden")
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic")
+@@ -56,13 +59,14 @@ else ()
+     string (TIMESTAMP COMPILATION_DATE "%Y-%m-%d")
+ endif ()
+ 
+-include_directories (src)
++include_directories (src ${TIRPC_INCLUDE_DIRS})
+ 
+ # nfstrace executable 
==========================================================
+ file (GLOB_RECURSE SRCS "src/*.cpp")
+ set (LIBS ${CMAKE_DL_LIBS}          # libdl with dlopen()
+           ${CMAKE_THREAD_LIBS_INIT} # libpthread
+           ${PCAP_LIBRARY}           # libpcap
++          ${TIRPC_LIBRARIES}        # libtirpc
+           )
+ 
+ configure_file (docs/nfstrace.8.in              
${PROJECT_SOURCE_DIR}/docs/nfstrace.8)

Reply via email to