diff mbox

[XFSPROGS,2/3] Build without enabling DEBUG by default

Message ID 1311292237-4155-2-git-send-email-tytso@mit.edu
State Not Applicable, archived
Headers show

Commit Message

Theodore Ts'o July 21, 2011, 11:50 p.m. UTC
The tree currently will blow out with a build failure if -DDEBUG is
specified.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 m4/package_globals.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Christoph Hellwig July 22, 2011, 2:17 p.m. UTC | #1
On Thu, Jul 21, 2011 at 07:50:36PM -0400, Theodore Ts'o wrote:
> The tree currently will blow out with a build failure if -DDEBUG is
> specified.

This still doesn't make sense to me.  libxfs explicily overrides
DEBUG in the makefile:

# don't try linking xfs_repair with a debug libxfs.
DEBUG = -DNDEBUG

we really need to figure out why your enviroment doesn't pick this
up, especially as we've never seen that report from anybody else.

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o July 22, 2011, 6:30 p.m. UTC | #2
On Fri, Jul 22, 2011 at 10:17:53AM -0400, Christoph Hellwig wrote:
> On Thu, Jul 21, 2011 at 07:50:36PM -0400, Theodore Ts'o wrote:
> > The tree currently will blow out with a build failure if -DDEBUG is
> > specified.
> 
> This still doesn't make sense to me.  libxfs explicily overrides
> DEBUG in the makefile:
> 
> # don't try linking xfs_repair with a debug libxfs.
> DEBUG = -DNDEBUG

I added some debugging statements in libxfs/Makefile, and found this
(see below).

It looks like the problem is that GNU make 3.81 is doing an immediate
expansion of this line in builddefs:

CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)

							- Ted

LTCOMPILE is /bin/sh ../libtool --quiet --tag=CC --mode=compile gcc -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall
FCFLAGS is -I.
GCFLAGS is -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT
PCFLAGS is -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall
CFLAGS is -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall
CCF is gcc -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig July 22, 2011, 6:38 p.m. UTC | #3
On Fri, Jul 22, 2011 at 02:30:48PM -0400, Ted Ts'o wrote:
> I added some debugging statements in libxfs/Makefile, and found this
> (see below).

You can get most of this by simply using make V=1, not just in xfsprogs,
but in most projects using silent make output (including those using
automake)

> It looks like the problem is that GNU make 3.81 is doing an immediate
> expansion of this line in builddefs:

I'm having GNU make 3.81 on most of my test systems as well, so that
alone can't be the whole issue.

> CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
> 

> LTCOMPILE is /bin/sh ../libtool --quiet --tag=CC --mode=compile gcc -I/kbuild/xfstests/bld/include -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -g -O2 -DDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I./include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION="3.1.5" -DLOCALEDIR="//share/locale" -DPACKAGE="xfsprogs" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall

A typical V=1 compile line looks like:

/bin/bash ../libtool --quiet --tag=CC --mode=compile gcc -I. -g -O2 -DNDEBUG -DVERSION=\"3.1.5\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall    -c xfs_dir2_sf.c

for me.  The biggest thing is that you have another directory in your
include path.  How did you add that one? Did you add anything else
special to the ./configure or make command lines?

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alex Elder July 22, 2011, 10:30 p.m. UTC | #4
On Fri, 2011-07-22 at 14:38 -0400, Christoph Hellwig wrote:
> On Fri, Jul 22, 2011 at 02:30:48PM -0400, Ted Ts'o wrote:

. . .

> A typical V=1 compile line looks like:
> 
> /bin/bash ../libtool --quiet --tag=CC --mode=compile gcc -I. -g -O2
> -DNDEBUG -DVERSION=\"3.1.5\" -DLOCALEDIR=\"/usr/share/locale\"
> -DPACKAGE=\"xfsprogs\" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE
> -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char
> -fno-strict-aliasing -Wall    -c xfs_dir2_sf.c

FWIW, I get a compile line for xfs_dir2_sf.c identical to
what Christoph supplied.

> for me.  The biggest thing is that you have another directory in your
> include path.  How did you add that one? Did you add anything else
> special to the ./configure or make command lines?

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/m4/package_globals.m4 b/m4/package_globals.m4
index e469671..d2a3e2f 100644
--- a/m4/package_globals.m4
+++ b/m4/package_globals.m4
@@ -17,7 +17,7 @@  AC_DEFUN([AC_PACKAGE_GLOBALS],
     test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
     AC_SUBST(pkg_release)
 
-    DEBUG=${DEBUG:-'-DDEBUG'}		dnl  -DNDEBUG
+    DEBUG=${DEBUG:-'-DNDEBUG'}		dnl  -DNDEBUG
     debug_build="$DEBUG"
     AC_SUBST(debug_build)