From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by mail.openembedded.org (Postfix) with ESMTP id 41A6D6067D for ; Tue, 22 Mar 2016 01:16:16 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id u2M1GGj1014218 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Mon, 21 Mar 2016 18:16:16 -0700 Received: from [128.224.162.159] (128.224.162.159) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Mon, 21 Mar 2016 18:16:15 -0700 To: "Burton, Ross" References: From: Hongxu Jia Message-ID: <56F09CD9.7020802@windriver.com> Date: Tue, 22 Mar 2016 09:16:09 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Cc: OE-core Subject: Re: [PATCH 18/18] gconf: fix buildpaths QA issue X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2016 01:16:17 -0000 Content-Type: multipart/alternative; boundary="------------060702030804040506060204" --------------060702030804040506060204 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit On 03/21/2016 10:47 PM, Burton, Ross wrote: > > On 19 March 2016 at 14:56, Hongxu Jia > wrote: > > +PACKAGECONFIG[debug] = "--enable-debug=yes, --enable-debug=no" > > > There's an explicit --enable-debug in EXTRA_OECONF, Yes, we should remove the duplicated --enable-debug in EXTRA_OECONF > and reading the configure --help shows that the "off" mode should be > --enable-debug=minimum as "no" removes the GLib checks which can > result in crashes if bad data is passed to the API. ./configure --help ... --enable-debug Compile with debug checks. [no/yes/minimum, default=minimum] ... vim ./configure.ac ... 121 dnl Default to debug spew in unstable branch 122 AC_ARG_ENABLE(debug, 123 AS_HELP_STRING([--enable-debug], 124 [Compile with debug checks. @<:@no/yes/minimum, default=minimum@:>@]), 125 , enable_debug=minimum) 126 127 if test "x$enable_debug" = "xyes"; then 128 CFLAGS="$CFLAGS -DGCONF_ENABLE_DEBUG=1" 129 AC_MSG_NOTICE([Will build with debugging spew and checks]) 130 else 131 if test "x$enable_debug" = "xno"; then 132 CFLAGS="$CFLAGS -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1" 133 AC_MSG_NOTICE([Will build without *any* debugging code]) 134 else 135 AC_MSG_NOTICE([Will build with debug checks but no debug spew]) 136 fi 137 fi ... vim gconf/gconfd.c ... 384 #ifdef GCONF_ENABLE_DEBUG 385 /* -- Debug only */ 386 387 if (addresses == NULL) 388 { 389 gconf_log(GCL_DEBUG, _("gconfd compiled with debugging; trying to load gconf.path from the source directory")); 390 conffile = g_strconcat(GCONF_SRCDIR, "/gconf/gconf.path", NULL); 391 addresses = gconf_load_source_path(conffile, NULL); 392 g_free(conffile); 393 } 394 395 /* -- End of Debug Only */ 396 #endif ... If we could not use '--enable-debug=yes' to fix build paths issue, and as your suggested it should not remove check and assert, so minimum is the best choice. //Hongxu > > Ross --------------060702030804040506060204 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit
On 03/21/2016 10:47 PM, Burton, Ross wrote:

On 19 March 2016 at 14:56, Hongxu Jia <hongxu.jia@windriver.com> wrote:
+PACKAGECONFIG[debug] = "--enable-debug=yes, --enable-debug=no"

There's an explicit --enable-debug in EXTRA_OECONF,

Yes, we should remove the duplicated --enable-debug in EXTRA_OECONF

and reading the configure --help shows that the "off" mode should be --enable-debug=minimum as "no" removes the GLib checks which can result in crashes if bad data is passed to the API.

./configure --help
...
  --enable-debug          Compile with debug checks. [no/yes/minimum,
                          default=minimum]
...

vim ./configure.ac
...
121 dnl Default to debug spew in unstable branch
122 AC_ARG_ENABLE(debug,
123   AS_HELP_STRING([--enable-debug],
124     [Compile with debug checks. @<:@no/yes/minimum, default=minimum@:>@]),
125   , enable_debug=minimum)
126
127 if test "x$enable_debug" = "xyes"; then
128   CFLAGS="$CFLAGS -DGCONF_ENABLE_DEBUG=1"
129   AC_MSG_NOTICE([Will build with debugging spew and checks])
130 else
131   if test "x$enable_debug" = "xno"; then
132     CFLAGS="$CFLAGS -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1"
133     AC_MSG_NOTICE([Will build without *any* debugging code])
134   else
135     AC_MSG_NOTICE([Will build with debug checks but no debug spew])
136   fi
137 fi
...

vim gconf/gconfd.c
...
 384 #ifdef GCONF_ENABLE_DEBUG
 385   /* -- Debug only */
 386
 387   if (addresses == NULL)
 388     {
 389       gconf_log(GCL_DEBUG, _("gconfd compiled with debugging; trying to load gconf.path from the source directory"));
 390       conffile = g_strconcat(GCONF_SRCDIR, "/gconf/gconf.path", NULL);
 391       addresses = gconf_load_source_path(conffile, NULL);
 392       g_free(conffile);
 393     }
 394
 395   /* -- End of Debug Only */
 396 #endif
...

If we could not use '--enable-debug=yes' to fix build paths issue,
and as your suggested it should not remove check and assert,
so minimum is the best choice.

//Hongxu


Ross

--------------060702030804040506060204--