cannot compile with DomainKeys

View: New views
5 Messages — Rating Filter:   Alert me  

cannot compile with DomainKeys

by Code Chump :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I wonder if anyone can help?

I've been on this for days now!... and have tried everything I can think of
and find through Googling.

I cannot get Exim to compile with DomainKeys support..

I've followed all the instructions at:
http://wiki.exim.org/DomainKeys

My OS is CentOS-5.3

I can compile fine when I comment out:

EXPERIMENTAL_DOMAINKEYS=yes
CFLAGS  += -I/<path to my>/libdomainkeys-0.69
LDFLAGS += -ldomainkeys -L/<path to my>/libdomainkeys-0.69

I'm using the latest libdomainkeys 0.69 if that might be an issue.

Anyway during compile I get the error:
gcc -o exim
/usr/local/src/libdomainkeys-0.69/libdomainkeys.a(domainkeys.o): In function
`dk_free':
domainkeys.c:(.text+0x30c): undefined reference to `CRYPTO_free'

...and it's all downhill from there :-(

I have openssl & openssl-dev installed and even ended up using yum to
install the whole 'Development Tools' group from CentOS, to make sure I'd
got all the libraries.

I'd appriciate if anyone can help?
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Parent Message unknown Re: cannot compile with DomainKeys

by Code Chump :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

On Thu, Apr 16, 2009 at 2:32 AM, Justin G. <justin@...> wrote:

> Do you have OpenSSL built on your box? Did configure find it?
>
> On Wed, Apr 15, 2009 at 9:55 PM, Chump Chumpster <codechump@...>
> wrote:
> > I wonder if anyone can help?
> >
> > I've been on this for days now!... and have tried everything I can think
> of
> > and find through Googling.
> >
> > I cannot get Exim to compile with DomainKeys support..
> >
> > I've followed all the instructions at:
> > http://wiki.exim.org/DomainKeys
> >
> > My OS is CentOS-5.3
> >
> > I can compile fine when I comment out:
> >
> > EXPERIMENTAL_DOMAINKEYS=yes
> > CFLAGS  += -I/<path to my>/libdomainkeys-0.69
> > LDFLAGS += -ldomainkeys -L/<path to my>/libdomainkeys-0.69
> >
> > I'm using the latest libdomainkeys 0.69 if that might be an issue.
> >
> > Anyway during compile I get the error:
> > gcc -o exim
> > /usr/local/src/libdomainkeys-0.69/libdomainkeys.a(domainkeys.o): In
> function
> > `dk_free':
> > domainkeys.c:(.text+0x30c): undefined reference to `CRYPTO_free'
> >
> > ...and it's all downhill from there :-(
> >
> > I have openssl & openssl-dev installed and even ended up using yum to
> > install the whole 'Development Tools' group from CentOS, to make sure I'd
> > got all the libraries.
> >
> > I'd appriciate if anyone can help?
> > --
> > ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> > ## Exim details at http://www.exim.org/
> > ## Please use the Wiki with this list - http://wiki.exim.org/
> >
>
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: cannot compile with DomainKeys

by Todd Lyons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: cannot compile with DomainKeys

by Code Chump :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Re: cannot compile with DomainKeys

by linkya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey

I'm still not able to get it. Can you please detail out the steps a little bit more.
I've my ssl etc installed. i can't make the libdomainkeys.so file you are talking abt. What is the target in the libdomainkeys to make the .so file please?

Nishant

Code Chump wrote:
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@ivenue.com> wrote:

> On Thu, Apr 16, 2009 at 6:02 AM, Chump Chumpster <codechump@gmail.com>
> 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
>
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/