[haiku-bugs] Re: [Haiku] #14842: Error building bootstraping libicuio while cross-compiling ARM on Ubuntu 18.04

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 29 Jan 2019 21:45:06 -0000

#14842: Error building bootstraping libicuio while cross-compiling ARM on Ubuntu
18.04
----------------------------+----------------------------
   Reporter:  pemdp         |      Owner:  bonefish
       Type:  bug           |     Status:  new
   Priority:  normal        |  Milestone:  Unscheduled
  Component:  Build System  |    Version:  R1/Development
 Resolution:                |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  0             |   Platform:  arm
----------------------------+----------------------------

Comment (by kallisti5):

 Finally, a slightly different response from this change to ICU:

 {{{
 diff --git a/source/config/mh-haiku b/source/config/mh-haiku
 index 55a3ed2..18503ae 100644
 --- a/source/config/mh-haiku
 +++ b/source/config/mh-haiku
 @@ -9,14 +9,17 @@ GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
  GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)

  ## Flags for position independent code
 -SHAREDLIBCFLAGS = -fPIC
 -SHAREDLIBCXXFLAGS = -fPIC
 +SHAREDLIBCFLAGS = -fPIC -fno-PIE
 +SHAREDLIBCXXFLAGS = -fPIC -fno-PIE
  SHAREDLIBCPPFLAGS = -DPIC

  ## Additional flags when building libraries and with threads
  LIBCPPFLAGS =
  THREADSCPPFLAGS =

 +## These are the library specific LDFLAGS
 +LDFLAGSICUDT=-nodefaultlibs -nostdlib
 +
  #
  CPPFLAGS += -DU_CHARSET_IS_UTF8=1
 }}}

 Result:
 {{{
 arm-unknown-haiku-g++ -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-
 strings -Wno-long-long --std=c++0x      -shared  -Wl,-soname
 -Wl,libicuuc.so.57 -o ../lib/libicuuc.so.57.1 errorcode.o putil.o umath.o
 utypes.o uinvchar.o umutex.o ucln_cmn.o uinit.o uobject.o cmemory.o
 charstr.o cstr.o udata.o ucmndata.o udatamem.o umapfile.o udataswp.o
 ucol_swp.o utrace.o uhash.o uhash_us.o uenum.o ustrenum.o uvector.o
 ustack.o uvectr32.o uvectr64.o ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o
 ucnv_cb.o ucnv_err.o ucnvlat1.o ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o
 ucnvscsu.o ucnvbocu.o ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o
 ucnvisci.o ucnvdisp.o ucnv_set.o ucnv_ct.o resource.o uresbund.o
 ures_cnv.o uresdata.o resbund.o resbund_cnv.o ucurr.o messagepattern.o
 ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o
 locdspnm.o loclikely.o locresdata.o bytestream.o stringpiece.o
 stringtriebuilder.o bytestriebuilder.o bytestrie.o bytestrieiterator.o
 ucharstrie.o ucharstriebuilder.o ucharstrieiterator.o dictionarydata.o
 appendable.o ustr_cnv.o unistr_cnv.o unistr.o unistr_case.o unistr_props.o
 utf_impl.o ustring.o ustrcase.o ucasemap.o ucasemap_titlecase_brkiter.o
 cstring.o ustrfmt.o ustrtrns.o ustr_wcs.o utext.o unistr_case_locale.o
 ustrcase_locale.o unistr_titlecase_brkiter.o ustr_titlecase_brkiter.o
 normalizer2impl.o normalizer2.o filterednormalizer2.o normlzr.o unorm.o
 unormcmp.o loadednormalizer2impl.o chariter.o schriter.o uchriter.o
 uiter.o patternprops.o uchar.o uprops.o ucase.o propname.o ubidi_props.o
 ubidi.o ubidiwrt.o ubidiln.o ushape.o uscript.o uscript_props.o usc_impl.o
 unames.o utrie.o utrie2.o utrie2_builder.o bmpset.o unisetspan.o
 uset_props.o uniset_props.o uniset_closure.o uset.o uniset.o usetiter.o
 ruleiter.o caniter.o unifilt.o unifunct.o uarrsort.o brkiter.o ubrk.o
 brkeng.o dictbe.o filteredbrk.o rbbi.o rbbidata.o rbbinode.o rbbirb.o
 rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o serv.o servnotf.o servls.o
 servlk.o servlkf.o servrbf.o servslkf.o uidna.o usprep.o uts46.o
 punycode.o util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o
 dtintrv.o ucnvsel.o propsvec.o ulist.o uloc_tag.o icudataver.o icuplug.o
 listformatter.o ulistformatter.o sharedobject.o simpleformatter.o
 unifiedcache.o uloc_keytype.o pluralmap.o -L../lib -L../stubdata -licudata
 /work/generated.arm/cross-tools-arm/lib/gcc/arm-unknown-haiku/7.3.0
 /../../../../arm-unknown-haiku/bin/ld: errorcode.o: relocation
 R_ARM_MOVW_ABS_NC against `_ZNK6icu_579ErrorCode13handleFailureEv' can not
 be used when making a shared object; recompile with -fPIC
 errorcode.o: error adding symbols: Bad value
 collect2: error: ld returned 1 exit status
 make[1]: *** [../lib/libicuuc.so.57.1] Error 1
 }}}

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14842#comment:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: