[MacPorts] #69000: libcxx-powerpc: can we get rid of depending on system libstdc++ completely?

MacPorts noreply at macports.org
Sat Dec 30 01:40:37 UTC 2023


#69000: libcxx-powerpc: can we get rid of depending on system libstdc++ completely?
-------------------------------------------+----------------------------
 Reporter:  barracuda156                   |      Owner:  catap
     Type:  defect                         |     Status:  assigned
 Priority:  Normal                         |  Milestone:
Component:  ports                          |    Version:  2.8.1
 Keywords:  leopard, snowleopard, powerpc  |       Port:  libcxx-powerpc
-------------------------------------------+----------------------------
 So I tried to build `icu` against `libcxx` on PowerPC. Here linking
 failed:
 {{{
 /opt/local/bin/g++-mp-12 -dynamiclib -dynamic -pipe -Os -arch ppc -W -Wall
 -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11
 -fvisibility=hidden -Wl,-headerpad_max_install_names -stdlib=libc++
 -L/opt/local/libexec/llvm-7.1.1/lib -lc++ -arch ppc
 -Wl,-compatibility_version -Wl,74 -Wl,-current_version -Wl,74.1
 -install_name /opt/local/lib/libicuuc.74.dylib -o
 ../lib/libicuuc.74.1.dylib appendable.o bmpset.o brkeng.o brkiter.o
 bytesinkutil.o bytestream.o bytestrie.o bytestriebuilder.o
 bytestrieiterator.o caniter.o characterproperties.o chariter.o charstr.o
 cmemory.o cstr.o cstring.o cwchar.o dictbe.o dictionarydata.o dtintrv.o
 edits.o emojiprops.o errorcode.o filteredbrk.o filterednormalizer2.o
 icudataver.o icuplug.o loadednormalizer2impl.o localebuilder.o
 localematcher.o localeprioritylist.o locavailable.o locbased.o
 locdispnames.o locdistance.o locdspnm.o locid.o loclikely.o
 loclikelysubtags.o locmap.o locresdata.o locutil.o lsr.o lstmbe.o
 messagepattern.o mlbe.o normalizer2.o normalizer2impl.o normlzr.o
 parsepos.o patternprops.o pluralmap.o propname.o propsvec.o punycode.o
 putil.o rbbi.o rbbi_cache.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o
 rbbisetb.o rbbistbl.o rbbitblb.o resbund.o resbund_cnv.o resource.o
 restrace.o ruleiter.o schriter.o serv.o servlk.o servlkf.o servls.o
 servnotf.o servrbf.o servslkf.o sharedobject.o simpleformatter.o
 static_unicode_sets.o stringpiece.o stringtriebuilder.o uarrsort.o ubidi.o
 ubidi_props.o ubidiln.o ubiditransform.o ubidiwrt.o ubrk.o ucase.o
 ucasemap.o ucasemap_titlecase_brkiter.o ucat.o uchar.o ucharstrie.o
 ucharstriebuilder.o ucharstrieiterator.o uchriter.o ucln_cmn.o ucmndata.o
 ucnv.o ucnv2022.o ucnv_bld.o ucnv_cb.o ucnv_cnv.o ucnv_ct.o ucnv_err.o
 ucnv_ext.o ucnv_io.o ucnv_lmb.o ucnv_set.o ucnv_u16.o ucnv_u32.o ucnv_u7.o
 ucnv_u8.o ucnvbocu.o ucnvdisp.o ucnvhz.o ucnvisci.o ucnvlat1.o ucnvmbcs.o
 ucnvscsu.o ucnvsel.o ucol_swp.o ucptrie.o ucurr.o udata.o udatamem.o
 udataswp.o uenum.o uhash.o uhash_us.o uidna.o uinit.o uinvchar.o uiter.o
 ulist.o uloc.o uloc_keytype.o uloc_tag.o ulocale.o ulocbuilder.o
 umapfile.o umath.o umutablecptrie.o umutex.o unames.o unifiedcache.o
 unifilt.o unifunct.o uniset.o uniset_closure.o uniset_props.o unisetspan.o
 unistr.o unistr_case.o unistr_case_locale.o unistr_cnv.o unistr_props.o
 unistr_titlecase_brkiter.o unorm.o unormcmp.o uobject.o uprops.o
 ures_cnv.o uresbund.o uresdata.o usc_impl.o uscript.o uscript_props.o
 uset.o uset_props.o usetiter.o ushape.o usprep.o ustack.o ustr_cnv.o
 ustr_titlecase_brkiter.o ustr_wcs.o ustrcase.o ustrcase_locale.o
 ustrenum.o ustrfmt.o ustring.o ustrtrns.o utext.o utf_impl.o util.o
 util_props.o utrace.o utrie.o utrie2.o utrie2_builder.o utrie_swap.o
 uts46.o utypes.o uvector.o uvectr32.o uvectr64.o wintz.o -L../lib
 -L../stubdata -licudata -lpthread -lm
 Undefined symbols:
   "__ZSt14__once_functor", referenced from:
       __ZSt14__once_functor$non_lazy_ptr in umutex.o
      (maybe you meant: __ZSt14__once_functor$non_lazy_ptr)
   "__ZSt20__throw_system_errori", referenced from:
       __ZNSt5mutex4lockEv in umutex.o
       __ZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_ in umutex.o
 __ZNK6icu_7412UnifiedCache5_pollERKNS_12CacheKeyBaseERPKNS_12SharedObjectER10UErrorCode
 in unifiedcache.o
       __ZNSt5mutex4lockEv in unifiedcache.o
   "__ZNSt18condition_variable10notify_allEv", referenced from:
       __ZN6icu_7421umtx_initImplPostInitERNS_9UInitOnceE in umutex.o
 __ZNK6icu_7412UnifiedCache4_putEPK12UHashElementPKNS_12SharedObjectE10UErrorCode
 in unifiedcache.o
   "__ZSt16__get_once_mutexv", referenced from:
       __ZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_ in umutex.o
   "___once_proxy", referenced from:
       ___once_proxy$non_lazy_ptr in umutex.o
      (maybe you meant: ___once_proxy$non_lazy_ptr)
   "__ZNSt18condition_variableC1Ev", referenced from:
       _umtx_init in umutex.o
       __ZN6icu_7412UnifiedCache11getInstanceER10UErrorCode in
 unifiedcache.o
   "__ZNSt18condition_variableD1Ev", referenced from:
       _umtx_cleanup in umutex.o
       _unifiedcache_cleanup in unifiedcache.o
   "__ZSt27__set_once_functor_lock_ptrPSt11unique_lockISt5mutexE",
 referenced from:
       __ZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_ in umutex.o
       __ZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_ in umutex.o
       __ZSt9call_onceIRFvvEJEEvRSt9once_flagOT_DpOT0_ in umutex.o
   "__ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE", referenced
 from:
       __ZN6icu_7420umtx_initImplPreInitERNS_9UInitOnceE in umutex.o
 __ZNK6icu_7412UnifiedCache5_pollERKNS_12CacheKeyBaseERPKNS_12SharedObjectER10UErrorCode
 in unifiedcache.o
 ld: symbol(s) not found
 }}}

 Apparently these symbols are provided by `libstdc++`: https://gcc.gnu.org
 /legacy-ml/gcc-help/2019-12/msg00090.html

 If I just add `-lstdc++` to the command above, it links successfully. But
 to ''all three libraries:''


 {{{
 36-145% otool -L
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_icu/icu/work/icu/source/lib/libicuuc.74.1.dylib
 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_icu/icu/work/icu/source/lib/libicuuc.74.1.dylib:
         /opt/local/lib/libicuuc.74.dylib (compatibility version 74.0.0,
 current version 74.1.0)
         /opt/local/libexec/llvm-7.1.1/lib/libc++.1.dylib (compatibility
 version 1.0.0, current version 1.0.0)
         /opt/local/lib/libicudata.74.dylib (compatibility version 74.0.0,
 current version 74.1.0)
         /opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version
 7.0.0, current version 7.32.0)
         /opt/local/libexec/llvm-7.1.1/lib/libc++abi.1.dylib (compatibility
 version 1.0.0, current version 1.0.0)
         /opt/local/lib/libgcc/libgcc_s.1.1.dylib (compatibility version
 1.0.0, current version 1.1.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 117.0.0)
 }}}

 This is likely wrong.

 P. S. The issue is perhaps nothing specific to PowerPC and should be
 reproducible on Intel without a native `libc++`.

-- 
Ticket URL: <https://trac.macports.org/ticket/69000>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list