Re: [exim] cannot compile with DomainKeys

Etusivu
Poista viesti
Vastaa
Lähettäjä: Chump Chumpster
Päiväys:  
Vastaanottaja: Todd Lyons
Kopio: exim-users, Justin G.
Uudet otsikot: Re: [exim] cannot compile with DomainKeys
Aihe: Re: [exim] cannot compile with DomainKeys
Thank you Todd.

To follow up for 'the record' this did work and compile under CentOS 5.3. w/
libdomainkeys-0.69 and exim-4.69. The makefile below got wrapped by email,
but following the changes, I was able to get a successful make. From there I
had to type 'make libdomainkeys.so to make the actual library and then
install it manually into the library path for CentOS, using a conf file and
ldconfig.

After that exim would build OK against this library and I'm rolling along,
thanks to your help.

On Thu, Apr 16, 2009 at 10:07 AM, Todd Lyons <tlyons@???> wrote:

> On Thu, Apr 16, 2009 at 6:02 AM, Chump Chumpster <codechump@???>
> wrote:
> > Thanks for your response. Yes I do have openssl & openssl-dev installed,
> as
> > mentioned. I wonder if they're being picked up by the compiler. They were
> > installed by yum, so they're were you would expect them for CentOS.
> >
> > Does anyone know how to explicitly express their locations in config?
> Thanks
>
> This is what I did to make it work:
>
> [tlyons@ivwww01 ~/src]$ diff -ruN libdomainkeys-0.69.orig/Makefile
> libdomainkeys-0.69/Makefile
> --- libdomainkeys-0.69.orig/Makefile    2006-01-17 16:28:58.000000000 -0800
> +++ libdomainkeys-0.69/Makefile 2008-11-26 13:49:10.273984000 -0800
> @@ -2,8 +2,9 @@
>  CFLAGS=-DBIND_8_COMPAT -O2
>  #CFLAGS += -DDK_DEBUG -DDK_HASH_BUFF -Wall
>  #CFLAGS += -DUNIXWARE
> -INCS=-I.
> -LIBS=-L. -ldomainkeys -lcrypto
> +CFLAGS += -fPIC
> +INCS=-I. -I/usr/include
> +LIBS=-L. -ldomainkeys -lcrypto -lresolv
>  MAKE=make

>
>  dktest: dktest.o libdomainkeys.a dns.lib socket.lib
> @@ -47,6 +48,10 @@
>        ar cr libdomainkeys.a domainkeys.o dns_txt.o dktrace.o
>        ranlib libdomainkeys.a

>
> +libdomainkeys.so: domainkeys.o dns_txt.o dktrace.o
> +       rm -f libdomainkeys.so
> +       ld -shared domainkeys.o dns_txt.o dktrace.o -lcrypto `cat dns.lib`
> -o libdomainkeys.so
> +
>  python: domainkeys_wrap.o _domainkeys.so

>
>  domainkeys_wrap.o: domainkeys.h domainkeys.i domainkeys_wrap.c
> @@ -57,7 +62,7 @@
>        ld -shared domainkeys.o dns_txt.o dktrace.o domainkeys_wrap.o
> -lcrypto `cat dns.lib` -o _domainkeys.so

>
>  clean:
> -       rm -f *.o *.so libdomainkeys.a dns.lib dnstest socktest makeheader
> dktest testtrace domainkeys.h
> +       rm -f *.o *.so libdomainkeys.a libdomainkeys.so dns.lib dnstest
> socktest makeheader dktest testtrace domainkeys.h

>
> #
> distributionfile:
>
>
> To build it, I put the libdomainkey.so to be in someplace that the
> linker could find it, and told exim about it:
> echo "LDFLAGS += -ldomainkeys" >> Local/Makefile
>
> Then I built it.
>
> After installing exim, I copied the libdomainkeys.so to $LIB/exim and
> can verify that it's seen by the exim binary:
> CentOS52[root@ivwm51 ~]# ldd /usr/sbin/exim | egrep 'domainkeys|dkim'
>        libdomainkeys.so => /usr/lib64/exim/libdomainkeys.so
> (0x00002ae197a6f000)
>        libdkim.so => /usr/lib64/exim/libdkim.so (0x00002ae197c75000)

>
> Truth be told, I modified an exim spec file for 4.69-7 from fc10 to
> build a CentOS 5.2 rpm with dk/dkim support using the shared library
> method I described above.
> --
> Regards...      Todd

>