# mail/mutt-devel and WITH_OPENSSL_PORT=YES



## knarf (Apr 28, 2010)

I'm trying to install mail/mutt-devel together with openssl-1.0.0 using WITH_OPENSSL_PORT=YES.

First, mutt_ssl.c does not build, but I found a simple patch for this error here:

http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg216106.html

But now linking fails:


```
cc -I/usr/local/include  -O2 -pipe -fno-strict-aliasing  -L/usr/local/lib -rpath=/usr/local/lib -L/usr/local/lib -L/usr/local/lib -o 
mutt addrbook.o alias.o attach.o  base64.o browser.o buffy.o  color.o compress.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 rfc3676.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  mbyte.o url.o ascii.o  crypt-mod.o patchlist.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 pop.o pop_lib.o pop_auth.o bcache.o account.o mutt_socket.o mutt_tunnel.o 
mutt_ssl.o md5.o  -Limap -limap -lncursesw  -lncursesw -L/usr/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -lcrypto -lasn1 -lroken -lcrypt 
-lssl -lcrypto -lz  -lintl -liconv -liconv   
lib.o(.text+0xab8): In function `safe_open':
: warning: warning: mktemp() possibly used unsafely; consider using mkstemp()
/usr/lib/libhx509.so: undefined reference to `MD2_Init'
/usr/lib/libhx509.so: undefined reference to `MD2_Final'
/usr/lib/libhx509.so: undefined reference to `MD2_Update'
*** Error code 1
```

The missing references are in /usr/lib/libcrypto but not in /usr/local/lib/libcrypto. The -lhx509 is determined dynamically by configure and put into MUTTLIBS. Removing -lhx509 does not solve the problem, you'll see krb related errors.

Maybe someone has an idea how to fix this?

mutt and mutt-devel are the only ports I know of using openssl and do not work with WITH_OPENSSL_PORT=YES.

Knarf


----------



## knarf (May 3, 2010)

Quick solution: Enable MD2 support in security/openssl.

Reference: http://lists.freebsd.org/pipermail/freebsd-ports/2010-May/060964.html


----------

