Re: MinGW support for SpiderMonkey

Mihai Dobrescu <[email protected]> Tue, 2 Aug 2016 23:28:46 -0700 (PDT)
Newsgroups gmane.comp.mozilla.devel.jseng
Message-ID <[email protected]>
On Saturday, July 23, 2016 at 11:04:28 PM UTC+3, Mihai Dobrescu wrote:
> Hello,
> 
> I need to bind MinGW compatible libs under Windows.
> How could I do that?
> 
> Thanks.

Due to this error, "multiple storage classes in declaration specifiers", I have disabled jemalloc build using the switch --disable-jemalloc, for now. Still, is there anybody with the right solution for jemalloc in this context?

The next thing is that I have missed something, as it can't find some libs during build:

g++ -m64 -std=c++14 -mwindows -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DU_CHARSET_IS_UTF8 -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/i18n -DU_HAVE_NL_LANGINFO_CODESET=0    -DU_DEBUG=1 -DHAVE_DLOPEN=0 -DU_HAVE_ATOMIC=1 -DU_HAVE_MMAP=0  -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common   "-DDEFAULT_ICU_PLUGINS=\"/usr/local/lib/icu\" " -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION  -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -mms-bitfields -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -g -mthreads   -c -DPIC  -o unifiedcac
 he.o m:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common/unifiedcache.cpp
g++ -m64 -std=c++14 -mwindows -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DU_CHARSET_IS_UTF8 -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/i18n -DU_HAVE_NL_LANGINFO_CODESET=0    -DU_DEBUG=1 -DHAVE_DLOPEN=0 -DU_HAVE_ATOMIC=1 -DU_HAVE_MMAP=0  -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common   "-DDEFAULT_ICU_PLUGINS=\"/usr/local/lib/icu\" " -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION  -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -mms-bitfields -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -g -mthreads   -c -DPIC  -o uloc_keyty
 pe.o m:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common/uloc_keytype.cpp
g++ -m64 -std=c++14 -mwindows -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_BREAK_ITERATION -DU_CHARSET_IS_UTF8 -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/i18n -DU_HAVE_NL_LANGINFO_CODESET=0    -DU_DEBUG=1 -DHAVE_DLOPEN=0 -DU_HAVE_ATOMIC=1 -DU_HAVE_MMAP=0  -Im:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common   "-DDEFAULT_ICU_PLUGINS=\"/usr/local/lib/icu\" " -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION  -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -mms-bitfields -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -g -mthreads   -c -DPIC  -o pluralmap.
 o m:/mozilla/mozjs-45.0.2.mingw/intl/icu/source/common/pluralmap.cpp
g++ -m64 -std=c++14 -mwindows -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -mms-bitfields -frtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -g -mthreads   -lpthread  -Wl,--build-id -static   -shared -Wl,-Bsymbolic -Wl,--enable-auto-import -Wl,--out-implib=../lib/libicuuc.dll.a  -o ../lib/icuuc56.dll errorcode.o putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o uinit.o uobject.o cmemory.o charstr.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 uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o lo
 clikely.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 utrie
 2_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 dictb
 e.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 simplepatternformatter.o unifiedcache.o uloc_keytype.o pluralmap.o -L../lib -L../stubdata -licudt56 -lpthread -lm
m:/Development/codeblocks/mingw-w64/x86_64-6.1.0-win32-seh-rt_v5-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -licudt56
collect2.exe: error: ld returned 1 exit status
Makefile:207: recipe for target '../lib/icuuc56.dll' failed
mozmake[5]: *** [../lib/icuuc56.dll] Error 1
mozmake[5]: Leaving directory 'm:/mozilla/mozjs-45.0.2.mingw/js/src/build_DBG.OBJ/intl/icu/target/common'
Makefile:147: recipe for target 'all-recursive' failed
mozmake[4]: *** [all-recursive] Error 2
mozmake[4]: Leaving directory 'm:/mozilla/mozjs-45.0.2.mingw/js/src/build_DBG.OBJ/intl/icu/target'
Makefile:59: recipe for target 'buildicu' failed
mozmake[3]: *** [buildicu] Error 2
mozmake[3]: Leaving directory 'm:/mozilla/mozjs-45.0.2.mingw/js/src/build_DBG.OBJ/config/external/icu'
m:/mozilla/mozjs-45.0.2.mingw/config/recurse.mk:71: recipe for target 'config/external/icu/target' failed
mozmake[2]: *** [config/external/icu/target] Error 2
mozmake[2]: Leaving directory 'm:/mozilla/mozjs-45.0.2.mingw/js/src/build_DBG.OBJ'
m:/mozilla/mozjs-45.0.2.mingw/config/recurse.mk:32: recipe for target 'compile' failed
mozmake[1]: *** [compile] Error 2
mozmake[1]: Leaving directory 'm:/mozilla/mozjs-45.0.2.mingw/js/src/build_DBG.OBJ'
m:/mozilla/mozjs-45.0.2.mingw/config/rules.mk:547: recipe for target 'default' failed
mozmake: *** [default] Error 2

I see the lib is called "libicudt.dll.a". Shouldn't it be "libicudt56.dll.a"? It is created in mozjs-45.0.2.mingw\js\src\build_DBG.OBJ\intl\icu\target\stubdata, it should find it there too as I see "-L../stubdata" in g++'s params. What ma I missing?