From owner-freebsd-current@FreeBSD.ORG Sun Oct 9 17:32:49 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44FB41065670 for ; Sun, 9 Oct 2011 17:32:49 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF128FC14 for ; Sun, 9 Oct 2011 17:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:Message-ID:Subject:To:Sender:From:Date; bh=JfLbItEfnTZ+M4khpX6qasPJhEHpgd5748OyOLZBZOs=; b=Xfp/4T+GhcFd6uD7zL6biw1lDfV+fr7zK5tcIyac+cFAzB/v4a0edk96iokQyPiK5BJud6suyXuPP8DcgeHh9zOHoTh38o4BkR+hUy+3WOoV+4fNSVoThY0URk1bGtsD23n78H/68KtE5F/02JXt2DoQZYX0v5+EpaOlft7VoGo=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:31646 helo=[192.168.200.4]) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1RCxF1-000GTX-5J for freebsd-current@freebsd.org; Sun, 09 Oct 2011 12:32:48 -0500 Date: Sun, 9 Oct 2011 12:32:34 -0500 (CDT) From: Larry Rosenman Sender: ler@lrosenman.dyndns.org To: freebsd-current@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Score: -1.8 (-) X-LERCTR-Spam-Score: -1.8 (-) X-Spam-Report: SpamScore (-1.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1 X-LERCTR-Spam-Report: SpamScore (-1.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1 Subject: System headers with clang? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2011 17:32:49 -0000 I had gotten a PR about sysutils/lsof not compiling with clang. I had Vic Abell check it out, and the problem is NOT with lsof per se, but with the system headers. Is there a project afoot to update the system headers to make them clang compilable? Output below. ========================================================================================= (cd lib; make DEBUG="-O2" CFGF="-DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DFREEBSDV=9000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR=\"9.0-BETA3\"") clang -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_VM_MEMATTR_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHAS_ZFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DFREEBSDV=9000 -DHASFDESCFS=2 -DHASPSEUDOFS -DHASNULLFS -DHASIPv6 -DHASUTMPX -DHAS_STRFTIME -DLSOF_VSTR="9.0-BETA3" -I/usr/src/sys -O2 -c ckkv.c In file included from ckkv.c:43: In file included from ./../lsof.h:195: In file included from ./../dlsof.h:190: In file included from /usr/src/sys/ufs/ufs/ufsmount.h:36: /usr/src/sys/sys/buf.h:388:2: warning: implicit declaration of function 'KASSERT' is invalid in C99 [-Wimplicit-function-declaration] KASSERT(bp->b_bufobj != NULL, ("bwrite: no bufobj bp=%p", bp)); ^ /usr/src/sys/sys/buf.h:388:33: warning: expression result unused [-Wunused-value] KASSERT(bp->b_bufobj != NULL, ("bwrite: no bufobj bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/sys/sys/buf.h:389:41: warning: expression result unused [-Wunused-value] KASSERT(bp->b_bufobj->bo_ops != NULL, ("bwrite: no bo_ops bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/sys/sys/buf.h:391:7: warning: expression result unused [-Wunused-value] ("bwrite: no bop_write bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/sys/sys/buf.h:399:33: warning: expression result unused [-Wunused-value] KASSERT(bp->b_bufobj != NULL, ("bstrategy: no bufobj bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/sys/sys/buf.h:401:7: warning: expression result unused [-Wunused-value] ("bstrategy: no bo_ops bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/sys/sys/buf.h:403:7: warning: expression result unused [-Wunused-value] ("bstrategy: no bop_strategy bp=%p", bp)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ckkv.c:43: In file included from ./../lsof.h:195: In file included from ./../dlsof.h:432: In file included from /usr/include/string.h:45: /usr/include/strings.h:47:6: error: conflicting types for '__builtin_ffs' int ffs(int) __pure2; ^ /usr/include/machine/cpufunc.h:140:24: note: expanded from: #define ffs(x) __builtin_ffs(x) ^ /usr/include/strings.h:47:6: note: '__builtin_ffs' is a builtin with type 'int (unsigned int)' 7 warnings and 1 error generated. *** Error code 1 Stop in /usr/home/abe/src/lsof485d/lib. *** Error code 1 Stop in /usr/home/abe/src/lsof485d. -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893