Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2011 21:22:43 GMT
From:      Rene Ladan <rene@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/160544: sysutils/lsof: build fails with clang
Message-ID:  <201109072122.p87LMhab059879@red.freebsd.org>
Resent-Message-ID: <201109072130.p87LU7w9082256@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         160544
>Category:       misc
>Synopsis:       sysutils/lsof: build fails with clang
>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:   Wed Sep 07 21:30:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Rene Ladan
>Release:        9.0-BETA2 amd64
>Organization:
>Environment:
FreeBSD acer 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225237M: Mon Aug 29 01:10:18 CEST 2011     rene@acer:/usr/obj/usr/src/sys/ACER  amd64

>Description:
Using the clang built into FreeBSD 9.0 (clang r135360), do:

# cd /usr/ports/sysutils/lsof
# env CC=clang CXX=clang++  make

..
In file included from dvch.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)'
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)'
..

In file included from dmnt.c:39:
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)'

The port builds fine with GCC 4.2.1 on the same machine.
>How-To-Repeat:

>Fix:
not known.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109072122.p87LMhab059879>