Re: clang (__builtin_ffs) vs /usr/include/string.h



Hi Larry,

On Tue, 20 Dec 2011, Larry Rosenman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is anyone going to fix the following in the clang or FreeBSD system?

I haven't seen any mention of __builtin_ffs on any freebsd lists since your thread in october, "system headers with clang?". That rather makes me suspect that no one else is seeing this "problem". It's hard to fix something you don't know about.


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


As such, since we don't know what the "problem" is, some context for what is going on here would be useful -- what are you trying to compile? Still lsof?


This looks like something that needs to change in clang/FreeBSD headers.

Not necessarily -- things from the machine/ hierarchy are pretty uncommon, and I wouldn't be surprised if they had dependencies and ordering requirements involved. It could well be an application error, but we can't tell, since there is no context.

-Ben Kaduk
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Announcing Rev: a high performance event library for Ruby 1.9
    ... Heh, I caught that one earlier today and a fix is checked in. ... I don't presently have a FreeBSD system, ... I'm curious how that's even happening as the listen socket should be open ...
    (comp.lang.ruby)
  • Re: r247835: drm2 code breaks buildkernel
    ... ttm_lock with the trivial fix when I read the code for porting. ... struct ttm_pool_manager { ... With default options, clang accepts this but apparently, not gcc. ... * Releases a write lock. ...
    (freebsd-current)
  • Re: Clang as default compiler November 4th
    ... compiler for the FreeBSD system itself, not for all software out there. ... However, I think the majority of users can get by just fine using clang, ... tested the functionality of some 17000 ports. ...
    (freebsd-current)
  • Re: files disappearing from ls on NFS
    ... So how can I help to fix that? ... RM>I'll email you a patch for testing. ... I'm quite sure that I've build the system in February with clang already. ... RM>> Hartmut Brandt wrote: ...
    (freebsd-current)
  • Re: r247835: drm2 code breaks buildkernel
    ... would you like me to commit the fix for this? ... struct ttm_pool_manager { ... With default options, clang accepts this but apparently, not gcc. ... Because we also have -Wcast-qual, ...
    (freebsd-current)