By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 2962

Summary: tdeioslave fails to build with glibc >= 2.26 due to missing rpc/rpc.h
Product: TDE Reporter: Fabio Rossi <rossi.f>
Component: tdebaseAssignee: Slávek Banko <slavek.banko>
Status: RESOLVED FIXED    
Severity: normal CC: bugwatch, rossi.f, slavek.banko
Priority: P5    
Version: R14.0.x [Trinity]   
Hardware: amd64   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2885    
Attachments: tdebase-tdeioslaves-14.0.4-rpc.patch
tdebase-tdeioslaves-14.0.4-rpc-v2.patch

Description Fabio Rossi 2018-08-24 04:40:28 CDT
Created attachment 2892 [details]
tdebase-tdeioslaves-14.0.4-rpc.patch

I am using version 14.0.4 (I cannot find the sources for latest 14.0.5 but looking at GIT repository it seems the problem persists).

starting from glibc-2.26 SunRPC is deprecated (https://sourceware.org/ml/libc-announce/2017/msg00001.html) so many distribution don't ship anymore it. Please see for example Gentoo or Redhat plans:

https://wiki.gentoo.org/wiki/Glibc_2.26_porting_notes/RPC_implementation
https://fedoraproject.org/wiki/Changes/SunRPCRemoval

This cause a missing rpc/rpc.h error during building of tdeioslave in tdebase (NFS module). Now SunRPC library is provided by the external library libtirpc, I am attaching a patch here to face the issue. The patch first looks for rpc/rpc.h and in case the file is not available on the system it falls back to libtirpc. I think the references to the TIRPC_* variables can be added unconditionally to tdeioslave/nfs/CMakeLists.txt as they are empty in case rpc/rpc.h is provided by glibc.
Comment 1 Slávek Banko 2018-08-25 04:24:30 CDT
The patch looks very good. Yes, you are right, TIRPC_* variables can be added unconditionally, this is no problem.

First additional query: Is the rpcgen binar contained in libtirpc on Gentoo? It seems to be a good idea to add a check to see if the rpcgen bin is available.

Second additional query: For commit, I can report you as Signed-off-by, as a sign of your compliance with https://developercertificate.org/ ?
Comment 2 Fabio Rossi 2018-08-25 07:48:58 CDT
(In reply to Slávek Banko from comment #1)

> First additional query: Is the rpcgen binar contained in libtirpc on Gentoo?
> It seems to be a good idea to add a check to see if the rpcgen bin is
> available.

good point, actually the rpcgen binary is provided by another package. I have reworked the patch to check also for the binary moving the ConfigureChecks checks in the tdeioslave module, new patch here attached for review

> Second additional query: For commit, I can report you as Signed-off-by, as a
> sign of your compliance with https://developercertificate.org/ ?

yes, no problem
Comment 3 Fabio Rossi 2018-08-25 07:50:06 CDT
Created attachment 2893 [details]
tdebase-tdeioslaves-14.0.4-rpc-v2.patch
Comment 4 Slávek Banko 2018-08-25 21:17:37 CDT
Patch pushed to GIT in commits f6a5cd3e (master) and cb787d05 (r14.0.x).

Thank you for your contribution!