Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

xlocale.h not found on Linux

The xlocale header isn't being found.

[1/3] Compile PCH.ImageWrapper.h In file included from /tmp/makepkg/unreal-engine/src/UnrealEngine/Engine/Intermediate/Build/Linux/B4D820EA/CrashReportClient/Shipping/ImageWrapper/PCH.ImageWrapper.h:44: In file included from /tmp/makepkg/unreal-engine/src/UnrealEngine/Engine/Source/Runtime/ImageWrapper/Private/ImageWrapperPrivatePCH.h:16: In file included from /tmp/makepkg/unreal-engine/src/UnrealEngine/Engine/Source/Runtime/ImageWrapper/Private/ExrImageWrapper.h:12: In file included from /tmp/makepkg/unreal-engine/src/UnrealEngine/Engine/Source/ThirdParty/openexr/Deploy/include/ImathBox.h:65: In file included from ThirdParty/openexr/Deploy/include/ImathVec.h:46: In file included from ThirdParty/openexr/Deploy/include/ImathExc.h:47: In file included from ThirdParty/openexr/Deploy/include/IexBaseExc.h:50: In file included from ThirdParty/Linux/LibCxx/include/c++/v1/sstream:174: In file included from ThirdParty/Linux/LibCxx/include/c++/v1/ostream:138: In file included from ThirdParty/Linux/LibCxx/include/c++/v1/ios:216: ThirdParty/Linux/LibCxx/include/c++/v1/__locale:39:11: fatal error: 'xlocale.h' file not found # include ^~~~~~~~~~~ 1 error generated. ERROR: UBT ERROR: Failed to produce item: /tmp/makepkg/unreal-engine/src/UnrealEngine/Engine/Binaries/Linux/CrashReportClient Total build time: 3.26 seconds (Local executor: 0.00 seconds) make: *** [Makefile:252: CrashReportClient-Linux-Shipping] Error 5

Product Version: UE 4.17
more ▼

asked Sep 10 '17 at 11:34 PM in Bug Reports

avatar image

138 8 17 25

avatar image jayeshroshan Jun 07 '18 at 06:59 AM

Looks like xlocale.h has been removed in glibc 2.26.


https:/ . /www . .linuxquestions.org/questions . /slackware-14/ no-luck-with-libc-on-current-xlocale-h-missing-4175612648/ https:/ /sourceware.or . g/glibc/wiki/Release/2.26# . Removal_of_.27xlocale.h.27 Looks like MeTA is using a custom FindICU that hasn't been updated for ~2 years. However, it seems that cmake 3.7 has it's own FindICU. Maybe switching to that will pull in a more up-to-date ICU that has been patched for glibc 2.26? TUTUApp Vip 9Apps Fast Download Aptoide APK

avatar image DyraSan Dec 03 '18 at 06:31 AM

Thanks, my system doesn't have dotnet-dev-1.0.4, so I'm trying to install it now. Oddly APT wants to uninstall tons of unrelated things like curl and steam-launcher and rtorrent to get that done, so there may be a conflict that stops this from working on a real workstation as compared to Travis...

DyraSan Vidmate

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

I think that is is best if the symbol link was place here

UnrealEngine/Engine/Source/ThirdParty/Linux/LibCxx/include/c++/v1> ln -s /usr/include/locale.h xlocale.h

This way you are not corrupting your host system. You never know how it will affect your system sometime in the future

more ▼

answered Oct 06 '17 at 09:18 AM

avatar image

Michael Hart
56 7 3

avatar image Acheta Games Oct 06 '17 at 09:20 AM

As mentioned above, recompiling the engine fixes everything, no need to link anything.

avatar image zerophase Oct 06 '17 at 09:32 AM

I do recompile the engine. I'm one of the maintainers of the aur release version of Unreal. Which patch do I need to pull in to get the engine to compile correctly?

avatar image Acheta Games Oct 06 '17 at 09:34 AM

To be honest I compile it with your patches with no issue. Also compiles without patches provided you use the older clang.

Probably clean the build cache? I always do fresh checkout from git before build.

avatar image zerophase Oct 06 '17 at 09:49 AM

I'll have to look around once 4.18 comes out. I think the cache should be free I build in ram, and the ccache patch for Unreal was never finished.

avatar image Xahonie Jun 05 '18 at 10:03 AM

Can you say how to clean build cache?

avatar image Michael Hart Oct 06 '17 at 09:50 AM

Under OpenSuSE Tumbleweed recompiling did not work for me...

Actually I see what you mean... I will wait for an official update to Tumbleweed before I remove my symbol link

avatar image kiloalphaindia Nov 14 '17 at 07:01 PM

I'm using Tumbleweed, too. See my answer below.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


i have the same issue. this helped me to move further:

 ln -s /usr/include/locale.h /usr/include/xlocale.h

they say xlocale.h is threadsafe version of locale.h; hope locale.h is fine too.

more ▼

answered Sep 11 '17 at 12:55 PM

avatar image

6 1

avatar image zerophase Sep 11 '17 at 08:39 PM

Yeah, that would work. My understanding is Unreal bundles all versions of third party libraries needed with it. Going to have to figure out which package for Arch has xlocale in the meantime.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Surprisingly commenting out the include statement in:


worked for me.. Looks like other headers that are included already provide what is needed.

more ▼

answered Nov 11 '17 at 12:36 AM

avatar image

16 1 2

avatar image FedorMatantsev Nov 11 '17 at 09:29 AM

It's totally bad idea to mess up with third party source code (it seems like you didn't even understand what you were doing). Builds is not equal to works.

avatar image kiloalphaindia Nov 14 '17 at 05:12 AM

OK, you are somewhat right, that I should have done some more investigation about this. So I found, that this is actually the solution to the problem. According to glibc Release Notes 2.26 :

  • The nonstandard header xlocale.h has been removed. Most programs should use locale.h instead. If you have a specific need for the definition of locale_t with no other declarations, please contact libc-alpha@sourceware.org and explain.

So obviously the glibc developers have included all standard content of xlocale.h into locale.h, which is also included in the file, that I modified.

After my investigation I'm no more that surprised. If you agree, I would edit my comment above accordingly.

avatar image kiloalphaindia Nov 14 '17 at 04:46 PM

And here is the official Patch from libcxx:

 --- libcxx/trunk/include/__locale    2017/05/31 22:14:05    304360
 +++ libcxx/trunk/include/__locale    2017/08/03 04:28:10    309920
 @@ -34,7 +34,7 @@
  # include <support/solaris/xlocale.h>
  #elif defined(_NEWLIB_VERSION)
  # include <support/newlib/xlocale.h>
 -#elif (defined(__GLIBC__) || defined(__APPLE__)      || defined(__FreeBSD__) \
 +#elif (defined(__APPLE__)      || defined(__FreeBSD__) \
      || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
  # include <xlocale.h>
  #elif defined(__Fuchsia__)

Refer to: Patch Source

avatar image FedorMatantsev Nov 14 '17 at 09:39 PM

Surely well done!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Quick Answer:

Recompile the editor. Everything should work as intended.

The long answer:

The issue is with the glibc update

 tar -tf /var/cache/pacman/pkg/glibc-2.25-7-x86_64.pkg.tar.xz  2>/dev/null| grep xlocal 


 tar -tf /var/cache/pacman/pkg/glibc-2.26-4-x86_64.pkg.tar.xz  2>/dev/null| grep xlocal

Not sure how why and when they decided to start dropping header files from glibc but hey, warning would be nice.

Not an UE4 Issue per se, but more of an bleeding edge issue.

By the way, there are several bugs created for this https://bugzilla.redhat.com/show_bug.cgi?id=1464244

Maybe a PR for the engine is in order as this seems to be a trend to remove the xlocale.h and would affect other distributions soon enough

Here is the glibc commit: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d

more ▼

answered Sep 13 '17 at 09:30 PM

avatar image

Acheta Games
859 10 13 20

avatar image DaDummy Oct 17 '17 at 11:21 AM

Actually it's in the release notes of glibc:

4.1. Removal of 'xlocale.h'

The nonstandard header xlocale.h has been removed in this release. It was never intended to be included directly by programs other than glibc itself, and it was a strict subset of the standard header locale.h. We know that a number of programs do include it, but because it has never been part of any other C library, programs that use it are probably testing for its existence with autoconf or a similar tool, and should not fail to compile.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

As an addition to previous answers I can tell there is a UE4_LINUX_USE_LIBCXX environment variable. Just


before build and UBT will use system glibc++ instead of shipped one.

BTW. there is a commit in 4.18 branch which fixes the problem.

more ▼

answered Nov 04 '17 at 04:14 PM

avatar image

1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question