ports/80916: db43 does not build (with gcc4.0?)

Matthias Andree matthias.andree at gmx.de
Fri Jul 29 08:30:24 UTC 2005


The following reply was made to PR ports/80916; it has been noted by GNATS.

From: Matthias Andree <matthias.andree at gmx.de>
To: Volker Stolz <vs at FreeBSD.org>
Cc: Matthias Andree <matthias.andree at gmx.de>, bug-followup at FreeBSD.org,
	kutulu at kutulu.org
Subject: Re: ports/80916: db43 does not build (with gcc4.0?)
Date: Fri, 29 Jul 2005 10:27:03 +0200

 On Fri, 29 Jul 2005, Volker Stolz wrote:
 
 > > +post-configure:
 > > +	@${REINPLACE_CMD} -e '/^extern  void db_rpc_serverprog/ d;' ${WRKSRC}/db_server.h
 > > +
 > 
 > Shouldn't this better be a patch? I hate digging through REINPLACE_CMDs
 > on updates only to find out that they're basically doing nothing on
 > future updates. Patches fail more noisily and point you to the problem.
 
 The requisite is that this runs in post-configure or pre-build, as the
 files that need patching are generated as late as in do-configure, as
 Michael already stated in his original report. rpcgen -C is used to
 build - among others - db_server.h from ../rpc_server/db_server.x, and
 is called from ./configure.
 
 I have filed a support request with SleepyCat, in their first response,
 they said they found a bug in GCC 4.0.0 or 4.0.1 that triggered when
 building the Java API, which might also be affecting the RPC server.
 
 It might also be a bug with "rpcgen" on FreeBSD, as the SUSE Linux 9.3
 rpcgen does not create the conflicting db_server.h line, whereas its
 documentation warns:
 
    "Name clashes can occur when using program definitions, since the appar-
     ent  scoping  does  not  really apply.  Most of these can be avoided by
     giving unique names for programs, versions, procedures and types."
    (Linux rpcgen(1) manual page)
 
 If rpcgen generates an extern declaration for a static function, this
 looks like an rpcgen bug to me. So perhaps this should spawn a problem
 report for bin and one for ports/lang/gcc40 each.
 
 Also, GCC 4.0.1+ is apparently overzealous by making the error shown
 below an error, I see no requirement for this in "The C Programming
 Language", appendix A, and no other compiler I have access to, flags an
 error, even with "strict" settings. SleepyCat might have a point here.
 
 If someone knows a reference that requires a compiler diagnostic aka
 error, please follow up.
 
 ### db_server.h ###
 
 extern  void db_rpc_serverprog_4003(struct svc_req *rqstp, register SVCXPRT *transp);
 
 ### db_server_svc.c ###
 
 static void
 db_rpc_serverprog_4003(struct svc_req *rqstp, register SVCXPRT *transp)
 {
 ...
 
 ### GCC errors ###
 
 db_server_svc.c:30: error: static declaration of 'db_rpc_serverprog_4003' follows non-static declaration
 db_server.h:1013: error: previous declaration of 'db_rpc_serverprog_4003' was here
 
 -- 
 Matthias Andree



More information about the freebsd-ports-bugs mailing list