# make buildkernel fails



## cellini (Nov 23, 2015)

I am having problem building FreeBSD 10.2 kernel.

```
ctfmerge -L VERSION -g -o aac.ko.debug aac.o aac_pci.o aac_disk.o aac_cam.o
--- all_subdir_aesni ---
--- aesni_wrap.o ---
cc  -c -O3 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/FCGENERIC/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/FCGENERIC -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Werror  -mmmx -msse -maes /usr/src/sys/modules/aesni/../../crypto/aesni/aesni_wrap.c
--- all_subdir_aac ---
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk aac.ko.debug  export_syms | xargs -J% objcopy % aac.ko.debug
--- all_subdir_acpi ---
--- acpi_asus_wmi.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I/usr/src/sys/modules/acpi/acpi_asus_wmi/../../../dev/acpi_support -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/FCGENERIC/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/FCGENERIC  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 -std=iso9899:1999 -Qunused-arguments  -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-error-unused-function  -c /usr/src/sys/modules/acpi/acpi_asus_wmi/../../../dev/acpi_support/acpi_asus_wmi.c -o acpi_asus_wmi.o
--- all_subdir_aac ---
--- aac.ko.symbols ---
objcopy --only-keep-debug aac.ko.debug aac.ko.symbols
--- all_subdir_aesni ---
In file included from /usr/src/sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40:
/usr/src/sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 'wmmintrin.h' file not found
#include <wmmintrin.h>
  ^
--- all_subdir_aac ---
--- aac.ko ---
objcopy --strip-debug --add-gnu-debuglink=aac.ko.symbols aac.ko.debug aac.ko
--- all_subdir_aesni ---
1 error generated.
*** [aesni_wrap.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/aesni
1 error

make[4]: stopped in /usr/src/sys/modules/aesni
*** [all_subdir_aesni] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- scsi_enc.o ---
ctfconvert -L VERSION -g scsi_enc.o
--- modules-all ---
--- all_subdir_acpi ---
ctfconvert -L VERSION -g acpi_asus_wmi.o
A failure has been detected in another branch of the parallel make

make[5]: stopped in /usr/src/sys/modules/acpi/acpi_asus_wmi
*** [_sub.all] Error code 2

make[4]: stopped in /usr/src/sys/modules/acpi
1 error

make[4]: stopped in /usr/src/sys/modules/acpi
*** [all_subdir_acpi] Error code 2

make[3]: stopped in /usr/src/sys/modules
--- scsi_enc_safte.o ---
ctfconvert -L VERSION -g scsi_enc_safte.o
--- modules-all ---
--- all_subdir_ae ---
ctfconvert -L VERSION -g if_ae.o
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/sys/modules/ae
*** [all_subdir_ae] Error code 2

make[3]: stopped in /usr/src/sys/modules
3 errors

make[3]: stopped in /usr/src/sys/modules
*** [modules-all] Error code 2

make[2]: stopped in /usr/obj/usr/src/sys/FCGENERIC
--- scsi_enc_ses.o ---
ctfconvert -L VERSION -g scsi_enc_ses.o
--- scsi_sa.o ---
ctfconvert -L VERSION -g scsi_sa.o
1 error

make[2]: stopped in /usr/obj/usr/src/sys/FCGENERIC
*** [buildkernel] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
*** [buildkernel] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
root@bsdserver:/usr/src #
```

Any ideas? I have tried updating and re fetching /usr/src but it does not seem to make any difference.


----------



## wblock@ (Nov 23, 2015)

Did you `make buildworld` after updating the source?


----------



## cellini (Nov 24, 2015)

sStill something is missing.

