Hi,
I’m trying to upgrade our embedding from 91 to 102 so I followed the following steps to try to build on windows (using VS2019)
- Installed Rust (version 1.63)
- Installed LLVM/clang-cl 12.0.1
- Installed mozillabuild
- Download http://ftp.mozilla.org/pub/firefox/releases/102.3.0esr/source/firefox-102.3.0esr.source.tar.xz
- Made mozjs-102.3.0.tar.xz by running ‘python3 make-source-package.py’ in the js/src directory
- Made a mozconfig file containing
ac_add_options --enable-application=js
ac_add_options --prefix=C:/SOURCE20/spidermonkey_dir/js102_release
ac_add_options --disable-jemalloc
ac_add_options --disable-debug-symbols
ac_add_options --enable-optimize
ac_add_options --enable-strip
ac_add_options --enable-install-strip
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/js/src/releaseob
- Started mozillabuild, added Rust and LLVM to path with
export PATH=$PATH:"/c/Program Files/LLVM/bin"
export PATH=$PATH:"/c/Users/miles.thornton/AppData/Local/Programs/Rust stable MSVC 1.63/bin"
and set the mozconfig file with
export MOZCONFIG=/c/SOURCE20/javascript_dir/mozconfig/js102_win_release - Tried to build with
./mach build
This churns away for a while and gives the following error
6:15.14 js/src/build/js_static.lib
6:15.21 js/src/build/mozjs-102.dll
6:16.03 lld-link: error: duplicate symbol: DllMain
6:16.03 >>> defined at …\Unified_cpp_js_src8.obj
6:16.03 >>> defined at …\mozglue\misc\WindowsDllMain.obj
6:16.08 gmake.exe[4]: *** [C:/SOURCE20/spidermonkey_dir/mozjs-102.3.0/config/rules.mk:540: mozjs-102.dll] Error 1
6:16.08 gmake.exe[3]: *** [C:/SOURCE20/spidermonkey_dir/mozjs-102.3.0/config/recurse.mk:72: js/src/build/target] Error 2
6:16.08 gmake.exe[2]: *** [C:/SOURCE20/spidermonkey_dir/mozjs-102.3.0/config/recurse.mk:34: compile] Error 2
6:16.08 gmake.exe[1]: *** [C:/SOURCE20/spidermonkey_dir/mozjs-102.3.0/config/rules.mk:361: default] Error 2
6:16.08 gmake.exe: *** [client.mk:63: build] Error 2
6:16.11 13 compiler warnings present.
Can anybody give me any help? What am I doing wrong?
In older versions I remember that the mozjs tarball did not contain mozglue/dllservices and I had to manually add it but it looks like things have changed in the build since then.
Is there something similar that I need to do?
I would be very grateful for any help.
Thanks
Miles