C Problem with sources: fatal error: 'xlocale/_strings.h' file not found

Hello,
I try to make buildworld and got this error in my log file:

Code:
--- _bootstrap-tools-lib/clang/libllvmminimal ---
In file included from /usr/src/contrib/llvm/lib/Support/APInt.cpp:15:
In file included from /usr/src/contrib/llvm/include/llvm/ADT/APInt.h:20:
In file included from /usr/src/contrib/llvm/include/llvm/Support/MathExtras.h:19:
In file included from /usr/include/c++/v1/algorithm:626:
In file included from /usr/include/c++/v1/cstring:61:
In file included from /usr/include/string.h:45:

/usr/include/strings.h:67:10: fatal error: 'xlocale/_strings.h' file not found
#include <xlocale/_strings.h>
         ^
Before I had migrated from FreeBSD 9.1 to 11.0 with
freebsd-update -r 10.3-RELEASE upgrade
freebsd-update -r 11.0-RELEASE upgrade

So, the error above in my log file comes from /usr/include/strings.h. I figured out that in the installed system, in /usr/include/strings.h at the line 67, is the preprocessor directive:
Code:
 #include <xlocale/_strings.h>
But there is no subdirectory /usr/include/xlocate on my system.
My question is, when compiling the OS, where have I to look for /usr/include/? Is it underneath the / root directory or is it anywhere underneath /usr/src/?

And where should be the subdirectory xlocate, the compiler is searching for?
Thank you for some advices.
 
In /etc/freebsd-update.conf I have
Code:
# Components of the base system which should be kept updated.
Components src world kernel
so all things of the system should be have installed. On the other hand an install from scratch with the sources of FreeBSD with
svn checkout svn://svn.freebsd.org/base/releng/11.1 /usr/src
should bring all the files of the OS with it, what is been need; but the compiler and linker itself.
Or did I misinterpret that?
 
Ok, but why is there no directory /usr/include/xlocate?
Where should I could find "/usr/include/strings.h" and "xlocale/_strings.h"in the sources?
I wanna figure out why is something missing.
 
Before I had migrated from FreeBSD 9.1 to 11.0 with
freebsd-update -r 10.3-RELEASE upgrade
freebsd-update -r 11.0-RELEASE upgrade
Just to verify, you also did freebsd-update install multiple times right?

If you want to build the OS from source I would forget about freebsd-update(8) and use svnlite(1) to fetch/update the source and buildworld with that.
 
Ok, but why is there no directory /usr/include/xlocate?
If you didn't delete it, probably because of a failed make installworld.
Where should I could find "/usr/include/strings.h" and "xlocale/_strings.h"in the sources?
In the corresponding /usr/src/include/xlocale.

If this directory/files is/are missing probably more is missing too. That you have to find out. So for a first shot I'd copy these and try again.
 
Lets keep the same issue in the same thread please. Threads merged.
 
Just to verify, you also did freebsd-update install multiple times right?
Yes I did.

I have it no write. But for upgradeing to 11.1 form 11.0 I didn't use freebsd-update. I have used:
svn checkout svn://svn.freebsd.org/base/releng/11.1 /usr/src to get the sources and then I do make buildkernel, make installkernel. Maybe something has gone wrong later on.

I will fetch the resources again and look if /usr/src/include/xlocale then will be there. Give me some days (2-3) for that - I will come back.
 
Last edited:
no, I get this error
Code:
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  TOOLS_PREFIX=/usr/obj/usr/src/tmp  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  MAKEFLAGS="-m /usr/src/tools/build/mk  -m /usr/src/share/mk" make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1100122  SSP_CFLAGS=  MK_HTML=no NO_LINT=yes MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no  MK_CLANG_EXTRAS=no MK_CLANG_FULL=no  MK_LLDB=no MK_TESTS=no  MK_INCLUDES=yes bootstrap-tools
===> lib/clang/libllvmminimal (obj,all,install)
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal created for /usr/src/lib/clang/libllvmminimal
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal/Support created for /usr/src/lib/clang/libllvmminimal
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmminimal/TableGen created for /usr/src/lib/clang/libllvmminimal
c++  -O2 -pipe -I/usr/src/lib/clang/include -I/usr/src/contrib/llvm/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd11.1\" -DLLVM_HOST_TRIPLE=\"i386-unknown-freebsd11.1\" -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/tmp\" -ffunction-sections -fdata-sections -MD -MF.depend.Support_APInt.o -MTSupport/APInt.o -Qunused-arguments -I/usr/obj/usr/src/tmp/legacy/usr/include -std=c++11 -fno-exceptions -fno-rtti  -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src/contrib/llvm/lib/Support/APInt.cpp -o Support/APInt.o
In file included from /usr/src/contrib/llvm/lib/Support/APInt.cpp:15:
In file included from /usr/src/contrib/llvm/include/llvm/ADT/APInt.h:20:
In file included from /usr/src/contrib/llvm/include/llvm/Support/MathExtras.h:19:
In file included from /usr/include/c++/v1/algorithm:626:
In file included from /usr/include/c++/v1/cstring:61:
In file included from /usr/include/string.h:45:
/usr/include/strings.h:67:10: fatal error: 'xlocale/_strings.h' file not found
#include <xlocale/_strings.h>
         ^
1 error generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/src/lib/clang/libllvmminimal
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1
Also with
no .tcshrc settings mv .tcshrc .tcshrc.test and
mv /etc/make.conf /etc/make.conf.test
and also
pwd
--> /usr/src/include
ls xlocale/_strings.h
xlocale/_strings.h

??? What is going wrong? Why can the file not found - Any idea?

17/11/23 Addition:
I also found this solution - but this disagree with the statement that all can be found in /usr/src/... (Maybe I mixed for that point port installation with OS installation)
10.1 to 10.2 Upgrade problem pkg
 
I could fix it, but this advice seems wrong:
In the corresponding /usr/src/include/xlocale.

I have copied xlocale from an other installation into /usr/include/xlocale and then the compiler goes further, but there are now another errors later in the compilation process.

How can I fixed a corrupted /usr/include directory?
And why is it needed?
 
Back
Top