When I try to open jpeg images on a new emacs build I get the error message

Cannot display image: (This Emacs mishandles this image file type)

I compiled on Debian Jessie and the configure commands output is below:

It can open some PNG files but not all, and JPEG files don't open at all.

I have a version running Debian Buster/Sid version and all the files display normally in that (stock) installation.

Are there some missing files which could be the cause, or could it because the standard Debian Jessie libraries it was build against are not up to scratch?

./configure --with-xwidgets --with-modules --with-xml2 --with-cairo --with-gnutls --with-xft --with-rsvg --with-gconf

Configured for 'x86_64-pc-linux-gnu'.

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -std=gnu99 -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng12
  Does Emacs use -lrsvg-2?                                no
  Does Emacs use cairo?                                   yes
  Does Emacs use imagemagick?                             no
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   no
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    no
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                no
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                yes
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets (requires gtk3)?            yes
  • Do you see the same thing when you start Emacs using emacs -Q (no init file)? – Drew Sep 13 '17 at 15:02
  • 1
    This could be related to bug#22916. Keep in mind the Cairo port is currently unmaintained and has several known issues, so I'd recommend against it unless you're interested in debugging or contributing to it. – Basil Dec 7 '17 at 4:00
  • Also note that the Cairo port did not originally support image formats other than PNG, and I don't know whether this has changed since. – Basil Dec 7 '17 at 4:25

Complile without cairo. Worked for me.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.