```
root@bsdserver:/usr # svn update src
Updating 'src':
At revision 291237.
root@bsdserver:/usr # make buildworld
make: don't know how to make buildworld. Stop

make: stopped in /usr
root@bsdserver:/usr # make buildworld
root@bsdserver:/usr # cd src
root@bsdserver:/usr/src # make buildworld
--------------------------------------------------------------
>>> World build started on Tue Nov 24 09:32:00 CET 2015
--------------------------------------------------------------

--------------------------------------------------------------
>>> Rebuilding the temporary build tree
--------------------------------------------------------------
rm -rf /usr/obj/usr/src/tmp
rm -rf /usr/obj/usr/src/lib32
mkdir -p /usr/obj/usr/src/tmp/lib
mkdir -p /usr/obj/usr/src/tmp/usr
mkdir -p /usr/obj/usr/src/tmp/legacy/bin
mkdir -p /usr/obj/usr/src/tmp/legacy/usr
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.groff.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/tmp/usr/include >/dev/null
ln -sf /usr/src/sys /usr/obj/usr/src/tmp

--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  VERSION="FreeBSD 10.2-RELEASE amd64 1002000"  MAKEFLAGS="-m /usr/src/tools/build/mk  -m /usr/src/share/mk"  COMPILER_TYPE=clang make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1002000  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DNO_PIC -DNO_PROFILE -DNO_SHARED  _BOOTSTRAP_MAKEINFO=yes  -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS legacy
===> tools/build (obj,includes,depend,all,install)
/usr/obj/usr/src/tmp/usr/src/tools/build created for /usr/src/tools/build
set -e; cd /usr/src/tools/build; make buildincludes; make installincludes
rm -f .depend
mkdep -f .depend -a  -I/usr/src/tools/build/../../contrib/libc-pwcache -I/usr/src/tools/build/../../lib/libc/include -I/usr/obj/usr/src/tmp/legacy/usr/include -std=gnu99  /usr/src/tools/build/../../contrib/libc-pwcache/pwcache.c
In file included from /usr/src/tools/build/../../contrib/libc-pwcache/pwcache.c:92:
In file included from /usr/include/string.h:45:
/usr/include/strings.h:64:10: fatal error: 'xlocale/_strings.h' file not found
#include <xlocale/_strings.h>
  ^
1 error generated.
mkdep: compile failed
*** Error code 1

Stop.
make[3]: stopped in /usr/src/tools/build
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
root@bsdserver:/usr/src #
```

iI have followed the tutorial on bsdnow.tv http://www.bsdnow.tv/tutorials/upgrade but all iI am trying to do is to build a new custom kernel with FC support like mentioned here iI have done it on my test box and it works fine, I just can't get it to work on the production box.

tThanks for all the help, this Forums iI great!


----------



## cpm@ (Nov 24, 2015)

Please, be sure that /usr/include/xlocale/_strings.h exists

```
% locate _strings.h
/usr/include/xlocale/_strings.h
/usr/local/include/apr-1/apr_strings.h
/usr/local/poudriere/jails/10x32/usr/include/xlocale/_strings.h
/usr/local/poudriere/jails/10x32/usr/src/contrib/apr/include/apr_strings.h
/usr/local/poudriere/jails/10x32/usr/src/include/xlocale/_strings.h
/usr/local/poudriere/jails/11armv6232/usr/include/xlocale/_strings.h
/usr/local/poudriere/jails/11armv6232/usr/src/contrib/apr/include/apr_strings.h
/usr/local/poudriere/jails/11armv6232/usr/src/include/xlocale/_strings.h
/usr/obj/arm.armv6/usr/local/poudriere/jails/11armv6232/usr/src/tmp/usr/include/xlocale/_strings.h
/usr/src/contrib/apr/include/apr_strings.h
/usr/src/include/xlocale/_strings.h
```


----------



## cellini (Nov 24, 2015)

Yes /usr/src/include/xlocale/_strings.h exists.

```
anders@bsdserver:~ % locate _strings.h
/iocage/base/10.2-RELEASE/root/usr/include/xlocale/_strings.h
/iocage/base/10.2-RELEASE/root/usr/src/contrib/apr/include/apr_strings.h
/iocage/base/10.2-RELEASE/root/usr/src/include/xlocale/_strings.h
/iocage/jails/3526499c-5b79-11e5-bfed-54a05084ce7e/root/usr/include/xlocale/_strings.h
/iocage/jails/3526499c-5b79-11e5-bfed-54a05084ce7e/root/usr/src/contrib/apr/include/apr_strings.h
/iocage/jails/3526499c-5b79-11e5-bfed-54a05084ce7e/root/usr/src/include/xlocale/_strings.h
/iocage/jails/50a9d33c-6cf2-11e5-bfed-54a05084ce7e/root/usr/include/xlocale/_strings.h
/iocage/jails/50a9d33c-6cf2-11e5-bfed-54a05084ce7e/root/usr/src/contrib/apr/include/apr_strings.h
/iocage/jails/50a9d33c-6cf2-11e5-bfed-54a05084ce7e/root/usr/src/include/xlocale/_strings.h
/iocage/jails/a1bac995-5709-11e5-84fb-54a05084ce7e/root/usr/include/xlocale/_strings.h
/iocage/jails/a1bac995-5709-11e5-84fb-54a05084ce7e/root/usr/src/contrib/apr/include/apr_strings.h
/iocage/jails/a1bac995-5709-11e5-84fb-54a05084ce7e/root/usr/src/include/xlocale/_strings.h
/iocage/releases/10.2-RELEASE/root/usr/include/xlocale/_strings.h
/iocage/releases/10.2-RELEASE/root/usr/src/contrib/apr/include/apr_strings.h
/iocage/releases/10.2-RELEASE/root/usr/src/include/xlocale/_strings.h
/usr/jail/.warden-template-10.1-RELEASE-amd64/usr/include/xlocale/_strings.h
/usr/jail/bsdmail/usr/include/xlocale/_strings.h
/usr/jail/chrome jail/usr/src/contrib/apr/include/apr_strings.h
/usr/jail/chrome jail/usr/src/include/xlocale/_strings.h
/usr/jail/owncloud/usr/include/xlocale/_strings.h
/usr/jail/owncloud/usr/local/include/apr-1/apr_strings.h
/usr/jails/basejail/usr/include/xlocale/_strings.h
/usr/jails/testjail/usr/local/include/apr-1/apr_strings.h
/usr/local/include/apr-1/apr_strings.h
/usr/local/include/vlc/plugins/vlc_strings.h
/usr/local/poudriere/jails/10-2x64/usr/include/xlocale/_strings.h
/usr/local/poudriere/jails/10-2x64/usr/src/contrib/apr/include/apr_strings.h
/usr/local/poudriere/jails/10-2x64/usr/src/include/xlocale/_strings.h
/usr/local/poudriere/jails/101x64/usr/include/xlocale/_strings.h
/usr/local/poudriere/jails/101x64/usr/src/contrib/apr/include/apr_strings.h/usr/local/poudriere/jails/101x64/usr/src/include/xlocale/_strings.h
/usr/src/contrib/apr/include/apr_strings.h
/usr/src/include/xlocale/_strings.h
anders@bsdserver:~ %
```


