I forgot to mention one more thing.. I also set CPPFLAGS="-fgnu89-inline" and CFLAGS="-I/home/kmodi/usr_local/6/include" in the ./configure line. Here's more info from the config.log configure:14946: checking gif_lib.h usability configure:14946: gcc -std=gnu99 -c -I/home/kmodi/usr_local/6/include -pthread -I/home/kmodi/usr_local/6/include/libpng12 -I/home/kmodi/usr_local/6/include/cairo -I/home/kmodi/usr_local/6/include/glib-2.0 -I/home/kmodi/usr_local/6/lib/glib-2.0/include -I/usr/include/freetype2 -I/home/kmodi/usr_local/6/include/libpng12 -I/cad/WORK/apps/gnu/linux/x86_64/6/include/pixman-1 -I/usr/include/librsvg-2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -fgnu89-inline conftest.c >&5 configure:14946: $? = 0 configure:14946: result: yes configure:14946: checking gif_lib.h presence configure:14946: gcc -std=gnu99 -E -fgnu89-inline conftest.c configure:14946: $? = 0 configure:14946: result: yes configure:14946: checking for gif_lib.h configure:14946: result: yes configure:14950: checking for GifMakeMapObject in -lgif configure:14975: gcc -std=gnu99 -o conftest -I/home/kmodi/usr_local/6/include -pthread -I/home/kmodi/usr_local/6/include/libpng12 -I/home/kmodi/usr_local/6/include/cairo -I/home/kmodi/usr_local/6/include/glib-2.0 -I/home/kmodi/usr_local/6/lib/glib-2.0/include -I/usr/include/freetype2 -I/home/kmodi/usr_local/6/include/libpng12 -I/cad/WORK/apps/gnu/linux/x86_64/6/include/pixman-1 -I/usr/include/librsvg-2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -fgnu89-inline conftest.c -lgif -lX11 >&5 /usr/bin/ld: cannot find -lgif On Thu, Sep 10, 2015 at 12:58 AM Kaushal Modi wrote: > Hi, > > The OS at my work recently upgraded from RHEL 5 to RHEL 6 and I needed to > rebuild my emacs. I am building using the latest version from the git > master branch. > > The builds on RHEL 5 were smooth. > > But on RHEL 6, I need to pass the --with-gif=no option. > > I used "/home/kmodi/usr_local/6" as prefix when installing giflib. > > Here are the things I ensured for a clean build: > - Use "make bootstrap" (just the ./configure call in there is modified > with my custom --prefix and now with this --with-gif=no) > - Ensure that LD_LIBRARY_PATH, PKG_CONFIG_PATH and INCLUDE_PATH are set > correctly containing the paths to where I have the giflib installed (in the > correct order, leftmost). > - LD_LIBRARY_PATH contained ""/home/kmodi/usr_local/6/lib" > - PKG_CONFIG_PATH contained ""/home/kmodi/usr_local/6/lib/pkgconfig" > - INCLUDE_PATH contained ""/home/kmodi/usr_local/6/include" > - Installed giflib 5.1.1 (to make this work, I also installed/uninstalled > older versions of this library: giflib 4.1.3, giflib 4.1.4). But configure > is simply not able to find this lib! > - Also tried setting this env var but that did not help > setenv LIBGIF "-L/home/kmodi/usr_local/6/lib -lgif " > > This is the failure message I get: > > checking for TIFFGetVersion in -ltiff... yes > checking gif_lib.h usability... yes > checking gif_lib.h presence... yes > checking for gif_lib.h... yes > checking for GifMakeMapObject in -lgif... no > checking for EGifPutExtensionLast in -lgif... no > checking for EGifPutExtensionLast in -lungif... no > configure: error: The following required libraries were not found: > libgif/libungif > > But when I grep for GifMakeMapObject in the include/ dir, I see that it's > there in gif_lib.h: > > kmĀ²~/usr_local/:6/include> grep "GifMakeMapObject" gif_lib.h > 239:extern ColorMapObject *GifMakeMapObject(int ColorCount, > > FWIW, when I build emacs with the --with-gif=no option, I get the below > value when I do C-h v system-configuration-features: > > "XPM JPEG TIFF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY ACL > LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 > X11" > > Can someone please help with what I am missing here? Has anyone faced this > problem and successfully resolved it? > > Thanks. >