Subject: Re: bug#64908: 29.1; svg parse failure

From: Eli Zaretskii <[email-masked]>
Date: Fri, 28 Jul 2023 09:05:48 +0300

> From: Daniel Vianna <[email-masked]>
> Date: Fri, 28 Jul 2023 11:10:45 +1000
> 
> 1. Compile emacs 29 with 
> 
> ```
> sudo dnf builddep -y emacs
> sudo dnf install -y libtree-sitter-devel wxBase-devel wxGTK3-devel libwebp-devel
> 
> CC='CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -
> grecord-gcc-switches -pipe -Wall -Werror=format-security -
> Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -
> specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -
> specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -
> fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
> LDFLAGS=-Wl,-z,relro gcc'
> PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig

I don't think Emacs supports FLTO (but I'm not sure that's related to
the problem you report, either).

> 3. Run emacs with 
> $ emacs --init-directory=$HOME/.emacs.d.off/init.el
> 
> 4. Open ~/.local/share/emacs/29.1/etc/images/splash.svg
> 
> 5. Open
>     ~/.emacs.d.off/elpa/treemacs-20230719.2015/icons/default/vsc/dir-src-open.svg
> or any other svg in that directory.
> 
> Desired result: Both 4. and 5. lead to images being rendered by emacs.
> Actual result: Step 4. renders an image, step 5. does not.

I tried a couple of SVG files from that distribution, and I have no
problems displaying them in Emacs 29.  But I did that in "emacs -Q"
without loading treemacs

My suggestions:

  . try visiting the images in "emacs -Q"
  . if "emacs -Q" still shows the problem, try building Emacs 29.1
    with the default configuration switches, and see if the problem
    persists when you do not load treemacs, in "emacs -Q"
  . if the problem persists in the default build, it could be due to
    the version of librsvg you have installed, so try to upgrade it or
    downgrade it

If none of the above helps, I guess we'll need some SVG expert around
here to see what is special about those problematic SVG images.

Thanks.