Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Dec 2009 18:54:18 +0200
From:      Lena@lena.kiev.ua
To:        Scott Bennett <bennett@cs.niu.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mutt and openssl from port
Message-ID:  <20091213165418.GA19522@lena.kiev>
In-Reply-To: <200912122355.nBCNtGOL007666@mp.cs.niu.edu>
References:  <200912122355.nBCNtGOL007666@mp.cs.niu.edu>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sat, Dec 12, 2009 at 05:55:16PM -0600, Scott Bennett wrote:

> On Sat, 12 Dec 2009 21:46:27 +0200 Lena()lena.kiev.ua wrote:
> >7.1-PRERELEASE. I'd like Mutt to use zlib compression when connecting to pop3s.
> >openssl in base doesn't support zlib. I installed openssl port from package
> >(in the port zlib in on by default), wrote in make.conf:
> >
> >WITH_OPENSSL_PORT=yes
> >
> >and `portupgrade -f mutt`. However, Mutt still uses openssl from base:
> >
> >~ $ ldd /usr/local/bin/mutt
> >/usr/local/bin/mutt:
> >        libncursesw.so.7 => /lib/libncursesw.so.7 (0x28103000)
> >        libssl.so.5 => /usr/lib/libssl.so.5 (0x2814f000)
> >        libcrypto.so.5 => /lib/libcrypto.so.5 (0x28190000)
> >        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282ea000)
> >        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x282f3000)
> >        libc.so.7 => /lib/libc.so.7 (0x283ea000)
>
> Right.  We tor users just went through that, too.  The problem is that
> what WITH_OPENSSL_PORT=YES does is to add -L/usr/local/lib to the cc or gcc
> command that does the link edit step.  However, that adds the desired
> directory to the *end* of the list of directories to be searched, when what
> you want is to put it at the beginning of the list.  What I ended up doing
> was to add LDFLAGS="-rpath=/usr/local/lib" to the ./configure step for tor,
> so you may want to take a look at the "make config" target to see how best
> to do that for mutt.  Be careful that the use of -rpath won't cause it to
> include libraries from /usr/local/lib instead of from the base system for
> other stuff where you might not want that to happen.

Thanks, this seems to work:

===========================================================================
--- Makefile.orig	2009-02-11 21:08:46.000000000 +0200
+++ Makefile	2009-12-13 18:05:06.000000000 +0200
@@ -83,9 +83,9 @@
 GNU_CONFIGURE=	yes
 USE_AUTOTOOLS=	automake:19 autoconf:262
 LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ENV=	CC="${CC} -I${LOCALBASE}/include" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ENV=	CC="${CC} -I${LOCALBASE}/include" LDFLAGS="-rpath=/usr/local/lib ${LDFLAGS}"
 CONFIGURE_ARGS=	--enable-pop --enable-imap --disable-fcntl \
-		--with-ssl=${OPENSSLBASE} --sysconfdir=${PREFIX}/etc \
+		--with-ssl=/usr/local --sysconfdir=${PREFIX}/etc \
 		--with-sharedir=${PREFIX}/share/mutt \
 		--with-docdir=${DOCSDIR} --with-charmaps \
 		--enable-compressed
===========================================================================

~ $ ldd /usr/local/bin/mutt
/usr/local/bin/mutt:
        libncursesw.so.7 => /lib/libncursesw.so.7 (0x28103000)
        libssl.so.5 => /usr/local/lib/libssl.so.5 (0x2814f000)
        libcrypto.so.5 => /usr/local/lib/libcrypto.so.5 (0x28193000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x282da000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x282e3000)
        libc.so.7 => /lib/libc.so.7 (0x283da000)
        libz.so.4 => /lib/libz.so.4 (0x284d9000)
        libthr.so.3 => /lib/libthr.so.3 (0x284eb000)



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20091213165418.GA19522>