From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 17 10:20:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F25F9106564A for ; Mon, 17 Sep 2012 10:20:08 +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 CB59C8FC12 for ; Mon, 17 Sep 2012 10:20:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8HAK83S036696 for ; Mon, 17 Sep 2012 10:20:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8HAK8CY036684; Mon, 17 Sep 2012 10:20:08 GMT (envelope-from gnats) Resent-Date: Mon, 17 Sep 2012 10:20:08 GMT Resent-Message-Id: <201209171020.q8HAK8CY036684@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, Schaich@FreeBSD.org, Alonso Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B82AF1065670 for ; Mon, 17 Sep 2012 10:17:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 8AA258FC12 for ; Mon, 17 Sep 2012 10:17:14 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8HAHEVZ031818 for ; Mon, 17 Sep 2012 10:17:14 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q8HAHEUE031802; Mon, 17 Sep 2012 10:17:14 GMT (envelope-from nobody) Message-Id: <201209171017.q8HAHEUE031802@red.freebsd.org> Date: Mon, 17 Sep 2012 10:17:14 GMT From: Schaich@FreeBSD.org, Alonso To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/171704: hastd fails to build X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 10:20:09 -0000 >Number: 171704 >Category: misc >Synopsis: hastd fails to build >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 17 10:20:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Schaich, Alonso >Release: 9-STABLE >Organization: >Environment: FreeBSD moonshine.localnet.edu 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Fri Sep 7 19:23:36 CEST 2012 root@moonshine.localnet.edu:/usr/obj/usr/src/sys/NODEBUG amd64 >Description: When buildworld runs into sbin/hastd it fails building primary.c: clang -O2 -pipe -I/usr/src/sbin/hastd -DHAVE_CAPSICUM -DPROTO_TCP_DEFAULT_PORT=8457 -DINET -DINET6 -DHAVE_CRYPTO -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-format -c /usr/src/sbin/hastd/primary.c /usr/src/sbin/hastd/primary.c:553:27: error: variable has incomplete type 'struct g_gate_ctl_modify' struct g_gate_ctl_modify ggiomodify; ^ /usr/src/sbin/hastd/primary.c:553:9: note: forward declaration of 'struct g_gate_ctl_modify' struct g_gate_ctl_modify ggiomodify; ^ /usr/src/sbin/hastd/primary.c:558:27: error: use of undeclared identifier 'GG_MODIFY_READPROV' ggiomodify.gctl_modify = GG_MODIFY_READPROV | GG_MODIFY_READOFFSET; ^ /usr/src/sbin/hastd/primary.c:558:48: error: use of undeclared identifier 'GG_MODIFY_READOFFSET' ggiomodify.gctl_modify = GG_MODIFY_READPROV | GG_MODIFY_READOFFSET; ^ /usr/src/sbin/hastd/primary.c:562:29: error: use of undeclared identifier 'G_GATE_CMD_MODIFY' if (ioctl(res->hr_ggatefd, G_GATE_CMD_MODIFY, &ggiomodify) == 0) This happens because primay.c uses g_gate_ctl_modify from geom/gate/g_gate.h - however the build process does not include the "new" (source tree) header but the one installed in /usr/include/geom/gate instead, which does not yet declare g_gate_ctl_modify. >How-To-Repeat: cd to source dir make -C sbin/hastd >Fix: Add -I/usr/src/sys to the compiler call (attached patch). As a workaround, copying sys/geom/gate/g_gate.h from the source tree to /usr/include/geom/gate/g_gate.h works, too. Patch attached with submission follows: --- sbin/hastd/Makefile.orig 2012-09-17 12:05:48.834544721 +0200 +++ sbin/hastd/Makefile 2012-09-17 12:13:12.828719385 +0200 @@ -21,6 +21,7 @@ NO_WFORMAT= NO_WCAST_ALIGN= +CFLAGS+=-I${.CURDIR}../../sys CFLAGS+=-I${.CURDIR} CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457 >Release-Note: >Audit-Trail: >Unformatted: