Eugene
Eugene

Reputation: 1067

Problems with compilation ICU with MinGW-w64 on Windows

I tried to compile ICU 59.1 with MinGW-w64 according to Qt manual (MinGW-64-bit). Unfortunately, I got the following error:

$ make && make install
rebuilding config/icucross.mk
rebuilding config/icucross.inc
cd ./config; \
        make -f pkgdataMakefile
make[1]: вход в каталог «/c/Qt-deps/icu-59_1/source/config»


*** ERROR - configure could not detect your platform
*** see the readme.html
*** or, try copying icu/source/config/mh-linux to mh-unknown
***   and editing it.


exit 1
rm -rf pkgdata.inc
make[1]: выход из каталога «/c/Qt-deps/icu-59_1/source/config»
rm -rf config/icu-config
/usr/bin/install -c ./config/icu-config-top config/icu-config
chmod u+w config/icu-config
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/Makefile.inc | grep -v '#M#' | uniq >> config/icu-config
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/mh-unknown | grep -v '#M#' | uniq >> config/icu-config
cat ./config/icu-config-bottom >> config/icu-config
chmod u-w config/icu-config
config/icu-uc.pc updated.
config/icu-i18n.pc updated.
config/icu-io.pc updated.
Note: rebuild with "make VERBOSE=1 " to show all compiler parameters.
/bin/sh ./mkinstalldirs lib
mkdir lib
/bin/sh ./mkinstalldirs bin
mkdir bin
make[0]: Making `all' in `stubdata'
make[1]: вход в каталог «/c/Qt-deps/icu-59_1/source/stubdata»


*** ERROR - configure could not detect your platform
*** see the readme.html
*** or, try copying icu/source/config/mh-linux to mh-unknown
***   and editing it.


exit 1
make[1]: выход из каталога «/c/Qt-deps/icu-59_1/source/stubdata»
make: *** [Makefile:147: all-recursive] Ошибка 2

I have tried to compile it twice on two different computers: the 1st one - Windows 10 Pro, the last one - Windows 7 Ultimate. Results are the same. Used tools: MSYS2 x64 (20161025). So, what am I doing wrong?

Upvotes: 2

Views: 2022

Answers (3)

iwlb
iwlb

Reputation: 11

I have build icu with same problem. I have run this script for correct the problem:

del M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-unknow
copy M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-msys-msvc M:\work\code\qt\icu4c-68_2\icu4c\source\config\mh-unknow

Upvotes: 1

rarias
rarias

Reputation: 173

I have fixed the same issue (except that used ICU 55.1) replacing ../source/config/mh-unknown with the contents of ../source/config/mh-mingw64

Upvotes: 1

David Grayson
David Grayson

Reputation: 87486

The error "configure could not detect your platform" can probably be fixed by passing the arguments --build=$MINGW_CHOST --host=$MINGW_CHOST to the configure script. If you are in the right type of MSYS2 shell, $MINGW_CHOST should be i686-w64-mingw32 or x86_64-w64-mingw32

For more useful tips for building ICU, look at the build script that the MSYS2 developers have crafted:

https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-icu

Upvotes: 2

Related Questions