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 14:04:24 +0000 Message-ID: References: <55F1563F.7000604@cs.ucla.edu> <851te6m12r.fsf@iznogoud.viz> <85oah9w2sx.fsf@iznogoud.viz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d2cd60bd5e1051f7932ac X-Trace: ger.gmane.org 1441980305 2998 80.91.229.3 (11 Sep 2015 14:05:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Sep 2015 14:05:05 +0000 (UTC) To: Stefan Monnier , Paul Eggert , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 11 16:04:55 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 1ZaOwV-0007CN-Eq for ged-emacs-devel@m.gmane.org; Fri, 11 Sep 2015 16:04:43 +0200 Original-Received: from localhost ([::1]:56522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaOwU-0003cz-Pq for ged-emacs-devel@m.gmane.org; Fri, 11 Sep 2015 10:04:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaOwQ-0003ce-H9 for emacs-devel@gnu.org; Fri, 11 Sep 2015 10:04:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaOwP-0003We-9q for emacs-devel@gnu.org; Fri, 11 Sep 2015 10:04:38 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:34705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaOwP-0003WJ-3Z for emacs-devel@gnu.org; Fri, 11 Sep 2015 10:04:37 -0400 Original-Received: by oiev17 with SMTP id v17so43079777oie.1 for ; Fri, 11 Sep 2015 07:04:36 -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=7PU3uBQL32+qd9JqqrJn77yr+FnsLLTqKyb/TxkTJ5U=; b=rn48BjhbfnT9Z+QMuf/YE+Ft3E1UWy2CVR3TfquHyBAvwLTJIoxiw326mPajT3nhaN uq3/9MptnF7dPydusyXfXaJrBcrhFtog0ipBsHwJfCcLDcIVVgVOkyoizsg/3b/NX+Zo hKIV67cbTxY7AD9dZqWODO4X/TEVVR96OPJVe/ep40TM/59JBSDe50VgPK9p4Ib6upqG 0IOHowL7S2q5zXEdNLku2dasQqHZqQ4tOQ/gHoK/ipPqwsZTdRrX8NDxahdf1QgLFvqb HWeCwfmC3RaluUR2yR4BBcNgH8UNPsXfVr9Lg5kwVzE9XH9DtONwCGbQtfg8rYfmzKo1 rlyg== X-Received: by 10.202.211.10 with SMTP id k10mr36668909oig.34.1441980274691; Fri, 11 Sep 2015 07:04:34 -0700 (PDT) In-Reply-To: <85oah9w2sx.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::231 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:189837 Archived-At: --001a113d2cd60bd5e1051f7932ac Content-Type: text/plain; charset=UTF-8 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 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. > --001a113d2cd60bd5e1051f7932ac Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Wolfgang!

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

This is a very enlightening thread f= or me: Learnt about CentOS .rpm files for RHEL, rpm2cpio, LDFLAGS vs LD_LIB= RARY_PATH.

Thanks to everyone for the help :).

On Fri, Sep 11, 201= 5 at 8:36 AM Wolfgang Jenkner <wjen= kner@inode.at> wrote:
On Fri= , Sep 11 2015, Kaushal Modi wrote:

> The LDFLAGS did the magic, thank you!

Actually,

./configure ... LDFLAGS=3D-L/path/to/the/lib64 CPPFLAGS=3D-I/path/to/gifinc= ludedir

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 va= rs
> 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=3D"-L/path/to/the/lib64 -Wl,-rpath=3D/path/to/the/lib64"<= br>
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.
--001a113d2cd60bd5e1051f7932ac--