unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Unable to find libgif/libungif on RHEL 6
@ 2015-09-10  4:58 Kaushal Modi
  2015-09-10  5:14 ` Kaushal Modi
  2015-09-10 10:06 ` Paul Eggert
  0 siblings, 2 replies; 12+ messages in thread
From: Kaushal Modi @ 2015-09-10  4:58 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 2260 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 2870 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10  4:58 Unable to find libgif/libungif on RHEL 6 Kaushal Modi
@ 2015-09-10  5:14 ` Kaushal Modi
  2015-09-10 10:06 ` Paul Eggert
  1 sibling, 0 replies; 12+ messages in thread
From: Kaushal Modi @ 2015-09-10  5:14 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 4087 bytes --]

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 <kaushal.modi@gmail.com>
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.
>

[-- Attachment #2: Type: text/html, Size: 5155 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10  4:58 Unable to find libgif/libungif on RHEL 6 Kaushal Modi
  2015-09-10  5:14 ` Kaushal Modi
@ 2015-09-10 10:06 ` Paul Eggert
  2015-09-10 12:15   ` Kaushal Modi
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Eggert @ 2015-09-10 10:06 UTC (permalink / raw)
  To: Kaushal Modi, Emacs developers

Kaushal Modi wrote:

> But on RHEL 6, I need to pass the --with-gif=no option.

Yes, that's what I typically do on RHEL 6.  Apparently Red Hat forgot to put 
giflib-devel into RHEL 6.  See:

https://bugzilla.redhat.com/show_bug.cgi?id=659854

> I used "/home/kmodi/usr_local/6" as prefix when installing giflib.

Welcome to package configuration hell.  Rather than fiddle with all those 
settings (something I've never done for RHEL 6) you may find it simpler to 
install a properly-configured giflib.  See:

http://rpmfind.net/linux/rpm2html/search.php?query=giflib-devel

and look for "CentOS 6".



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 10:06 ` Paul Eggert
@ 2015-09-10 12:15   ` Kaushal Modi
  2015-09-10 14:30     ` Paul Eggert
  2015-09-10 15:16     ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Kaushal Modi @ 2015-09-10 12:15 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Thanks for the info. I was going bonkers.

I'll request the Linux admin team if they can install this.

This is on my work machine where I don't have sudo access. So I need to
install everything (emacs, tmux, required libs, many other things) in my
$HOME.

I couldn't find giflib-devel source anywhere. Do you know how to build
giflib from source that does the same thing as giflib-devel?

I don't think I can install RPM packages in my $HOME without sudo. Can I?

Thanks.
On Sep 10, 2015 6:06 AM, "Paul Eggert" <eggert@cs.ucla.edu> wrote:

> Kaushal Modi wrote:
>
> But on RHEL 6, I need to pass the --with-gif=no option.
>>
>
> Yes, that's what I typically do on RHEL 6.  Apparently Red Hat forgot to
> put giflib-devel into RHEL 6.  See:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=659854
>
> I used "/home/kmodi/usr_local/6" as prefix when installing giflib.
>>
>
> Welcome to package configuration hell.  Rather than fiddle with all those
> settings (something I've never done for RHEL 6) you may find it simpler to
> install a properly-configured giflib.  See:
>
> http://rpmfind.net/linux/rpm2html/search.php?query=giflib-devel
>
> and look for "CentOS 6".
>

[-- Attachment #2: Type: text/html, Size: 2044 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 12:15   ` Kaushal Modi
@ 2015-09-10 14:30     ` Paul Eggert
  2015-09-10 15:16     ` Stefan Monnier
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Eggert @ 2015-09-10 14:30 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Emacs developers

Kaushal Modi wrote:
> I couldn't find giflib-devel source anywhere. Do you know how to build
> giflib from source that does the same thing as giflib-devel?

You can find instructions here:

https://apps.fedoraproject.org/packages/giflib-devel/sources/spec

I haven't done it myself.

> I don't think I can install RPM packages in my $HOME without sudo. Can I?

Not in a useful way, no.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 12:15   ` Kaushal Modi
  2015-09-10 14:30     ` Paul Eggert
@ 2015-09-10 15:16     ` Stefan Monnier
  2015-09-10 15:27       ` Kaushal Modi
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2015-09-10 15:16 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Paul Eggert, Emacs developers

> I don't think I can install RPM packages in my $HOME without sudo. Can I?

Depending what you mean by that, yes, it can be done.
Just unpack the tarball with rpm2cpio+cpio.

This will typically then require playing with LD_LIBRARY_PATH or
somesuch, tho.

I've done it in the past and I'm glad I don't need to do any more.


        Stefan



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 15:16     ` Stefan Monnier
@ 2015-09-10 15:27       ` Kaushal Modi
  2015-09-10 18:36         ` Paul Eggert
  2015-09-10 21:11         ` Wolfgang Jenkner
  0 siblings, 2 replies; 12+ messages in thread
From: Kaushal Modi @ 2015-09-10 15:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Paul Eggert, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

I just tried the rpm2cpio+cpio approach but that too didn't work.
One difference I noticed is that if I build giflib from source, it installs
the .so files in lib/.
But if I extract from the cpio, they get installed in lib64/ (Note that I
had to extract from both giflib rpm and giflib-devel rpm because
giflib-devel rpm lib64 simply had symbolic links which are supposed to link
to the .so files extracted from the giflib rpm).

I updated LD_LIBRARY_PATH to include the new lib64/ dir.

That leads me to a question: Just as we have LIBOTF_CFLAGS, LIBOTF_LIBS,
can we not have LIBGIF_CFLAGS and LIBGIF_LIBS?
I tried setting LIBGIF env var to "-L/path/to/the/lib64 -lgif" before doing
./configure.. but that did not help.

Something else is not right in my system.. but at least I am glad I can
still build emacs, be it without gif.

configure finds the gif_lib.h, I find that GifMakeMapObject reference in
that .h but somehow configure thinks that it's not there.

My package building fu is limited to this so I cannot debug why configure
thinks that GifMakeMapObject is not found in -lgif.



On Thu, Sep 10, 2015 at 11:16 AM Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > I don't think I can install RPM packages in my $HOME without sudo. Can I?
>
> Depending what you mean by that, yes, it can be done.
> Just unpack the tarball with rpm2cpio+cpio.
>
> This will typically then require playing with LD_LIBRARY_PATH or
> somesuch, tho.
>
> I've done it in the past and I'm glad I don't need to do any more.
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 2156 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 15:27       ` Kaushal Modi
@ 2015-09-10 18:36         ` Paul Eggert
  2015-09-10 21:11         ` Wolfgang Jenkner
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Eggert @ 2015-09-10 18:36 UTC (permalink / raw)
  To: Kaushal Modi, Stefan Monnier; +Cc: Emacs developers

Kaushal Modi wrote:
> Something else is not right in my system.. but at least I am glad I can
> still build emacs, be it without gif.

Yes, that's what I do.  Your other problems can undoubtedly be fixed by using 
the proper combination of environment variables and configure options, though 
these days it's typically not worth the trouble.

> Just as we have LIBOTF_CFLAGS, LIBOTF_LIBS,
> can we not have LIBGIF_CFLAGS and LIBGIF_LIBS?

It'd be a pain, as LIBOTF_CFLAGS is generated automatically by configure.ac via 
EMACS_CHECK_MODULES via PKG_CHECK_MODULES via pkg-config, but libgif typically 
isn't packaged and so we'd have to do a lot of stuff by hand in configure.ac. 
This what we did ten or twenty years ago but nowadays it's typically not worth 
the trouble.  Builders who care about this and are expert enough can set env 
vars and configure options accordingly, which is about the best that can be 
expected for this messy area.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 15:27       ` Kaushal Modi
  2015-09-10 18:36         ` Paul Eggert
@ 2015-09-10 21:11         ` Wolfgang Jenkner
  2015-09-11  2:51           ` Kaushal Modi
  1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Jenkner @ 2015-09-10 21:11 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Paul Eggert, Stefan Monnier, Emacs developers

On Thu, Sep 10 2015, Kaushal Modi wrote:

> I tried setting LIBGIF env var to "-L/path/to/the/lib64 -lgif" before doing
> ./configure.. but that did not help.

./configure ... LDFLAGS="-L/path/to/the/lib64 -lgif" CPPFLAGS=-I/path/to/gifincludedir

should work, I think.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-10 21:11         ` Wolfgang Jenkner
@ 2015-09-11  2:51           ` Kaushal Modi
  2015-09-11 12:23             ` Wolfgang Jenkner
  0 siblings, 1 reply; 12+ messages in thread
From: Kaushal Modi @ 2015-09-11  2:51 UTC (permalink / raw)
  To: Stefan Monnier, Paul Eggert, Emacs developers, wjenkner

[-- Attachment #1: Type: text/plain, Size: 5092 bytes --]

The LDFLAGS did the magic, thank you!

Now my config.log ends with

#define EMACS_CONFIG_FEATURES "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND
DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11"

(I wonder why setting the $LD_LIBRARY_PATH and $PKG_CONFIG_PATH env vars
did not help.)

Here's my emacs build csh script in the case it could be helpful to someone:

#!/bin/tcsh -f
# emacs build script for non-root users (tested to work for RHEL 6)

# Usage: source mybuild.csh <VERSION or BRANCH>
# Example: source mybuild.csh emacs-24
#          source mybuild.csh master
# For RHEL 6, do "setenv MY_OSREV 6"
# ${HOME}/usr_local/${MY_OSREV} is the directory that I use as --prefix for
building libraries locally when the default library does not exist or is
older than the requirements
# I already have the env vars PATH, LD_LIBRARY_PATH, PKG_CONFIG_PATH and
INCLUDE_PATH to include the respective directories
${HOME}/usr_local/${MY_OSREV}
# Ensure that PKG_CONFIG_PATH has /usr/share/pkgconfig for xproto.pc and
related files. This is necessary for XFT and related X11 features..
otherwise the fonts will look horrible.

set emacs_gdb_build = 0

git checkout master
git fetch --all
git reset --hard $argv[1]

# If $argv[1] is master, basename $argv[1] -> master
# If $argv[1] is origin/emacs-24.5, basename $argv[1] -> emacs-24.5
if ( ${emacs_gdb_build} ) then
    setenv MY_EMACS_INSTALL_DIR
"${HOME}/usr_local/apps/${MY_OSREV}/emacs/`basename $argv[1]`_debug"
else
    setenv MY_EMACS_INSTALL_DIR
"${HOME}/usr_local/apps/${MY_OSREV}/emacs/`basename $argv[1]`"
endif
# setenv MY_EMACS_INSTALL_DIR
"${HOME}/usr_local/apps/${MY_OSREV}/emacs/test"
mkdir -p ${MY_EMACS_INSTALL_DIR}

# Basic configure command
setenv MY_EMACS_CONFIGURE "./configure --prefix=${MY_EMACS_INSTALL_DIR}"

# Initialize the configure flag vairables
set emacs_configure_CFLAGS   = ''
set emacs_configure_CXXFLAGS = ''
set emacs_configure_CPPFLAGS = ''
set emacs_configure_LDFLAGS  = ''

set emacs_configure_CPPFLAGS = 'CPPFLAGS="'"-fgnu89-inline
-I${HOME}/usr_local/${MY_OSREV}/include -I/usr/include/freetype2
-I/usr/include"
# Below LDFLAGS setup is required for emacs to build with the GIF feature
set emacs_configure_LDFLAGS  =
'LDFLAGS="'"-L${HOME}/usr_local/${MY_OSREV}/lib64 -lgif"

# For Debug
if ( ${emacs_gdb_build} ) then
    set emacs_configure_CFLAGS   = 'CFLAGS="'"-ggdb3 -O0"
    set emacs_configure_CXXFLAGS = 'CXXFLAGS="'"-ggdb3 -O0"
    set emacs_configure_LDFLAGS  = "${emacs_configure_LDFLAGS} -ggdb3"
endif

# Close the double quotes
if ( ! ( "${emacs_configure_CFLAGS}" == "" ) ) then
    set emacs_configure_CFLAGS = "${emacs_configure_CFLAGS}"'"'
endif
if ( ! ( "${emacs_configure_CXXFLAGS}" == "" ) ) then
    set emacs_configure_CXXFLAGS = "${emacs_configure_CXXFLAGS}"'"'
endif
if ( ! ( "${emacs_configure_CPPFLAGS}" == "" ) ) then
    set emacs_configure_CPPFLAGS = "${emacs_configure_CPPFLAGS}"'"'
endif
if ( ! ( "${emacs_configure_LDFLAGS}" == "" ) ) then
    set emacs_configure_LDFLAGS = "${emacs_configure_LDFLAGS}"'"'
endif

setenv MY_EMACS_CONFIGURE "${MY_EMACS_CONFIGURE}
${emacs_configure_CPPFLAGS} ${emacs_configure_CFLAGS}
${emacs_configure_CXXFLAGS} ${emacs_configure_LDFLAGS}"

echo ""
echo "  MY_EMACS_CONFIGURE = ${MY_EMACS_CONFIGURE}"
echo ""
echo "Waiting for 5 seconds .. Press Ctrl+C to cancel this installation."
sleep 5

\rm -f configure Makefile
make clean

if ( ! -e src/epaths.in.bkp ) then
    \cp src/epaths.in src/epaths.in.bkp
endif
\cp -f src/epaths.in.bkp src/epaths.in
perl -p -i -e 's/\/usr\/local/$ENV{"MY_EMACS_INSTALL_DIR"}/g' src/epaths.in

if ( ! -e GNUmakefile.bkp ) then
    \cp GNUmakefile GNUmakefile.bkp
endif
\cp -f GNUmakefile.bkp GNUmakefile
perl -p -i -e 's/\.\/configure/$ENV{"MY_EMACS_CONFIGURE"}/g' GNUmakefile

# Do NOT call autoreconf. "make bookstrap" below will call autoreconf with
# proper arguments.
# The `make bootstrap' step is required for a clean fresh install
if ( -f Makefile ) then
    make bootstrap
endif
make install

# I use the Exuberant ctags (now Universal ctags build from its github
repo). So rename the ctags binary and man that ships with emacs so that I
do not end up using the incorrect ctags.
if ( -e ${MY_EMACS_INSTALL_DIR}/bin/ctags ) then
    \mv ${MY_EMACS_INSTALL_DIR}/bin/ctags
${MY_EMACS_INSTALL_DIR}/bin/ctags_emacs
endif
if ( -e ${MY_EMACS_INSTALL_DIR}/share/man/man1/ctags.1.gz ) then
    \mv ${MY_EMACS_INSTALL_DIR}/share/man/man1/ctags.1.gz
${MY_EMACS_INSTALL_DIR}/share/man/man1/ctags_emacs.1.gz
endif

# unset all internal variables
unset {emacs_configure_CFLAGS}
unset {emacs_configure_CPPFLAGS}
unset {emacs_configure_CXXFLAGS}
unset {emacs_configure_LDFLAGS}

# end



On Thu, Sep 10, 2015 at 5:11 PM Wolfgang Jenkner <wjenkner@inode.at> wrote:

> On Thu, Sep 10 2015, Kaushal Modi wrote:
>
> > I tried setting LIBGIF env var to "-L/path/to/the/lib64 -lgif" before
> doing
> > ./configure.. but that did not help.
>
> ./configure ... LDFLAGS="-L/path/to/the/lib64 -lgif"
> CPPFLAGS=-I/path/to/gifincludedir
>
> should work, I think.
>

[-- Attachment #2: Type: text/html, Size: 7300 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-11  2:51           ` Kaushal Modi
@ 2015-09-11 12:23             ` Wolfgang Jenkner
  2015-09-11 14:04               ` Kaushal Modi
  0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Jenkner @ 2015-09-11 12:23 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Paul Eggert, Stefan Monnier, Emacs developers

On Fri, Sep 11 2015, Kaushal Modi wrote:

> The LDFLAGS did the magic, thank you!

Actually,

./configure ... LDFLAGS=-L/path/to/the/lib64 CPPFLAGS=-I/path/to/gifincludedir

should be enough since configure will add -lgif to LIBS anyway (or do
something else to that effect).

> (I wonder why setting the $LD_LIBRARY_PATH and $PKG_CONFIG_PATH env vars
> did not help.)

LD_LIBRARY_PATH is used at runtime by the dynamic linker ld.so(8),
whereas LDFLAGS belongs to the GNU buildsystem, see

(info "(autoconf) Preset Output Variables").

PKG_CONFIG_PATH is a search path for *.pc files, which giflib doesn't
install (as Paul already mentioned), see pkg-config(1).

There are some (completely untested) variations on the theme:

One could pass

LDFLAGS="-L/path/to/the/lib64 -Wl,-rpath=/path/to/the/lib64"

to configure and so avoid changing LD_LIBRARY_PATH.

Or, if you have the static lib64/libgif.a you could link emacs to it
instead (by simply moving away the lib64/libgif.so* you have in your
home directory before building emacs); in this case, you could even
completely remove the giflib stuff from your home directory after
building emacs.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Unable to find libgif/libungif on RHEL 6
  2015-09-11 12:23             ` Wolfgang Jenkner
@ 2015-09-11 14:04               ` Kaushal Modi
  0 siblings, 0 replies; 12+ messages in thread
From: Kaushal Modi @ 2015-09-11 14:04 UTC (permalink / raw)
  To: Stefan Monnier, Paul Eggert, Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]

Thanks Wolfgang!

I was able to make it work without -lgif in the LDFLAGS.
The rpms I extracted did not have libgif.a.

This is a very enlightening thread for me: Learnt about CentOS .rpm files
for RHEL, rpm2cpio, LDFLAGS vs LD_LIBRARY_PATH.

Thanks to everyone for the help :).

On Fri, Sep 11, 2015 at 8:36 AM Wolfgang Jenkner <wjenkner@inode.at> wrote:

> On Fri, Sep 11 2015, Kaushal Modi wrote:
>
> > The LDFLAGS did the magic, thank you!
>
> Actually,
>
> ./configure ... LDFLAGS=-L/path/to/the/lib64
> CPPFLAGS=-I/path/to/gifincludedir
>
> should be enough since configure will add -lgif to LIBS anyway (or do
> something else to that effect).
>
> > (I wonder why setting the $LD_LIBRARY_PATH and $PKG_CONFIG_PATH env vars
> > did not help.)
>
> LD_LIBRARY_PATH is used at runtime by the dynamic linker ld.so(8),
> whereas LDFLAGS belongs to the GNU buildsystem, see
>
> (info "(autoconf) Preset Output Variables").
>
> PKG_CONFIG_PATH is a search path for *.pc files, which giflib doesn't
> install (as Paul already mentioned), see pkg-config(1).
>
> There are some (completely untested) variations on the theme:
>
> One could pass
>
> LDFLAGS="-L/path/to/the/lib64 -Wl,-rpath=/path/to/the/lib64"
>
> to configure and so avoid changing LD_LIBRARY_PATH.
>
> Or, if you have the static lib64/libgif.a you could link emacs to it
> instead (by simply moving away the lib64/libgif.so* you have in your
> home directory before building emacs); in this case, you could even
> completely remove the giflib stuff from your home directory after
> building emacs.
>

[-- Attachment #2: Type: text/html, Size: 2031 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-09-11 14:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10  4:58 Unable to find libgif/libungif on RHEL 6 Kaushal Modi
2015-09-10  5:14 ` Kaushal Modi
2015-09-10 10:06 ` Paul Eggert
2015-09-10 12:15   ` Kaushal Modi
2015-09-10 14:30     ` Paul Eggert
2015-09-10 15:16     ` Stefan Monnier
2015-09-10 15:27       ` Kaushal Modi
2015-09-10 18:36         ` Paul Eggert
2015-09-10 21:11         ` Wolfgang Jenkner
2015-09-11  2:51           ` Kaushal Modi
2015-09-11 12:23             ` Wolfgang Jenkner
2015-09-11 14:04               ` Kaushal Modi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).