Subject: In Linux Emacs 27.1 rejects custom toolbar icons

From: David McCracken <[email-masked]>
Date: Sun, 26 May 2024 13:54:07 -0700

I decided that I could test 26.3 on the newer Ubuntu by copying some of 
the Emacs files from the other computer. I copied the emacs executable 
(located in /etc/alternatives/emacs pointed to by /usr/bin/emacs 
symlink) and recursively copied /usr/share/emacs/26.3 to 
/usr/share/emacs. I didn't change /usr/share/emacs/site-lisp or any of 
the files in /etc/emacs or usr/lib/emacs. Directly invoking the 26.3 
executable revealed that it wanted 
/usr/lib/x86_64-linux-gnu/libotf.so.0. The 27.1 installation has only 
libotf.so.1 and libotf.so.1.0.0, so I copied libotf.so.0 into the 
directory. Then 26.3 ran and correctly displayed my toolbar icons 
located in ~/icons. Unlike the 27.1 bug report, in this case the 
reporter does not show Recent messages Invalid XPM3 file.

To investigate whether the problems are caused by libotf.so, I copied 
libotf.so.0 over libotf.so.1 but then emacs 27.1 complained about a 
missing symbol definition. I did the inverse, copying libotf.so.1 over 
libotf.so.0. Emacs 26.3 was able to run with this. It continued to show 
my icons and not report the files as invalid. Therefore, the root of the 
problems is either in the emacs executable or /usr/share/emacs/27.1.

In my Windows computer with Emacs 29.1 the bug reporter does not 
complain about my icon files. The name of the char array in the xpm file 
seems to be immaterial. I tried many alternatives to * filespec, 
including simply filespec and blank, and nothing changed the 27.1 bug 
report and failure to display the icons. I tested these alternatives in 
the Windows computer with Emacs 29.1 and they didn't change anything. I 
think this is essentially a comment, especially considering that 
definining an unnamed array is not legal in C. Even if this were a 
problem, it would not account for why Linux-Emacs 27.1 rejects its own 
xpm files if located anywhere but its own images directory.

Although I would like to help get to the bottom of these problems, I 
would still like to know how to install an Emacs downrev in Linux. It is 
easy in Windows since all versions are available in zip files that I can 
unzip anywhere I want.