From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 29 08:30:24 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D205C16A41F for ; Fri, 29 Jul 2005 08:30:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DCAF43D49 for ; Fri, 29 Jul 2005 08:30:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6T8UOVs057521 for ; Fri, 29 Jul 2005 08:30:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6T8UOZf057519; Fri, 29 Jul 2005 08:30:24 GMT (envelope-from gnats) Date: Fri, 29 Jul 2005 08:30:24 GMT Message-Id: <200507290830.j6T8UOZf057519@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Matthias Andree Cc: Subject: Re: ports/80916: db43 does not build (with gcc4.0?) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Andree List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 08:30:24 -0000 The following reply was made to PR ports/80916; it has been noted by GNATS. From: Matthias Andree To: Volker Stolz Cc: Matthias Andree , bug-followup@FreeBSD.org, kutulu@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