# make buildworld with clang fails?



## Carpetsmoker (Nov 11, 2011)

Using the RELENG_9 tag I can't get *make buildworld* to build using clang.

Is this a known issue? As I understood it (and read on wiki.freebsd.org), buildworld should work with clang ... At first I thought it may be a little "oops" in some commit, but it's been like this for 2 days ...

I'm using a fresh /usr/obj/:


```
===> gnu/usr.bin/binutils/libbfd (all)
clang -I/usr/local/include/ -DBFD_DEFAULT_TARGET_SIZE=64 -I. -I/usr/src/gnu/usr.bin/binutils/libbfd
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../libbfd -I/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/libbfd/../libbfd
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/include -D_GNU_SOURCE
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd -DSELECT_ARCHITECTURES="&bfd_i386_arch"
 -DHAVE_bfd_elf64_x86_64_freebsd_vec -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_efi_app_x86_64_vec -DHAVE_bfd_elf32_i386_freebsd_vec
 -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_efi_app_ia32_vec -DSELECT_VECS=" &bfd_elf64_x86_64_freebsd_vec ,&bfd_elf64_x86_64_vec,
&bfd_efi_app_x86_64_vec ,&bfd_elf32_i386_freebsd_vec ,&bfd_elf32_i386_vec ,&bfd_efi_app_ia32_vec"
 -DDEFAULT_VECTOR=bfd_elf64_x86_64_freebsd_vec -DDEBUGDIR="NULL" -std=gnu99   -I/usr/obj/usr/src/tmp/legacy/usr/include
 -c /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:245:71: error: too few arguments
      to function call, expected 4, have 3
              if (! (*info->callbacks->add_archive_element) (info, abfd, name))
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                  ^
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:481:20: error: no member named
      'creator' in 'struct bfd_link_hash_table'
          if (info->hash->creator->flavour == bfd_get_flavour (abfd))
              ~~~~~~~~~~  ^
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:573:22: error: no member named
      'creator' in 'struct bfd_link_hash_table'
      && info->hash->creator->flavour == bfd_get_flavour (abfd)
         ~~~~~~~~~~  ^
```


```
[/usr/src/]# cat /etc/make.conf
PERL_VERSION=5.10.1
.ifndef (PORTTEST)
WRKDIRPREFIX=/download/tmp/
.endif
WITH_LCD_FILTERING=yes
WITHOUT_GCONF=yes
NOPORTDOCS=yes

.ifndef (NO_CLANG)
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif

NO_WERROR=
WERROR=
NO_FSCHG=
.endif
```


```
[/usr/src]# cat /etc/src.conf 
WITHOUT_GCC=yes
WITH_CLANG=yes
```


```
[/usr/src]# uname -a
FreeBSD thinkpad 9.0-BETA3 FreeBSD 9.0-BETA3 #2: Thu Oct  6 01:51:02 CEST 2011     martin@thinkpad:/usr/obj/usr/src/sys/THINKPAD  amd64
```


----------

