From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 23 12:50:27 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85F9D16A4CE for ; Thu, 23 Dec 2004 12:50:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58DB643D49 for ; Thu, 23 Dec 2004 12:50:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBNCoRdx089788 for ; Thu, 23 Dec 2004 12:50:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBNCoRT0089785; Thu, 23 Dec 2004 12:50:27 GMT (envelope-from gnats) Resent-Date: Thu, 23 Dec 2004 12:50:27 GMT Resent-Message-Id: <200412231250.iBNCoRT0089785@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Olafur Osvaldsson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2556116A4CE for ; Thu, 23 Dec 2004 12:45:01 +0000 (GMT) Received: from hathor.isnic.is (hathor.isnic.is [193.4.58.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F4CD43D1F for ; Thu, 23 Dec 2004 12:45:00 +0000 (GMT) (envelope-from root@hathor.isnic.is) Received: from hathor.isnic.is (smmsp@localhost [127.0.0.1]) by hathor.isnic.is (8.13.1/8.13.1) with ESMTP id iBNCixMf018824 for ; Thu, 23 Dec 2004 12:44:59 GMT (envelope-from root@hathor.isnic.is) Received: (from root@localhost) by hathor.isnic.is (8.13.1/8.13.1/Submit) id iBNCiwRi018823; Thu, 23 Dec 2004 12:44:58 GMT (envelope-from root) Message-Id: <200412231244.iBNCiwRi018823@hathor.isnic.is> Date: Thu, 23 Dec 2004 12:44:58 GMT From: Olafur Osvaldsson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/75430: Unable to build kernel with DEBUG option set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Olafur Osvaldsson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2004 12:50:27 -0000 >Number: 75430 >Category: kern >Synopsis: Unable to build kernel with DEBUG option set >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 23 12:50:26 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Olafur Osvaldsson >Release: FreeBSD 5.3-RELEASE-p2 i386 >Organization: ISNIC >Environment: System: FreeBSD hathor.isnic.is 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #1: Mon Dec 13 14:24:39 GMT 2004 root@hathor.isnic.is:/usr/obj/usr/src/sys/ISNIC i386 >Description: After adding "options DEBUG=-g" to the kernel config file I get the following error on every machine I tried with 5.3-RELEASE-p2: ============================================================================= cc -c -O -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd -I/usr/src/sys/contrib/ngatm -D_KERNEL -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Werror /usr/src/sys/ufs/ffs/ffs_snapshot.c /usr/src/sys/ufs/ffs/ffs_snapshot.c:65:1: "DEBUG" redefined In file included from :3: ./opt_global.h:1:1: this is the location of the previous definition *** Error code 1 Stop in /usr/obj/usr/src/sys/ISNIC *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. ============================================================================= I was running the same kernel without the DEBUG option fine before, no updates before adding the option and recompiling. >How-To-Repeat: Add "options DEBUG=-g" to your kernel config. >Fix: Attached is a patch that fixes this for me. Maybe the DEBUG define should be removed completely from that file? --- ffs_snapshot.c.diff begins here --- --- sys/ufs/ffs/ffs_snapshot.c.orig Thu Dec 23 12:29:05 2004 +++ sys/ufs/ffs/ffs_snapshot.c Thu Dec 23 12:29:30 2004 @@ -62,7 +62,9 @@ #include #define KERNCRED thread0.td_ucred +#ifndef DEBUG #define DEBUG 1 +#endif static int cgaccount(int, struct vnode *, struct buf *, int); static int expunge_ufs1(struct vnode *, struct inode *, struct fs *, --- ffs_snapshot.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: