meta icon indicating copy to clipboard operation
meta copied to clipboard

unable to make fatal error: xlocale.h: No such file or directory

Open hkiang01 opened this issue 7 years ago • 5 comments

Followed instructions for "Ubuntu 14.04 LTS Build Guide" from https://meta-toolkit.org/setup-guide.html#ubuntu-build-guide

Ubuntu 17.10 g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0 cmake version 3.9.1

meta/build/deps/icu-58.2/src/ExternalICU/source/i18n/digitlst.cpp:67:13: fatal error: xlocale.h: No such file or directory
 #   include <xlocale.h>
             ^~~~~~~~~~~
compilation terminated.
   c++	 ...  /meta/build/deps/icu-58.2/src/ExternalICU/source/i18n/fmtable_cnv.cpp
*** Failed compilation command follows: ----------------------------------------------------------
/usr/bin/c++ -ffunction-sections -fdata-sections -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_ENABLE_DYLOAD=0 -DU_HAVE_ATOMIC=1 -DU_HAVE_STRTOD_L=1 -I/meta/build/deps/icu-58.2/src/ExternalICU/source/i18n -I/meta/build/deps/icu-58.2/src/ExternalICU/source/common -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -fPIC -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long --std=c++0x -c -o digitlst.ao /meta/build/deps/icu-58.2/src/ExternalICU/source/i18n/digitlst.cpp
--- ( rebuild with "make VERBOSE=1 all" to show all parameters ) --------
/meta/build/deps/icu-58.2/src/ExternalICU/source/config/mh-linux:49: recipe for target 'digitlst.ao' failed
make[4]: *** [digitlst.ao] Error 1
make[4]: *** Waiting for unfinished jobs....
Makefile:143: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 2
CMakeFiles/ExternalICU.dir/build.make:113: recipe for target 'deps/icu-58.2/src/ExternalICU-stamp/ExternalICU-build' failed
make[2]: *** [deps/icu-58.2/src/ExternalICU-stamp/ExternalICU-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ExternalICU.dir/all' failed
make[1]: *** [CMakeFiles/ExternalICU.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2\

hkiang01 avatar Jan 20 '18 00:01 hkiang01

Looks like a problem with ICU. We probably need to bump its version for the next release.

skystrife avatar Jan 20 '18 00:01 skystrife

Quickfix for now until I bump the ICU version:

# from your build directory
sed -i 's/xlocale/locale/' deps/icu-58.2/src/ExternalICU/source/i18n/digitlst.cpp

skystrife avatar Jan 20 '18 01:01 skystrife

Thank you @skystrife it seemed that the above sed command worked!

make // generates above error
sed -i 's/xlocale/locale/' deps/icu-58.2/src/ExternalICU/source/i18n/digitlst.cpp
make

You have to make before executing the sed command

hkiang01 avatar Jan 20 '18 03:01 hkiang01

Hi!

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

See:

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?

jcwkroeze avatar Mar 21 '18 14:03 jcwkroeze

Im very beginer to linux.. Im using ubuntu 18.04v Im facing the same issue can u please help me what should i have to do with above code

Thank you @skystrife it seemed that the above sed command worked!

make // generates above error
sed -i 's/xlocale/locale/' deps/icu-58.2/src/ExternalICU/source/i18n/digitlst.cpp
make

You have to make before executing the sed command Im very beginer to linux.. Im using ubuntu 18.04v Im facing the same issue can u please help me what should i have to do with above code

shabu242 avatar Mar 24 '19 08:03 shabu242