Subject: Re: bug#20124: Building emacs and libjpeg not found on Fedora 22

From: Petr Hracek <[email-masked]>
Date: Tue, 17 Mar 2015 12:35:23 +0100

On 03/17/2015 12:02 PM, Eli Zaretskii wrote:
>> Date: Tue, 17 Mar 2015 10:47:10 +0100
>> From: Petr Hracek <[email-masked]>
>>
>> configure: error: The following required libraries were not found:
>>        libjpeg
>> Maybe some development libraries/packages are missing?
>> If you don't want to link with them give
>>        --with-jpeg=no
>> as options to configure
>>
>> I have installed following libjpeg versions:
>> libjpeg-turbo-1.4.0-1.fc22
>> libjpeg-turbo-devel-1.4.0-1.fc22.
>> (http://koji.fedoraproject.org/koji/buildinfo?buildID=605282)
>>
>> The first package delivers SO libraries like so.62.0
>> second one delivers headers and libjpeg.so library
>>
>> Do you have any idea where could be a problem?
> Look in the config.log file for compiler error messages when it probed
> for libjpeg availability -- those error messages should give you a
> clue about what's wrong with your system configuration.
Well, in config.log I see:

configure:13878: checking for jpeg_destroy_compress in -ljpeg
configure:13903: gcc -o conftest  -DMAIL_USE_LOCKF -O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 
-grecord-gcc-switches  -m64 -mtune=generic -pthread 
-I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16  
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 
-I/usr/include/ImageMagick-6  -pthread -I/usr/include/gtk-3.0 
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include 
-I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16  -Wl,-z,relro 
conftest.c *-ljpeg*  -lXrender -lXft  -lgtk-3 -lgdk-3 -lpangocairo-1.0 
-lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 
-lgobject-2.0 -lglib-2.0 -lMagickWand-6.Q16 -lMagickCore-6.Q16  -lrsvg-2 
-lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo  -lX11 
-lpthread -ldbus-1  >&5
configure:13903: $? = 0
configure:13912: result: yes
*configure:13937: WARNING: libjpeg found, but not version 6b or later*
configure:13993: checking png.h usability

Here -ljpeg is defined but belowe not.
and

configure:14301: checking for EGifPutExtensionLast in -lgif
configure:14326: gcc -o conftest  -DMAIL_USE_LOCKF -O2 -g -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector-strong --param=ssp-buffer-size=4 
-grecord-gcc-switches  -m64 -mtune=generic -pthread 
-I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16  
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 
-I/usr/include/ImageMagick-6  -pthread -I/usr/include/gtk-3.0 
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 
-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include 
-I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo 
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16 
-I/usr/include/freetype2 -I/usr/include/libpng16  -Wl,-z,relro 
conftest.c -lgif  -lXrender -lXft  -lgtk-3 -lgdk-3 -lpangocairo-1.0 
-lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 
-lgobject-2.0 -lglib-2.0  -lMagickWand-6.Q16 -lMagickCore-6.Q16  
-lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 
-lcairo  -lX11 -lpthread   -ldbus-1 >&5
configure:14326: $? = 0
configure:14335: result: yes
configure:14421: error: The following required libraries were not found:
      libjpeg
Maybe some development libraries/packages are missing?
If you don't want to link with them give
      --with-jpeg=no
as options to configure

Emacs build log is in the attachment.

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: [email-masked]