|
From: Steven R. L. <sr...@ic...> - 2014-08-19 04:28:42
|
On 08/11/2014 05:22 AM, Alexander Haberstroh wrote: > Hello, > > I'm trying to cross-compile ICU v 53.1 for Xeon Phi with the Intel-Compiler. > > I followed the cross-compile section in the ICU readme > (http://source.icu-project.org/repos/icu/icu/trunk/readme.html#HowToCrossCompileICU): > > 1) I created three directories in a test directory: icu, buildA and buildB > 2) I copied the ICU sources to the icu directory > (http://download.icu-project.org/files/icu4c/53.1/icu4c-53_1-src.tgz) > 3) I executed the following command in buildA: > > sh /home/alex/test/icu/icu/source/runConfigureICU Linux && gmake > > There were no errors, gcc was used here. > > 4) I set the following environment variables: > > CC=/opt/intel/bin/icc > CXX=/opt/intel/bin/icpc > CXXFLAGS=-mmic > CFLAGS=-mmic > > 5) I executed the following command in buildB: > > /home/alex/test/icu/icu/source/configure --prefix=/home/alex/temp/ > --enable-release=yes --build=x86_64 --host=k1om > --with-cross-build=/home/alex/test/buildA && gmake > > That led to the following error during compilation: > > pkgdata: gcc -O2 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith > -Wmissing-prototypes -Wwrite-strings -shared -Wl,-Bsymbolic > -nodefaultlibs -nostdlib -o ../lib/libicudata.so.53.1 > ./out/tmp/icudt53l_dat.o -Wl,-soname -Wl,libicudata.so.53 > -Wl,-Bsymbolic > ./out/tmp/icudt53l_dat.o: file not recognized: File format not recognized > collect2: ld returned 1 exit status > -- return status = 256 > Error generating library file. Failed command: gcc -O2 -std=c99 -Wall > -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes > -Wwrite-strings -shared -Wl,-Bsymbolic -nodefaultlibs -nostdlib -o > ../lib/libicudata.so.53.1 ./out/tmp/icudt53l_dat.o -Wl,-soname > -Wl,libicudata.so.53 -Wl,-Bsymbolic > Error generating package data. I don't know why the build didn't stop at this point. > echo timestamp > packagedata > gmake[1]: Leaving directory `/home/alex/test/buildA/data' > gmake[0]: Making `all' in `extra' > gmake[1]: Entering directory `/home/alex/test/buildA/extra' > gmake[1]: Making `all' in `uconv' > gmake[2]: Entering directory `/home/alex/test/buildA/extra/uconv' > gmake -f pkgdataMakefile > gmake[3]: Entering directory `/home/alex/test/buildA/extra/uconv' > rm -rf pkgdata.inc > gmake[3]: Leaving directory `/home/alex/test/buildA/extra/uconv' > LD_LIBRARY_PATH=/home/alex/test/buildA/lib:/home/alex/test/buildA/stubdata:/home/alex/test/buildA/tools/ctestfw:$LD_LIBRARY_PATH > /home/alex/test/buildA/bin/pkgdata -p uconvmsg -O pkgdata.inc -m > static -s uconvmsg -d uconvmsg -T uconvmsg uconvmsg/uconvmsg.lst > genccode: --match-arch cpu=3 bits=32 big-endian=1 > pkgdata: ar r uconvmsg/libuconvmsg.a uconvmsg/uconvmsg_dat.o > pkgdata: ranlib uconvmsg/libuconvmsg.a > g++ -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings > -Wno-long-long --std=c++0x -o ../../bin/uconv uconv.o uwmsg.o > -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata -licudata > -lpthread -ldl -lm uconvmsg/libuconvmsg.a > uconvmsg/libuconvmsg.a: could not read symbols: Archive has no index; > run ranlib to add one > collect2: ld returned 1 exit status > gmake[2]: *** [../../bin/uconv] Error 1 > gmake[2]: Leaving directory `/home/alex/test/buildA/extra/uconv' > gmake[1]: *** [all-recursive] Error 2 > gmake[1]: Leaving directory `/home/alex/test/buildA/extra' > gmake: *** [all-recursive] Error 2 > > Modifying the command above and disabling the ICU-extras resulted in a > compilation without errors: > > /home/alex/test/icu/icu/source/configure --enable-extras=no > --prefix=/home/alex/temp/ --enable-release=yes --build=x86_64 > --host=k1om --with-cross-build=/home/alex/test/buildA && gmake && > gmake install > > The Intel-Compiler was used here. > > Linking ICU dynamically in our software worked fine during compilation > and linking, but running our software on the Xeon Phi threw the > following exception: > > exception 'Initialization of ICU failed with error: U_FILE_ACCESS_ERROR' () > > Linking ICU statically provides the same result (the exception above). > > How can I compile ICU without errors, even if extras are switched on? > Could this (the missing extras) be the reason why the initialization > of ICU fails and throws an exception? no, that wouldn't do it. You could try: --with-data-packaging=archive which will read the .dat file instead of building the shared library for data. > > Thanks in advance and best regards > > Alex > > ------------------------------------------------------------------------------ > _______________________________________________ > icu-support mailing list - icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support > Archives/Project Info: http://site.icu-project.org/contacts -- IBMer but all opinions are mine. https://www.ohloh.net/accounts/srl295 // fingerprint @ https://ssl.icu-project.org/trac/wiki/Srl |