Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7953 Discussions

'unresolved external symbol... CEBuffer' error for ICU4C build using ICC on Windows

sav
Novice
432 Views

Hello, everyone,

For ICU build using ICC on Windows got error:

sh-4.4$ (CC="icl" CXX="icl" CFLAGS="-O3 -MD" CXXFLAGS="-O3 -MD" ./configure --disable-debug --enable-release --enable-shared --disable-static && make)
[snip]
sh-4.4$ make VERBOSE=1 tests
[snip]
make[2]: Entering directory '/c/test/icu/source/test/testdata'
PATH=../../lib:../../stubdata:../../tools/ctestfw:$PATH  MAKEFLAGS= ../../bin/pkgdata -q -c -s /c/test/icu/source/test/testdata/out/build/icudt58l -T ../../test/testdata/out/build -d ../../test/testdata/out -s ../../test/testdata/out/build -p testdata -m common ../../test/testdata/out/build/testdata.lst
make[2]: Leaving directory '/c/test/icu/source/test/testdata'
make[1]: Making `all' in `intltest'
make[2]: Entering directory '/c/test/icu/source/test/intltest'
LINK.EXE -subsystem:console  -nologo -out:intltest.exe aliastst.o allcoll.o apicoll.o astrotst.o callimts.o calregts.o caltest.o caltztst.o canittst.o citrtest.o colldata.o convtest.o currcoll.o collationtest.o fldset.o dadrfmt.o dadrcal.o dcfmapts.o decoll.o dtfmapts.o dtfmrgts.o dtfmtrtts.o dtfmttst.o dtptngts.o encoll.o escoll.o ficoll.o frcoll.o g7coll.o intltest.o itercoll.o itformat.o itmajor.o itutil.o jacoll.o lcukocol.o loctest.o miscdtfm.o mnkytst.o msfmrgts.o nmfmapts.o nmfmtrt.o numfmtst.o numrgts.o plurults.o plurfmts.o pptest.o regcoll.o restest.o restsnew.o sdtfmtts.o svccoll.o tchcfmt.o selfmts.o tfsmalls.o tmsgfmt.o trcoll.o tscoll.o tsdate.o tsdcfmsy.o tsdtfmsy.o tsmthred.o tsnmfmt.o tsputil.o tstnrapi.o tstnorm.o tzbdtest.o tzregts.o tztest.o ucdtest.o usettest.o ustrtest.o strcase.o transtst.o strtest.o thcoll.o bytestrietest.o ucharstrietest.o itrbbi.o rbbiapts.o rbbitst.o rbbimonkeytest.o ittrans.o transapi.o cpdtrtst.o testutil.o transrt.o trnserr.o normconf.o sfwdchit.o jamotest.o srchtest.o reptest.o regextst.o itrbnf.o itrbnfrt.o itrbnfp.o ucaconf.o icusvtst.o uobjtest.o idnaref.o idnaconf.o nptrans.o punyref.o testidn.o testidna.o uts46test.o incaltst.o calcasts.o v32test.o uvectest.o textfile.o tokiter.o utxttest.o windttst.o winnmtst.o winutil.o csdetest.o tzrulets.o tzoffloc.o tzfmttst.o ssearch.o dtifmtts.o tufmtts.o itspoof.o simplethread.o bidiconf.o locnmtst.o dcfmtest.o alphaindextst.o listformattertest.o genderinfotest.o compactdecimalformattest.o regiontst.o reldatefmttest.o simpleformattertest.o measfmttest.o numfmtspectest.o unifiedcachetest.o quantityformattertest.o scientificnumberformattertest.o datadrivennumberformattestsuite.o numberformattesttuple.o numberformat2test.o pluralmaptest.o ../../tools/ctestfw/icutest.lib ../../lib/icuin.lib ../../lib/icuuc.lib ../../lib/icudt.lib ../../lib/icutu.lib advapi32.lib
   Creating library intltest.lib and object intltest.exp
collationtest.o : error LNK2019: unresolved external symbol "public: signed char __cdecl icu_58::CollationIterator::CEBuffer::ensureAppendCapacity(int,enum UErrorCode &)" (?ensureAppendCapacity@CEBuffer@CollationIterator@icu_58@@QEAACHAEAW4UErrorCode@@@Z) referenced in function "public: virtual void __cdecl CollationTest::runIndexedTest(int,signed char,char const * &,char *)" (?runIndexedTest@CollationTest@@UEAAXHCAEAPEBDPEAD@Z)
intltest.exe : fatal error LNK1120: 1 unresolved externals
make[2]: *** [Makefile:117: intltest.exe] Error 96
make[2]: Leaving directory '/c/test/icu/source/test/intltest'
make[1]: *** [Makefile:68: all-recursive] Error 2
make[1]: Leaving directory '/c/test/icu/source/test'
make: *** [Makefile:209: tests] Error 2

Error reproduced for builds with 'Release+Shared' configuration only. Error not reproduced for builds with other configurations, or builds using <mingw-w64|MSVC> with 'Release+Shared' configuration.


Environment:

  • Windows 10 x64,
  • IPSXE 2017 Update 2,
  • VS 2015 Update 3,
  • MSYS2 20161025,
  • ICU4C 58.2.


Reported this error on ICU bugtracker (see ICU ticket #13190) and was suggested:

 In file icu4c/source/i18n/collationiterator.h, line 39, change

    class CEBuffer {

to

    class U_I18N_API CEBuffer {

which allowed to bypass error and finish all 'make tests' tasks successfully.

ICU Developers believe, that error relate to ICC, since "No other compiler seems to need this" patch.


Steps to reproduce error using command line.

1. Install MSYS2 to some directory (see installation and configuration in case troubles), so path to its files won't contain spaces, e.g. '%ProgramData%\Msys64', and:

- run shell using command 'mingw64.exe' from MSYS2 installation folder,
- upgrade using command 'pacman -Syuu' (could require few runs, until all components be upgraded),
- install additional packages ('make' utility) using command 'pacman -S make',
- delete file 'usr\bin\link.exe' from MSYS2 installation folder (or it would conflict with MSVC linker),

2. Extract ICU4C 58.2 sources to some directory, e.g. 'c:\TEST' so it would look like:

c:\TEST\icu\as_is\
...
c:\TEST\icu\readme.html

3. Run 'Compiler 17.0 Update 2 for Intel 64 Visual Studio 2015 environment' command prompt from Windows Start menu, and run commands:

set MSYSTEM=MINGW64
set PATH=%ProgramData%\Msys64\usr\bin;%PATH%
sh
cd /c/TEST/icu/source
(CC="icl" CXX="icl" CFLAGS="-O3 -MD" CXXFLAGS="-O3 -MD" ./configure --disable-debug --enable-release --enable-shared --disable-static && make)
make VERBOSE=1 tests

which reproduce error.


P.S. ICU Developers unable to help with other ICU build errors using ICC, since "ICU project members do not have the environment". Still do "Missing free ICC version on Windows for Opensource development".


Alexander

 

0 Kudos
0 Replies
Reply