From d30b45fb2e507af98c3a958d159be3402a7a7bd1 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 5 Sep 2020 04:32:41 +0100 Subject: [PATCH] fix(svg): disable rsvg by default When SVG support is enabled via librsvg, launching builds of Emacs 27.1 or later from the Finder into GUI mode will crash Emacs if the fancy startup screen is used. This crash has been observed with librsvg 2.46.4, 2.48.7 and 2.48.8. Hence SVG image support is now disabled by default. Should you need it, you will need to disable the startup screen to avoid Emacs crashing, by putting this in your init.el: (setq inhibit-startup-screen t) The cause of the issue seems to be the `image-size` function as called from `use-fancy-splash-screens-p`. --- README.md | 1 + build-emacs-for-macos | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d797219..92d68cd 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Options: --[no-]native-comp-macos-fixes Enable/disable fix based on feature/native-comp-macos-fixes branch (default: enabled if native-comp supported) --[no-]launcher Enable/disable embedded launcher script (default: enabled if native-comp is enabled) + --rsvg Enable SVG image support via librsvg, can yield a unstable build (default: disabled) --no-titlebar Apply no-titlebar patch (default: disabled) --no-frame-refocus Apply no-frame-refocus patch (default: disabled) ``` diff --git a/build-emacs-for-macos b/build-emacs-for-macos index 074faec..a7e69f1 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -306,6 +306,7 @@ class Build configure_flags << '--with-xwidgets' end configure_flags << '--with-nativecomp' if options[:native_comp] + configure_flags << '--without-rsvg' unless options[:rsvg] run_cmd './configure', *configure_flags @@ -793,10 +794,11 @@ end if __FILE__ == $PROGRAM_NAME cli_options = { + macos_fixes: true, native_fast_boot: true, parallel: Etc.nprocessors, - xwidgets: true, - macos_fixes: true + rsvg: false, + xwidgets: true } OptionParser.new do |opts| @@ -850,6 +852,11 @@ if __FILE__ == $PROGRAM_NAME cli_options[:launcher] = v end + opts.on('--rsvg', 'Enable SVG image support via librsvg, ' \ + 'can yield a unstable build (default: disabled)') do + cli_options[:rsvg] = true + end + opts.on('--no-titlebar', 'Apply no-titlebar patch (default: disabled)') do cli_options[:no_titlebar] = true end