----------



## SirDice (Nov 24, 2015)

Is there anything in /etc/make.conf and/or /etc/src.conf?


----------



## cellini (Nov 24, 2015)

None of the files exists 
	
	



```
root@bsdserver:/usr/src # cat /etc/make.conf /etc/src.conf
cat: /etc/make.conf: No such file or directory
cat: /etc/src.conf: No such file or directory
root@bsdserver:/usr/src #
```


----------



## SirDice (Nov 24, 2015)

Ok, that's good. They can't interfere either 

What are the permissions on /usr/include/xlocale/_strings.h?


----------



## cellini (Nov 24, 2015)

Good good iI am new to source, old Windows user. So it is a luxury I am not used to 


```
anders@bsdserver:~ % ls -l /usr/src/include/xlocale
total 59
-rw-r--r--  1 root  wheel   279 Nov 23 19:20 Makefile
-rw-r--r--  1 root  wheel  6881 Nov 23 19:20 _ctype.h
-rw-r--r--  1 root  wheel  2081 Nov 23 19:20 _inttypes.h
-rw-r--r--  1 root  wheel  1797 Nov 23 19:20 _langinfo.h
-rw-r--r--  1 root  wheel  2337 Nov 23 19:20 _locale.h
-rw-r--r--  1 root  wheel  1962 Nov 23 19:20 _monetary.h
-rw-r--r--  1 root  wheel  3268 Nov 23 19:20 _stdio.h
-rw-r--r--  1 root  wheel  2741 Nov 23 19:20 _stdlib.h
-rw-r--r--  1 root  wheel  2230 Nov 23 19:20 _string.h
-rw-r--r--  1 root  wheel  2026 Nov 23 19:20 _strings.h
-rw-r--r--  1 root  wheel  2357 Nov 23 19:20 _time.h
-rw-r--r--  1 root  wheel  2038 Nov 23 19:20 _uchar.h
-rw-r--r--  1 root  wheel  5591 Nov 23 19:20 _wchar.h
anders@bsdserver:~ %
```
Is this the right output?


----------



## SirDice (Nov 24, 2015)

Yes, indeed, that's the output I was looking for. This shows everyone should be able to read those files. Can you post the output of `set`? Perhaps it's something that was previously set in the session. 

Try updating the source again, I have had some weird errors before and it usually was because apparently I had updated right in the middle of a big commit. So:


```
cd /usr/src
svnlite update # Assuming you've used SVN
make clean
make buildworld
```


----------



## cellini (Nov 24, 2015)

Her is the output of the `set` command

```
anders@bsdserver:/usr/src % set
_       cd /usr/src

addsuffix
anyerror
argv    ()
autoexpand
autolist        ambiguous
autorehash
csubstnonl
cwd     /usr/src
dirstack        /usr/src
echo_style      bsd
edit
euid    1001
euser   anders
filec
gid     1001
group   anders
history 1000
home    /home/anders
killring        30
loginsh
mail    /var/mail/anders
owd     /home/anders
path    (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /home/anders/bin)
prompt  %N@%m:%~ %#
prompt2 %R?
prompt3 CORRECT>%R (y|n|e|a)?
promptchars     %#
savehist        (1000 merge)
shell   /bin/csh
shlvl   1
status  0
tcsh    6.18.01
term    linux
tty     pts/3
uid     1001
user    anders
version tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec
anders@bsdserver:/usr/src %
```
And here is the set output for root

