unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
	Paul Eggert <eggert@cs.ucla.edu>,
	Emacs developers <emacs-devel@gnu.org>,
	wjenkner@inode.at
Subject: Re: Unable to find libgif/libungif on RHEL 6
Date: Fri, 11 Sep 2015 02:51:32 +0000	[thread overview]
Message-ID: <CAFyQvY2NUSA1kxPx+OE61NF3+rvkgj=PrOdt5xOL08vpYCCKjQ@mail.gmail.com> (raw)
In-Reply-To: <851te6m12r.fsf@iznogoud.viz>

[-- 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 --]

  reply	other threads:[~2015-09-11  2:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-09-11 12:23             ` Wolfgang Jenkner
2015-09-11 14:04               ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY2NUSA1kxPx+OE61NF3+rvkgj=PrOdt5xOL08vpYCCKjQ@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=wjenkner@inode.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).