GNU bug report logs - #33126
26.1; xpm2 broken in MacOSX

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>

Date: Tue, 23 Oct 2018 14:04:02 UTC

Severity: normal

Found in version 26.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33126 in the body.
You can then email your comments to 33126 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33126; Package emacs. (Tue, 23 Oct 2018 14:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 23 Oct 2018 14:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; xpm2 broken in MacOSX
Date: Tue, 23 Oct 2018 22:02:06 +0800
; This code inserts four images
; 1 - a correct checkerboard
; 2 - an incorrect blank image of the wrong size
; 3 - a correct "blarg"
; 4 - a correct checkerboard
; but the middle two images should look identical.

(defvar chex (create-image "/* XPM */
static char * chex_xpm[] = {
\"32 32 2 1\",
\"* c #ffff00\",
\". c #00ff00\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"****....****....****....****....\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
\"....****....****....****....****\",
};" 'xpm t)
  "32x32 pixel yellow and green checker board.")

(defvar xpm2 (create-image "! XPM2
16 7 2 1
* c #000000
. c #ffffff
**..*...........
*.*.*...........
**..*..**.**..**
*.*.*.*.*.*..*.*
**..*..**.*...**
...............*
.............**." 'xpm t)
  "The xpm2 example at https://en.wikipedia.org/wiki/X_PixMap#Comparison_with_other_formats")

(defvar xpm3 (create-image "/* XPM */
static char * blarg_xpm[] = {
\"16 7 2 1\",
\"* c #000000\",
\". c #ffffff\",
\"**..*...........\",
\"*.*.*...........\",
\"**..*..**.**..**\",
\"*.*.*.*.*.*..*.*\",
\"**..*..**.*...**\",
\"...............*\",
\".............**.\"
};" 'xpm t)
  "The xpm3 example at https://en.wikipedia.org/wiki/X_PixMap#Comparison_with_other_formats")

(progn
  (insert "\n") (insert-image chex)
  (insert "\n") (insert-image xpm2)
  (insert "\n") (insert-image xpm3)
  (insert "\n") (insert-image chex))

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511))
 of 2018-05-31 built on builder10-10.porkrind.org
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 204288 9229)
 (symbols 48 20206 1)
 (miscs 40 70 171)
 (strings 32 28845 1721)
 (string-bytes 1 764502)
 (vectors 16 35070)
 (vector-slots 8 718022 13590)
 (floats 8 48 72)
 (intervals 56 205 0)
 (buffers 992 12))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33126; Package emacs. (Wed, 24 Oct 2018 11:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 33126 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
Cc: 33126 <at> debbugs.gnu.org
Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX
Date: Wed, 24 Oct 2018 12:17:36 +0100
[Message part 1 (text/plain, inline)]
On Tue, Oct 23, 2018 at 10:02:06PM +0800, Devon Sean McCullough wrote:
> ; This code inserts four images
> ; 1 - a correct checkerboard
> ; 2 - an incorrect blank image of the wrong size
> ; 3 - a correct "blarg"
> ; 4 - a correct checkerboard
> ; but the middle two images should look identical.

Confirmed. I found this in image.c:

/* XPM support functions for NS where libxpm is not available.
   Only XPM version 3 (without any extensions) is supported.  */

I suppose to get xpm2 support you’ll have to find a version of libxpm
somewhere.

There is an error logged in *Messages*, perhaps it should specify XPM3
per the attached patch.
-- 
Alan Third
[0001-Improve-XPM-load-failure-message-bug-33126.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33126; Package emacs. (Wed, 24 Oct 2018 15:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 33126 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: Emacs-Hacker2018 <at> jovi.net, 33126 <at> debbugs.gnu.org
Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX
Date: Wed, 24 Oct 2018 18:06:13 +0300
> Date: Wed, 24 Oct 2018 12:17:36 +0100
> From: Alan Third <alan <at> idiocy.org>
> Cc: 33126 <at> debbugs.gnu.org
> 
> Confirmed. I found this in image.c:
> 
> /* XPM support functions for NS where libxpm is not available.
>    Only XPM version 3 (without any extensions) is supported.  */
> 
> I suppose to get xpm2 support you’ll have to find a version of libxpm
> somewhere.
> 
> There is an error logged in *Messages*, perhaps it should specify XPM3
> per the attached patch.

Yes.  In addition, I'd add an entry about this in PROBLEMS.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33126; Package emacs. (Thu, 25 Oct 2018 10:06:01 GMT) Full text and rfc822 format available.

Message #14 received at 33126 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Emacs-Hacker2018 <at> jovi.net, 33126 <at> debbugs.gnu.org
Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX
Date: Thu, 25 Oct 2018 11:04:52 +0100
[Message part 1 (text/plain, inline)]
On Wed, Oct 24, 2018 at 06:06:13PM +0300, Eli Zaretskii wrote:
> > Date: Wed, 24 Oct 2018 12:17:36 +0100
> > From: Alan Third <alan <at> idiocy.org>
> > Cc: 33126 <at> debbugs.gnu.org
> > 
> > Confirmed. I found this in image.c:
> > 
> > /* XPM support functions for NS where libxpm is not available.
> >    Only XPM version 3 (without any extensions) is supported.  */
> > 
> > I suppose to get xpm2 support you’ll have to find a version of libxpm
> > somewhere.
> > 
> > There is an error logged in *Messages*, perhaps it should specify XPM3
> > per the attached patch.
> 
> Yes.  In addition, I'd add an entry about this in PROBLEMS.

Done. I created a subsection for macOS, although I’m not sure if this
is actually a macOS specific issue, or general to systems lacking X11
libraries (MS Windows?).
-- 
Alan Third
[0001-Improve-XPM-load-failure-message-bug-33126.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33126; Package emacs. (Thu, 25 Oct 2018 13:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 33126 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: Emacs-Hacker2018 <at> jovi.net, 33126 <at> debbugs.gnu.org
Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX
Date: Thu, 25 Oct 2018 16:20:23 +0300
> Date: Thu, 25 Oct 2018 11:04:52 +0100
> From: Alan Third <alan <at> idiocy.org>
> Cc: Emacs-Hacker2018 <at> jovi.net, 33126 <at> debbugs.gnu.org
> 
> Done. I created a subsection for macOS, although I’m not sure if this
> is actually a macOS specific issue, or general to systems lacking X11
> libraries (MS Windows?).

The MS Windows build of Emacs uses a hacked version of the X11 libxpm
library, so this problem doesn't exist there.

> +* Runtime problems specific to macOS
> +
> +** macOS doesn't come with libxmp, so only XPM3 is supported.
                              ^^^^^^
A typo.




Reply sent to Alan Third <alan <at> idiocy.org>:
You have taken responsibility. (Thu, 25 Oct 2018 15:16:02 GMT) Full text and rfc822 format available.

Notification sent to Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>:
bug acknowledged by developer. (Thu, 25 Oct 2018 15:16:02 GMT) Full text and rfc822 format available.

Message #22 received at 33126-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Emacs-Hacker2018 <at> jovi.net, 33126-done <at> debbugs.gnu.org
Subject: Re: bug#33126: 26.1; xpm2 broken in MacOSX
Date: Thu, 25 Oct 2018 16:15:08 +0100
On Thu, Oct 25, 2018 at 04:20:23PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 25 Oct 2018 11:04:52 +0100
> > From: Alan Third <alan <at> idiocy.org>
> > Cc: Emacs-Hacker2018 <at> jovi.net, 33126 <at> debbugs.gnu.org
> > 
> > Done. I created a subsection for macOS, although I’m not sure if this
> > is actually a macOS specific issue, or general to systems lacking X11
> > libraries (MS Windows?).
> 
> The MS Windows build of Emacs uses a hacked version of the X11 libxpm
> library, so this problem doesn't exist there.
> 
> > +* Runtime problems specific to macOS
> > +
> > +** macOS doesn't come with libxmp, so only XPM3 is supported.
>                               ^^^^^^
> A typo.

Sorted and pushed, thanks.
-- 
Alan Third




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.