Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 718138

Summary: net-libs/rpcsvc-proto calls cpp directly
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: base-system
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=870031
https://bugs.gentoo.org/show_bug.cgi?id=870061
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2020-04-19 08:57:28 UTC
This is an auto-filled bug because net-libs/rpcsvc-proto calls cpp directly.
The issue was originally discovered on amd64, but it may be reproducible on other arches as well.
Attached build log and emerge --info.

NOTE:
To reproduce this issue you may want to temporarily move the /usr/bin/cpp binary.
Comment 1 Agostino Sarubbo gentoo-dev 2020-04-19 08:57:34 UTC
Created attachment 633676 [details]
build.log

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-04-19 10:15:50 UTC
rpcgen calls /lib/cpp explicitly right from code:
  https://github.com/thkukuk/rpcsvc-proto/blob/master/rpcgen/rpc_main.c

The only thing it allows to override is the directory where 'cpp' resides.

    static const char *CPP = "/lib/cpp";
    static const char CPPFLAGS[] = "-C";

		case 'Y':
		  if (++i == argc)
		    return 0;
		  {
                    // ...
		    stpcpy (stpcpy (pathbuf,
				    argv[i]),
			    "/cpp");
		    CPP = pathbuf;
		    cppDefined = 1;
		    goto nextarg;
		  }

Using @CPP@ should work.
Comment 3 Larry the Git Cow gentoo-dev 2020-04-19 10:48:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b33a731e18e03cb49560abf4ac4b49011e27140e

commit b33a731e18e03cb49560abf4ac4b49011e27140e
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-04-19 10:47:18 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-04-19 10:47:59 +0000

    net-libs/rpcsvc-proto: for fallback use ${CHOST}-cpp, not 'cpp'
    
    Reported-by: Agostino Sarubbo
    Closes: https://bugs.gentoo.org/718138
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 net-libs/rpcsvc-proto/rpcsvc-proto-1.4.1-r1.ebuild | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2022-09-14 00:14:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b00ca1b5fec97e1e8bb837ca7c1ca34a32fb1ddc

commit b00ca1b5fec97e1e8bb837ca7c1ca34a32fb1ddc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-14 00:13:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-14 00:13:43 +0000

    net-libs/rpcsvc-proto: fix cpp call
    
    Bug: https://bugs.gentoo.org/718138
    Closes: https://bugs.gentoo.org/870031
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/rpcsvc-proto/rpcsvc-proto-1.4.3-r1.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)