gagolews / stringi

Fast and portable character string processing in R (with the Unicode ICU)
https://stringi.gagolewski.com/
Other
304 stars 44 forks source link

Fails to build with clang on Windows #497

Closed jeroen closed 1 year ago

jeroen commented 1 year ago

To support arm64 we build with clang on Windows. This errors with:

llvm-ar.exe: error: the 'o' modifier is only applicable to the 'x' operation

Full log:

...
clang++  -std=gnu++11 -I"C:/PROGRA~1/R/R-devel/include" -DNDEBUG -I. -Iicu69/ -Iicu69/unicode -Iicu69/common -Iicu69/i18n -DU_STRINGI_PATCHES -DUCONFIG_USE_LOCAL -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DU_TOOLUTIL_IMPLEMENTATION -UDEBUG -DNDEBUG -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DU_USE_STRTOD_L=0    -I"/c/msys64/home/jeroen/aarch64-w64-mingw32.static.posix/include"     -O2 -Wall    -c icu69/common/uvectr32.cpp -o icu69/common/uvectr32.o
clang++  -std=gnu++11 -I"C:/PROGRA~1/R/R-devel/include" -DNDEBUG -I. -Iicu69/ -Iicu69/unicode -Iicu69/common -Iicu69/i18n -DU_STRINGI_PATCHES -DUCONFIG_USE_LOCAL -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DU_TOOLUTIL_IMPLEMENTATION -UDEBUG -DNDEBUG -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DU_USE_STRTOD_L=0    -I"/c/msys64/home/jeroen/aarch64-w64-mingw32.static.posix/include"     -O2 -Wall    -c icu69/common/uvectr64.cpp -o icu69/common/uvectr64.o
clang++  -std=gnu++11 -I"C:/PROGRA~1/R/R-devel/include" -DNDEBUG -I. -Iicu69/ -Iicu69/unicode -Iicu69/common -Iicu69/i18n -DU_STRINGI_PATCHES -DUCONFIG_USE_LOCAL -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DU_TOOLUTIL_IMPLEMENTATION -UDEBUG -DNDEBUG -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DU_USE_STRTOD_L=0    -I"/c/msys64/home/jeroen/aarch64-w64-mingw32.static.posix/include"     -O2 -Wall    -c icu69/common/wintz.cpp -o icu69/common/wintz.o
llvm-ar rcs -o libicu_common.a icu69/common/appendable.o icu69/common/bmpset.o icu69/common/brkeng.o icu69/common/brkiter.o icu69/common/bytesinkutil.o icu69/common/bytestream.o icu69/common/bytestrie.o icu69/common/bytestriebuilder.o icu69/common/bytestrieiterator.o icu69/common/caniter.o icu69/common/characterproperties.o icu69/common/chariter.o icu69/common/charstr.o icu69/common/cmemory.o icu69/common/cstr.o icu69/common/cstring.o icu69/common/cwchar.o icu69/common/dictbe.o icu69/common/dictionarydata.o icu69/common/dtintrv.o icu69/common/edits.o icu69/common/errorcode.o icu69/common/filteredbrk.o icu69/common/filterednormalizer2.o icu69/common/icudataver.o icu69/common/icuplug.o icu69/common/loadednormalizer2impl.o icu69/common/localebuilder.o icu69/common/localematcher.o icu69/common/localeprioritylist.o icu69/common/locavailable.o icu69/common/locbased.o icu69/common/locdispnames.o icu69/common/locdistance.o icu69/common/locdspnm.o icu69/common/locid.o icu69/common/loclikely.o icu69/common/loclikelysubtags.o icu69/common/locmap.o icu69/common/locresdata.o icu69/common/locutil.o icu69/common/lsr.o icu69/common/messagepattern.o icu69/common/normalizer2.o icu69/common/normalizer2impl.o icu69/common/normlzr.o icu69/common/parsepos.o icu69/common/patternprops.o icu69/common/pluralmap.o icu69/common/propname.o icu69/common/propsvec.o icu69/common/punycode.o icu69/common/putil.o icu69/common/rbbi.o icu69/common/rbbi_cache.o icu69/common/rbbidata.o icu69/common/rbbinode.o icu69/common/rbbirb.o icu69/common/rbbiscan.o icu69/common/rbbisetb.o icu69/common/rbbistbl.o icu69/common/rbbitblb.o icu69/common/resbund.o icu69/common/resbund_cnv.o icu69/common/resource.o icu69/common/restrace.o icu69/common/ruleiter.o icu69/common/schriter.o icu69/common/serv.o icu69/common/servlk.o icu69/common/servlkf.o icu69/common/servls.o icu69/common/servnotf.o icu69/common/servrbf.o icu69/common/servslkf.o icu69/common/sharedobject.o icu69/common/simpleformatter.o icu69/common/static_unicode_sets.o icu69/common/stringpiece.o icu69/common/stringtriebuilder.o icu69/common/uarrsort.o icu69/common/ubidi.o icu69/common/ubidi_props.o icu69/common/ubidiln.o icu69/common/ubiditransform.o icu69/common/ubidiwrt.o icu69/common/ubrk.o icu69/common/ucase.o icu69/common/ucasemap.o icu69/common/ucasemap_titlecase_brkiter.o icu69/common/ucat.o icu69/common/uchar.o icu69/common/ucharstrie.o icu69/common/ucharstriebuilder.o icu69/common/ucharstrieiterator.o icu69/common/uchriter.o icu69/common/ucln_cmn.o icu69/common/ucmndata.o icu69/common/ucnv.o icu69/common/ucnv2022.o icu69/common/ucnv_bld.o icu69/common/ucnv_cb.o icu69/common/ucnv_cnv.o icu69/common/ucnv_ct.o icu69/common/ucnv_err.o icu69/common/ucnv_ext.o icu69/common/ucnv_io.o icu69/common/ucnv_lmb.o icu69/common/ucnv_set.o icu69/common/ucnv_u16.o icu69/common/ucnv_u32.o icu69/common/ucnv_u7.o icu69/common/ucnv_u8.o icu69/common/ucnvbocu.o icu69/common/ucnvdisp.o icu69/common/ucnvhz.o icu69/common/ucnvisci.o icu69/common/ucnvlat1.o icu69/common/ucnvmbcs.o icu69/common/ucnvscsu.o icu69/common/ucnvsel.o icu69/common/ucol_swp.o icu69/common/ucptrie.o icu69/common/ucurr.o icu69/common/udata.o icu69/common/udatamem.o icu69/common/udataswp.o icu69/common/uenum.o icu69/common/uhash.o icu69/common/uhash_us.o icu69/common/uidna.o icu69/common/uinit.o icu69/common/uinvchar.o icu69/common/uiter.o icu69/common/ulist.o icu69/common/uloc.o icu69/common/uloc_keytype.o icu69/common/uloc_tag.o icu69/common/umapfile.o icu69/common/umath.o icu69/common/umutablecptrie.o icu69/common/umutex.o icu69/common/unames.o icu69/common/unifiedcache.o icu69/common/unifilt.o icu69/common/unifunct.o icu69/common/uniset.o icu69/common/uniset_closure.o icu69/common/uniset_props.o icu69/common/unisetspan.o icu69/common/unistr.o icu69/common/unistr_case.o icu69/common/unistr_case_locale.o icu69/common/unistr_cnv.o icu69/common/unistr_props.o icu69/common/unistr_titlecase_brkiter.o icu69/common/unorm.o icu69/common/unormcmp.o icu69/common/uobject.o icu69/common/uprops.o icu69/common/ures_cnv.o icu69/common/uresbund.o icu69/common/uresdata.o icu69/common/usc_impl.o icu69/common/uscript.o icu69/common/uscript_props.o icu69/common/uset.o icu69/common/uset_props.o icu69/common/usetiter.o icu69/common/ushape.o icu69/common/usprep.o icu69/common/ustack.o icu69/common/ustr_cnv.o icu69/common/ustr_titlecase_brkiter.o icu69/common/ustr_wcs.o icu69/common/ustrcase.o icu69/common/ustrcase_locale.o icu69/common/ustrenum.o icu69/common/ustrfmt.o icu69/common/ustring.o icu69/common/ustrtrns.o icu69/common/utext.o icu69/common/utf_impl.o icu69/common/util.o icu69/common/util_props.o icu69/common/utrace.o icu69/common/utrie.o icu69/common/utrie2.o icu69/common/utrie2_builder.o icu69/common/utrie_swap.o icu69/common/uts46.o icu69/common/utypes.o icu69/common/uvector.o icu69/common/uvectr32.o icu69/common/uvectr64.o icu69/common/wintz.o 
C:/msys64/home/jeroen/aarch64-w64-mingw32.static.posix/bin/llvm-ar.exe: error: the 'o' modifier is only applicable to the 'x' operation

make: *** [Makevars.win:53: libicu_common.a] Error 1
ERROR: compilation failed for package 'stringi'
* removing 'C:/Users/jeroen/AppData/Local/R/win-library/4.4/stringi'
ERROR: dependency 'stringi' is not available for package 'stringr'
* removing 'C:/Users/jeroen/AppData/Local/R/win-library/4.4/stringr'
jeroen commented 1 year ago

Thanks!

gagolews commented 1 year ago

Thanks for the report and the fix!