From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Unable to find libgif/libungif on RHEL 6 Date: Fri, 11 Sep 2015 02:51:32 +0000 Message-ID: References: <55F1563F.7000604@cs.ucla.edu> <851te6m12r.fsf@iznogoud.viz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141c1cab3ee1f051f6fcb64 X-Trace: ger.gmane.org 1441939931 28115 80.91.229.3 (11 Sep 2015 02:52:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2015 02:52:11 +0000 (UTC) To: Stefan Monnier , Paul Eggert , Emacs developers , wjenkner@inode.at Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 11 04:52:11 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZaERb-0006C9-6Z for ged-emacs-devel@m.gmane.org; Fri, 11 Sep 2015 04:52:07 +0200 Original-Received: from localhost ([::1]:53569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaERV-0001V5-02 for ged-emacs-devel@m.gmane.org; Thu, 10 Sep 2015 22:52:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaERH-0001Us-3p for emacs-devel@gnu.org; Thu, 10 Sep 2015 22:51:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaERF-0000kQ-3y for emacs-devel@gnu.org; Thu, 10 Sep 2015 22:51:47 -0400 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:35924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaERE-0000jR-Ei for emacs-devel@gnu.org; Thu, 10 Sep 2015 22:51:45 -0400 Original-Received: by oibi136 with SMTP id i136so35948777oib.3 for ; Thu, 10 Sep 2015 19:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=OcjqhaWsoGy4yeW89klqoKYK3l6WzHGHfwHcn5U6aJw=; b=uK2N6aIFGd9SiYZqf7ys1ci/gIWvNod4AwWcpOeNg7BtcGBdSAdDWUT1UjzX6oC7wM 0yOau9fLzLQBCgODnaKcv2xOUJ6ja6Z/0wFw/gOTt38m93G3/kEEoM0hLpEXWruJkr3/ RPGZnS/3CkKKxVYd8GZJYFsRcLrXQIn98FLykYSkmDo7D/8o3mNYcL4+RXJkUhaCdBNg vEjelP/Xg3SPbm1shoCQs3KGI2dLkR8HTHOKf2J44eQeOc1fBiLRVTpJudRduAJIFiXV U/ZoFC/m3X1ZNyiF2iIVdLtaHzJSDPSLcF+g46LVeKdb3/CAE4QfMCcUOoETgCVHbjrw Fx2w== X-Received: by 10.202.230.5 with SMTP id d5mr245050oih.85.1441939902949; Thu, 10 Sep 2015 19:51:42 -0700 (PDT) In-Reply-To: <851te6m12r.fsf@iznogoud.viz> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189828 Archived-At: --001a1141c1cab3ee1f051f6fcb64 Content-Type: text/plain; charset=UTF-8 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 # 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 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. > --001a1141c1cab3ee1f051f6fcb64 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The LDFLAGS did the magic, thank you!

N= ow my config.log ends with

#define EMACS_CONF= IG_FEATURES "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF G= SETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOL= KIT_SCROLL_BARS GTK2 X11"

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

Here's my emacs build csh script in the case i= t 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 BRA= NCH>
# Example: source mybuild.csh emacs-24
# =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0source mybuild.csh master
# For RHEL = 6, do "setenv MY_OSREV 6"
# ${HOME}/usr_local/${MY_OSRE= V} is the directory that I use as --prefix for building libraries locally w= hen the default library does not exist or is older than the requirements
# I already have the env vars PATH, LD_LIBRARY_PATH, PKG_CONFIG_PAT= H and INCLUDE_PATH to include the respective directories ${HOME}/usr_local/= ${MY_OSREV}=C2=A0
# Ensure that PKG_CONFIG_PATH has /usr/share/pk= gconfig for xproto.pc and related files. This is necessary for XFT and rela= ted X11 features.. otherwise the fonts will look horrible.

set emacs_gdb_build =3D 0

git checkout ma= ster
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-2= 4.5
if ( ${emacs_gdb_build} ) then
=C2=A0 =C2=A0 setenv= MY_EMACS_INSTALL_DIR "${HOME}/usr_local/apps/${MY_OSREV}/emacs/`basen= ame $argv[1]`_debug"
else
=C2=A0 =C2=A0 setenv MY_= EMACS_INSTALL_DIR "${HOME}/usr_local/apps/${MY_OSREV}/emacs/`basename = $argv[1]`"
endif
# setenv MY_EMACS_INSTALL_DIR &qu= ot;${HOME}/usr_local/apps/${MY_OSREV}/emacs/test"
mkdir -p $= {MY_EMACS_INSTALL_DIR}

# Basic configure command
setenv MY_EMACS_CONFIGURE "./configure --prefix=3D${MY_EMACS_= INSTALL_DIR}"

# Initialize the configure flag= vairables
set emacs_configure_CFLAGS =C2=A0 =3D ''
=
set emacs_configure_CXXFLAGS =3D ''
set emacs_config= ure_CPPFLAGS =3D ''
set emacs_configure_LDFLAGS =C2=A0=3D= ''

set emacs_configure_CPPFLAGS =3D '= CPPFLAGS=3D"'"-fgnu89-inline -I${HOME}/usr_local/${MY_OSREV}/= include -I/usr/include/freetype2 -I/usr/include"
# Below LDF= LAGS setup is required for emacs to build with the GIF feature
se= t emacs_configure_LDFLAGS =C2=A0=3D 'LDFLAGS=3D"'"-L${HOM= E}/usr_local/${MY_OSREV}/lib64 -lgif"

# For D= ebug
if ( ${emacs_gdb_build} ) then
=C2=A0 =C2=A0 set e= macs_configure_CFLAGS =C2=A0 =3D 'CFLAGS=3D"'"-ggdb3 -O0&= quot;
=C2=A0 =C2=A0 set emacs_configure_CXXFLAGS =3D 'CXXFLAG= S=3D"'"-ggdb3 -O0"
=C2=A0 =C2=A0 set emacs_con= figure_LDFLAGS =C2=A0=3D "${emacs_configure_LDFLAGS} -ggdb3"
endif

# Close the double quotes
if= ( ! ( "${emacs_configure_CFLAGS}" =3D=3D "" ) ) then
=C2=A0 =C2=A0 set emacs_configure_CFLAGS =3D "${emacs_configu= re_CFLAGS}"'"'
endif
if ( ! ( "$= {emacs_configure_CXXFLAGS}" =3D=3D "" ) ) then
=C2= =A0 =C2=A0 set emacs_configure_CXXFLAGS =3D "${emacs_configure_CXXFLAG= S}"'"'
endif
if ( ! ( "${emacs_c= onfigure_CPPFLAGS}" =3D=3D "" ) ) then
=C2=A0 =C2= =A0 set emacs_configure_CPPFLAGS =3D "${emacs_configure_CPPFLAGS}"= ;'"'
endif
if ( ! ( "${emacs_configur= e_LDFLAGS}" =3D=3D "" ) ) then
=C2=A0 =C2=A0 set e= macs_configure_LDFLAGS =3D "${emacs_configure_LDFLAGS}"'"= ;'
endif

setenv MY_EMACS_CONFIGURE &= quot;${MY_EMACS_CONFIGURE} ${emacs_configure_CPPFLAGS} ${emacs_configure_CF= LAGS} ${emacs_configure_CXXFLAGS} ${emacs_configure_LDFLAGS}"

echo ""
echo " =C2=A0MY_EMACS_CON= FIGURE =3D ${MY_EMACS_CONFIGURE}"
echo ""
echo "Waiting for 5 seconds .. Press Ctrl+C to cancel this installat= ion."
sleep 5

\rm -f configure Make= file
make clean

if ( ! -e src/epaths.in.= bkp ) then
=C2=A0 =C2=A0 \cp src/epa= ths.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 G= NUmakefile.bkp ) then
=C2=A0 =C2=A0 \cp GNUmakefile GNUmakefile.b= kp
endif
\cp -f GNUmakefile.bkp GNUmakefile
p= erl -p -i -e 's/\.\/configure/$ENV{"MY_EMACS_CONFIGURE"}/g= 9; GNUmakefile

# Do NOT call autoreconf. "mak= e bookstrap" below will call autoreconf with
# proper argume= nts.
# The `make bootstrap' step is required for a clean fres= h install
if ( -f Makefile ) then
=C2=A0 =C2=A0 make bo= otstrap
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 e= nd up using the incorrect ctags.
if ( -e ${MY_EMACS_INSTALL_DIR}/= bin/ctags ) then
=C2=A0 =C2=A0 \mv ${MY_EMACS_INSTALL_DIR}/bin/ct= ags ${MY_EMACS_INSTALL_DIR}/bin/ctags_emacs
endif
if ( = -e ${MY_EMACS_INSTALL_DIR}/share/man/man1/ctags.1.gz ) then
=C2= =A0 =C2=A0 \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 Jenk= ner <wjenkner@inode.at> wrot= e:
On Thu, Sep 10 2015, Kaushal Mod= i wrote:

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

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

should work, I think.
--001a1141c1cab3ee1f051f6fcb64--