<<< Date Index >>>     <<< Thread Index >>>

Re: can't get ssl support compiled in



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, June 21 at 09:06 PM, quoth Henry Nelson:
>On Tue, Jun 20, 2006 at 10:21:03AM -0400, Kyle Wheeler wrote:
>> On Tuesday, June 20 at 08:33 PM, quoth Henry Nelson:
>> >With only the static libraries, the configure script dies with:
>> >    checking for X509_new in -lcrypto... yes
>> >    checking for SSL_new in -lssl... no
>> >    configure: error: Unable to find SSL library
>> >If I try to help the configure script by setting the LIBS environment
>> >variable ("-L/usr/local/ssl/lib -lssl"), it still can't find it.
>> 
>> Look in the config.log file that gets created. Start at the bottom and 
>> go up (much of the bottom is a bunch of output (gobbledygook) of what 
>> was discovered) until you find exactly what command configure tried to 
>> run and failed. That should give you some idea of how it's getting 
>
>I should mention first that I am trying to build "mutt-1.5.11".  My
>OS is "NetBSD 3.0.0_STABLE i386" and gcc version is "version 3.3.3".
>
>The best I can tell is that the "ac_cv_lib_ssl_SSL_new" test is broken
>since it only works with the shared libraries, not the static libraries.
>
>The following configure/environmental variable (csh) combination _seems_ to
>work, i.e., configure completed and I got a "working" (didn't crash) mutt:
>% setenv LDFLAGS -static
>% ./configure --prefix=/usr/local --with-slang=/usr/local
>  --with-libiconv-prefix=/usr/local --without-wc-funcs
>  --enable-pop --enable-imap --with-openssl=/usr/local/ssl
>                                    ^^^^
>Is that "openssl" documented somewhere?  It's in the configure script,
>but afaict it doesn't have anything to do with OpenSSL.
>
>What worries me, though, is that the executable I have is most likely not
>ssl enabled.  How would I test that?  Mutt -v says "+USE_POP  +USE_IMAP"
>as expected, but it also says "-USE_SSL".

If it says -USE_SSL then it's not ssl-enabled.

You may want to throw this question at the mutt-dev@xxxxxxxx list, for 
more help, and so that it can be fixed.

In terms of getting it to work without the help of mutt-dev, if you 
can get it to compile in an SSL-enabled manner (perhaps by convincing 
it to go for the shared libraries), you can then hand-link things 
together by just adding the static library as another file to link in 
(like all the .o files).

I.e. if the last command to build the mutt binary looks like this (as 
it does on my system):

gcc  -Wall -pedantic -I/opt/local/include -L/opt/local/lib  
- -L/opt/local/lib -o mutt  patchlist.o addrbook.o alias.o attach.o 
base64.o browser.o buffy.o color.o crypt.o cryptglue.o commands.o 
complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o 
enter.o flags.o init.o filter.o from.o getdomain.o group.o handler.o 
hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o 
mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o 
recvcmd.o rfc822.o rfc1524.o rfc2047.o rfc2231.o score.o send.o 
sendlib.o signal.o sort.o status.o system.o thread.o charset.o 
history.o lib.o muttlib.o editmsg.o utf8.o mbyte.o wcwidth.o url.o 
ascii.o mutt_idna.o crypt-mod.o pgp.o pgpinvoke.o pgpkey.o pgplib.o 
gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o 
crypt-mod-smime-classic.o resize.o smtp.o account.o mutt_socket.o 
mutt_tunnel.o mutt_ssl.o mutt_sasl.o hcache.o md5c.o  -Limap -limap 
- -lncurses -lssl -lcrypto -lsasl2 ./intl/libintl.a -liconv -liconv   
- -lqdbm

Then you can link ssl in statically by removing the -lssl and -lcrypto 
bits, and replacing them with the full path to the static libraries, 
like this (the changes are near the end):

gcc  -Wall -pedantic -I/opt/local/include -L/opt/local/lib  
- -L/opt/local/lib -o mutt  patchlist.o addrbook.o alias.o attach.o 
base64.o browser.o buffy.o color.o crypt.o cryptglue.o commands.o 
complete.o compose.o copy.o curs_lib.o curs_main.o date.o edit.o 
enter.o flags.o init.o filter.o from.o getdomain.o group.o handler.o 
hash.o hdrline.o headers.o help.o hook.o keymap.o main.o mbox.o menu.o 
mh.o mx.o pager.o parse.o pattern.o postpone.o query.o recvattach.o 
recvcmd.o rfc822.o rfc1524.o rfc2047.o rfc2231.o score.o send.o 
sendlib.o signal.o sort.o status.o system.o thread.o charset.o 
history.o lib.o muttlib.o editmsg.o utf8.o mbyte.o wcwidth.o url.o 
ascii.o mutt_idna.o crypt-mod.o pgp.o pgpinvoke.o pgpkey.o pgplib.o 
gnupgparse.o pgpmicalg.o pgppacket.o crypt-mod-pgp-classic.o smime.o 
crypt-mod-smime-classic.o resize.o smtp.o account.o mutt_socket.o 
mutt_tunnel.o mutt_ssl.o mutt_sasl.o hcache.o md5c.o  -Limap -limap 
- -lncurses /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a -lsasl2 
./intl/libintl.a -liconv -liconv   -lqdbm

Note that this method is the way that libintl is linked in.

~Kyle
- -- 
All men by nature desire to know.
                                                          -- Aristotle
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFEmVKGBkIOoMqOI14RAqGJAKCEfRQbMTim40QrniRg1+QgskJc9wCgvhob
rirVZxq7JfDQYuqjKvNo6YU=
=EWLP
-----END PGP SIGNATURE-----