```
root@bsdserver:/usr/src # set
_
addsuffix
anyerror
argv    ()
autoexpand
autolist        ambiguous
autorehash
csubstnonl
cwd     /usr/src
dirstack        /usr/src
echo_style      bsd
edit
euid    0
euser   root
filec
gid     0
group   wheel
history 1000
home    /root
killring        30
mail    /var/mail/root
owd
path    (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /root/bin)
prompt  %N@%m:%~ %#
prompt2 %R?
prompt3 CORRECT>%R (y|n|e|a)?
promptchars     %#
savehist        (1000 merge)
shell   /bin/csh
shlvl   1
status  0
tcsh    6.18.01
term    linux
tty     pts/3
uid     0
user    root
version tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec
root@bsdserver:/usr/src #
```

Run your code but it fails by the same error, I have tried running 
	
	



```
rm -rf /usr/src
```
 and then refetching the src with svn but the same error occurs.


----------



## wblock@ (Nov 24, 2015)

Please show the output of `uname -a` and `svn info /usr/src`.


----------



## cellini (Nov 24, 2015)

Here 

```
root@bsdserver:/usr/home/anders # uname -a
FreeBSD bsdserver 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7 #0: Mon Nov  2 14:19:39 UTC 2015     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
root@bsdserver:/usr/home/anders # svn info /usr/src
Path: /usr/src
Working Copy Root Path: /usr/src
URL: https://svn0.eu.freebsd.org/base/release/10.2.0
Relative URL: ^/release/10.2.0
Repository Root: https://svn0.eu.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 291237
Node Kind: directory
Schedule: normal
Last Changed Author: gjb
Last Changed Rev: 286717
Last Changed Date: 2015-08-13 07:02:04 +0200 (Thu, 13 Aug 2015)

root@bsdserver:/usr/home/anders #
```


----------



## SirDice (Nov 24, 2015)

cellini said:


> https://svn0.eu.freebsd.org/base/release/10.2.0


That's the wrong URL. It should be http://svn.freebsd.org/base/releng/10.2


----------



## cellini (Nov 24, 2015)

I changed it back now, same issue 

```
root@bsdserver:/usr/src # svn info /usr/src                                Path: .
Working Copy Root Path: /usr/src
URL: http://svn.freebsd.org/base/releng/10.2
Relative URL: ^/releng/10.2
Repository Root: http://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 291262
Node Kind: directory
Schedule: normal
Last Changed Author: glebius
Last Changed Rev: 290361
Last Changed Date: 2015-11-04 12:27:13 +0100 (Wed, 04 Nov 2015)

root@bsdserver:/usr/src # make buildworld
--------------------------------------------------------------
>>> World build started on Tue Nov 24 18:31:52 CET 2015
--------------------------------------------------------------

--------------------------------------------------------------
>>> Rebuilding the temporary build tree
--------------------------------------------------------------
rm -rf /usr/obj/usr/src/tmp
rm -rf /usr/obj/usr/src/lib32
mkdir -p /usr/obj/usr/src/tmp/lib
mkdir -p /usr/obj/usr/src/tmp/usr
mkdir -p /usr/obj/usr/src/tmp/legacy/bin
mkdir -p /usr/obj/usr/src/tmp/legacy/usr
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.groff.dist  -p /usr/obj/usr/src/tmp/legacy/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.usr.dist  -p /usr/obj/usr/src/tmp/usr >/dev/null
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p /usr/obj/usr/src/tmp/usr/include >/dev/null
ln -sf /usr/src/sys /usr/obj/usr/src/tmp

--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  VERSION="FreeBSD 10.2-RELEASE amd64 1002000"  MAKEFLAGS="-m /usr/src/tools/build/mk  -m /usr/src/share/mk"  COMPILER_TYPE=clang make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1002000  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DNO_PIC -DNO_PROFILE -DNO_SHARED  _BOOTSTRAP_MAKEINFO=yes  -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF -DEARLY_BUILD -DNO_TESTS legacy
===> tools/build (obj,includes,depend,all,install)
/usr/obj/usr/src/tmp/usr/src/tools/build created for /usr/src/tools/build
set -e; cd /usr/src/tools/build; make buildincludes; make installincludes
rm -f .depend
mkdep -f .depend -a    -I/usr/src/tools/build/../../contrib/libc-pwcache -I/usr/src/tools/build/../../lib/libc/include -I/usr/obj/usr/src/tmp/legacy/usr/include -std=gnu99   /usr/src/tools/build/../../contrib/libc-pwcache/pwcache.c
In file included from /usr/src/tools/build/../../contrib/libc-pwcache/pwcache.c:92:
In file included from /usr/include/string.h:45:
/usr/include/strings.h:64:10: fatal error: 'xlocale/_strings.h' file not
      found
#include <xlocale/_strings.h>
         ^
1 error generated.
mkdep: compile failed
*** Error code 1

Stop.
make[3]: stopped in /usr/src/tools/build
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
root@bsdserver:/usr/src # svn info /usr/src
Path: .
Working Copy Root Path: /usr/src
URL: http://svn.freebsd.org/base/releng/10.2
Relative URL: ^/releng/10.2
Repository Root: http://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 291262
Node Kind: directory
Schedule: normal
Last Changed Author: glebius
Last Changed Rev: 290361
Last Changed Date: 2015-11-04 12:27:13 +0100 (Wed, 04 Nov 2015)

root@bsdserver:/usr/src #
```


