From owner-freebsd-gnome@FreeBSD.ORG Wed Sep 24 23:30:03 2008 Return-Path: Delivered-To: gnome@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4D1E1065699 for ; Wed, 24 Sep 2008 23:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8398FC0A for ; Wed, 24 Sep 2008 23:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8ONU3BI066572 for ; Wed, 24 Sep 2008 23:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8ONU3pB066569; Wed, 24 Sep 2008 23:30:03 GMT (envelope-from gnats) Date: Wed, 24 Sep 2008 23:30:03 GMT Message-Id: <200809242330.m8ONU3pB066569@freefall.freebsd.org> To: gnome@FreeBSD.org From: Jeremy Chadwick Cc: Subject: Re: ports/127297: Redefinition warnings in print/freetype2 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jeremy Chadwick List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2008 23:30:03 -0000 The following reply was made to PR ports/127297; it has been noted by GNATS. From: Jeremy Chadwick To: Jeremy Messenger Cc: bug-followup@freebsd.org Subject: Re: ports/127297: Redefinition warnings in print/freetype2 Date: Wed, 24 Sep 2008 16:29:11 -0700 On Wed, Sep 24, 2008 at 05:18:14PM -0500, Jeremy Messenger wrote: > On Wed, 24 Sep 2008 17:07:20 -0500, Jeremy Chadwick > wrote: > >> On Wed, Sep 24, 2008 at 11:58:26AM -0500, Jeremy Messenger wrote: >>>> The pre-patch section comments out #define >>>> TT_CONFIG_OPTION_BYTECODE_INTERPRETER in >>>> include/freetype/config/ftoption.h (when >>>> WITHOUT_TTF_BYTECODE_ENABLED is >>>> not defined by the user), but then earlier in the Makefile, it >>>> re-enables it: >>> >>> I am not seeing any bug. When the WITHOUT_TTF_BYTECODE_ENABLED is not >>> defined then the TT_CONFIG_OPTION_BYTECODE_INTERPRETER will be enable, >>> which is a correct behavior. Unless I am blind? >>> >>> {snip} >>> >>> There is no problem. As for the redefine warning, I think it's harmless >>> since it's still enable with no change as it's merely enable again. >> >> The bug is in the port Makefile as I described. The CFLAGS addition of >> -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER is 100% worthless, and induces >> the warnings. >> >> Let's step through each piece of the build process. >> >> Someone ultimately does "make" in ports/print/freetype2. They do not >> have WITHOUT_TTF_BYTECODE_ENABLED defined. >> >> In the port Makefile: >> >> .if !defined(WITHOUT_TTF_BYTECODE_ENABLED) >> CFLAGS+= -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER >> .endif >> >> At this point TT_CONFIG_OPTION_BYTECODE_INTERPRETER will be defined >> during the build of the actual program. You can even see it being >> defined forcefully in "cc". >> >> Then later, in the port Makefile, we find this: >> >> .if !defined(WITHOUT_TTF_BYTECODE_ENABLED) >> @${REINPLACE_CMD} -e '/#define >> TT_CONFIG_OPTION_BYTECODE_INTERPRETER/s,/\* \(.*\) \*/,\1,; /#define >> TT_CONFIG_OPTION_UNPATENTED_HINTING/s,^\(.*\),/* \1 \*/,' \ >> ${WRKSRC}/include/freetype/config/ftoption.h >> .endif >> >> The $REINPLACE_CMD code never gets executed, which makes sense because >> WITHOUT_TTF_BYTECODE_ENABLED is not defined. > > Incorrect. See that '!', so the REINPLACE_CMD does get executed. It's why > I have shown you my example. Yes you're right -- it does get executed. I was incorrect. But this is part of the problem. The REINPLACE_CMD causes this to happen (ftconfig.h) when WITHOUT_TTF_BYTECODE_ENABLED is not defined: -/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ +#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER Which ultimately means the #define happens in the .h, ***AND*** being defined via cc ... -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER. So again -- what is the point of the CFLAGS modifier part of the Makefile when you're already doing it with the REINPLACE_CMD? :-) > The warnings don't mean it's bug. Are you *serious*? Wow. Just... wow. Shall I close the PR? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |