Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9026 closed enhancement (fixed)

Add mozjs38 (for the new version of gjs)

Reported by: Douglas R. Reno Owned by: Douglas R. Reno
Priority: normal Milestone: 8.1
Component: BOOK Version: SVN
Severity: normal Keywords:


Per distro-list, the new version of Gjs has been ported to mozjs35.


Following up from the announcement about SpiderMonkey 31 [1], I've released GJS 1.47.90 which depends on SpiderMonkey 38 (variously known as mozjs38, js38). Since the GNOME feature freeze is now in effect, 38 is the version that we will use in GNOME 3.24.

SpiderMonkey 38 may need to be packaged for your distribution. The official location to download the source is: [2]

If you intend to package it, this commit in JHBuild might be a good starting point: [3]

Several configure flags and patches are listed there, and I will attempt to explain them here so you can decide if they are appropriate for your distribution.

- --enable-posix-nspr-emulation: You can eliminate the dependency on NSPR if you use this flag.
- --with-system-zlib, --enable-system-ffi, --with-system-icu: These flags prevent mozjs38 from building its own embedded copies of these libraries.
- --with-intl-api: This is required for full functionality of GJS. If you need to disable it, you should also disable the corresponding testLocale unit tests in GJS, but that is not recommended.
- mozjs38-fix-tracelogger.patch: I took this one from an Ubuntu PPA.
- mozjs38-release-number.patch: I think this patch might not be necessary if you ensure the PYTHON environment variable is set.
- mozjs38-shell-version.patch, mozjs38-pkg-config-version.patch: SpiderMonkey is not parallel installable as released, which is a bad situation for distributions. I have opened this Mozilla bug [4], but they will not backport any fixes to 38 since it's not the current release.
- mozjs38-install-name.patch: This is only necessary for macOS.
- mozjs38-1269317.patch: This is the backported fix for a bug that causes crashes when when mozjs38 is compiled with GCC 6 or later. Specifically, gnome-shell will not work without this patch.

If your distribution already packages SpiderMonkey 38, you may nonetheless want to look at the above options and make sure your current packaging is conforming.

Future plans: I intend to continue porting GJS to subsequent ESRs (Extended Support Releases) of SpiderMonkey, in order to keep pace with modern Javascript features and performance improvements. I am planning to reach SpiderMonkey 45 and then 52 during the GNOME 3.26 release cycle.

Best regards,
Philip Chimento


I'll also need to create a consolidated patch for this.

Change History (4)

comment:1 by Douglas R. Reno, 5 years ago

Owner: changed from blfs-book@… to Douglas R. Reno
Status: newassigned

comment:2 by Douglas R. Reno, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r18545

comment:3 by bdubbs@…, 5 years ago

Milestone: 8.1m8.1

Milestone renamed

comment:4 by bdubbs@…, 5 years ago

Milestone: m8.18.1

Milestone renamed

Note: See TracTickets for help on using tickets.