----------



## protocelt (Nov 24, 2015)

Assuming you now have the correct source installed, delete everything in /usr/obj(`# rm -rf /usr/obj/*`) and try again.


----------



## cellini (Nov 25, 2015)

I now run

```
rm -rf /usr/obj/*
cd /usr/src
svnlite update # Assuming you've used SVN
make clean
make buildworld
```
The same error occur.
Shouldn't this clean out everything and start over?


----------



## SirDice (Nov 25, 2015)

It should. This is probably the weirdest error I have seen in the 15 years I've been using FreeBSD. I've never come across something like this. 

Is there anything else you might have changed? Tried to change /usr/bin/cc perhaps? Anything that's not standard?


----------



## cellini (Nov 25, 2015)

I could not find .svn but could that be .subversion?

Anyway running this now.
	
	



```
anders@bsdserver:/usr % rm -rf /root/.subversion /usr/src* /usr/obj /usr/home/anders/.subversion/
```

And then running 
	
	



```
svn co svn://svn.freebsd.org/base/releng/10.2 /usr/src
```
And then 
	
	



```
cd /usr/src
make buildkernel
```

And so far it looks to be building  I'll check back in the moring, but it looks promising 
Does anybody know what .subversion is?


----------



## wblock@ (Nov 25, 2015)

It is the directory where the user's Subversion preferences are stored.


----------



## cellini (Nov 26, 2015)

There is now a new error, another file is not found.

```
ctfconvert -L VERSION -g if_ae.o
ld  -d -warn-common -r -d -o if_ae.ko.debug if_ae.o
ctfmerge -L VERSION -g -o if_ae.ko.debug if_ae.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk if_ae.ko.debug  export_syms | xargs -J% objcopy % if_ae.ko.debug
objcopy --only-keep-debug if_ae.ko.debug if_ae.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=if_ae.ko.symbols if_ae.ko.debug if_ae.ko
===> aesni (all)
cc  -c -O3 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/src/sys/GENERIC -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Werror  -mmmx -msse -maes /usr/src/sys/modules/aesni/../../crypto/aesni/aesni_wrap.c
In file included from /usr/src/sys/modules/aesni/../../crypto/aesni/aesni_wrap.c:40:
/usr/src/sys/modules/aesni/../../crypto/aesni/aesencdec.h:30:10: fatal error: 'wmmintrin.h' file not found
#include <wmmintrin.h>
  ^
1 error generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/src/sys/modules/aesni
*** Error code 1

Stop.
make[3]: stopped in /usr/src/sys/modules
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/usr/src/sys/GENERIC
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
root@bsdserver:/usr/src #
```

starting to wonder if it is better to reinstall the box?


----------



## wblock@ (Nov 26, 2015)

It is the same problem as it was in the first post.  What does `ls /usr/obj/usr/src/tmp/usr/include/clang/3.4.1/wmmintrin.h` show?


----------



## cellini (Nov 26, 2015)

Does not exist

```
anders@bsdserver:~ % ls /usr/obj/usr/src/tmp/usr/include/clang/3.4.1/wmmintrin.h
ls: /usr/obj/usr/src/tmp/usr/include/clang/3.4.1/wmmintrin.h: No such file or directory
```
But that should be built when I run `make buildkernel`, right?


----------



## wblock@ (Nov 26, 2015)

No, I would expect it to be built as part of a buildworld.


----------

