Compiling swift with Foundation on Centos 7


(Oleksii Dykan) #1

Hi guys! I am trying to compile swift from the release tag 4.2 on Centos 7 and I managed to compile the swift itself, but I keep on getting getting errors on the step of compiling CompileC: CoreFoundation/Locale.subproj/CFLocale.c and I always get the following error:

CoreFoundation/Locale.subproj/CFLocale.c:33:10: fatal error: 'unicode/unumsys.h' file not found

Does anyone know how to deal with it or what needs to be installed so that it finds this header? Thanks in advance!

I used the following commands

$ git checkout tags/swift-4.2-RELEASE
$ ./utils/update-checkout --clone --tag swift-4.2-RELEASE
$ utils/build-script --release --libdispatch --swiftpm --xctest --foundation

(Manolo van Ee) #2

On my Fedora 28 I can see it's part of libicu:

However, on Centos 7 I guess the libicu version is too old:


(Oleksii Dykan) #3

Thanks for a hint ;) I have checkout and I have libicu installed:

Package libicu-devel-50.1.2-15.el7.x86_64 already installed and latest version

Is this version too old?


(Manolo van Ee) #4

I think so, because when I search for packages that provide "unicode/unumsys.h" on Centos 7, it doesn't find any. So, this file has probably been added to libicu in a newer version than 50.1.2-15. (My Fedora 28 has version 60.2.2)