Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

Compile milter-greylist with 64 bit compiler on Solaris

Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by An.H.Nguyen

Milter-greylist crashes every 30 minutes on my Solaris 8 with "out of memory problem" and "too many open files error".
So I try to recompile it with 64 bit compiler.
I've changed the Makefile to enable 64 bit
(CFLAGS= -m64 -g -O2 -Wall -D_REENTRANT -D__EXTENSIONS__ -D_BSD_SOURCE)
I'm getting stuck with this error:
ld: warning: file /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/../../../libmilter.a(main.o): wrong ELF class: ELFCLASS32
Does anyone know how to get around this problem?
Thanks,
An Nguyen
bash-2.03# make
gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o -lpthread -lsocket -lresolv -lnsl -lmilter
ld: fatal: file milter-greylist.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to milter-greylist
collect2: ld returned 1 exit status
make: *** [milter-greylist] Error 1
bash-2.03# gcc -m64 -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o -lpthread -lsocket -lresolv -lnsl -lmilter
ld: warning: file /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/../../../libmilter.a(main.o): wrong ELF class: ELFCLASS32
Undefined ; first referenced
symbol in file
smfi_setconn milter-greylist.o
smfi_addheader milter-greylist.o
smfi_getpriv milter-greylist.o
smfi_getsymval milter-greylist.o
smfi_main milter-greylist.o
smfi_setreply milter-greylist.o
smfi_setpriv ; milter-greylist.o
smfi_register ; milter-greylist.o
ld: fatal: Symbol referencing errors. No output written to milter-greylist
collect2: ld returned 1 exit status

Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by An.H.Nguyen

That's what I try to do now, but there's an error as shown in my previous post.
Thanks
Show quoted textHide quoted text
----- Original Message -----
Sent: Tuesday, February 20, 2007 3:04 AM
Subject: Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

On Tue, Feb 20, 2007 at 01:37:47AM -0800, An.H.Nguyen wrote:
> Does anyone know how to get around this problem?

A lot of people reported a similar issue when using the 32 bit ABI.
Rebuilding as 64 bit fixes the problem.

--
Emmanuel Dreyfus
manu@netbsd.org

Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by Nerijus Baliunas

On Tue, 20 Feb 2007 01:37:47 -0800 "An.H.Nguyen" <AnNguyen251@...> wrote:

> bash-2.03# make
> gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o  -lpthread -lsocket -lresolv -lnsl -lmilter
> ld: fatal: file milter-greylist.o: wrong ELF class: ELFCLASS64
> ld: fatal: File processing errors. No output written to milter-greylist
> collect2: ld returned 1 exit status
> make: *** [milter-greylist] Error 1
> bash-2.03# gcc -m64 -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o  -lpthread -lsocket -lresolv -lnsl -lmilter
> ld: warning: file /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/../../../libmilter.a(main.o): wrong ELF class: ELFCLASS32

So you are linking with -m64 only, I think you should recompile with this flag all the files too.
I.e. add -m64 to Makefile or CFLAGS when configuring.

Regards,
Nerijus

Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by An.H.Nguyen

Is this problem because my libmilter.a is a 32 bit file?
Sendmail libmilter readme does not give me a clue on how to compile it into 64 bit...
Anyone please?
Show quoted textHide quoted text
----- Original Message -----
Sent: Tuesday, February 20, 2007 1:37 AM
Subject: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

Milter-greylist crashes every 30 minutes on my Solaris 8 with "out of memory problem" and "too many open files error".
So I try to recompile it with 64 bit compiler.
I've changed the Makefile to enable 64 bit
(CFLAGS= -m64 -g -O2 -Wall -D_REENTRANT -D__EXTENSIONS__ -D_BSD_SOURCE)
I'm getting stuck with this error:
ld: warning: file /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/../../../libmilter.a(main.o): wrong ELF class: ELFCLASS32
Does anyone know how to get around this problem?
Thanks,
An Nguyen
bash-2.03# make
gcc -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o -lpthread -lsocket -lresolv -lnsl -lmilter
ld: fatal: file milter-greylist.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to milter-greylist
collect2: ld returned 1 exit status
make: *** [milter-greylist] Error 1
bash-2.03# gcc -m64 -o milter-greylist milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o -lpthread -lsocket -lresolv -lnsl -lmilter
ld: warning: file /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/../../../libmilter.a(main.o): wrong ELF class: ELFCLASS32
Undefined first referenced
symbol in file
smfi_setconn milter-greylist.o
smfi_addheader milter-greylist.o
smfi_getpriv ; milter-greylist.o
smfi_getsymval milter-greylist.o
smfi_main milter-greylist.o
smfi_setreply ; milter-greylist.o
smfi_setpriv milter-greylist.o
smfi_register milter-greylist.o
ld: fatal: Symbol referencing errors. No output written to milter-greylist
collect2: ld returned 1 exit status

Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by Nerijus Baliunas

On Tue, 20 Feb 2007 05:34:36 -0800 "An.H.Nguyen" <AnNguyen251@...> wrote:

> Is this problem because my libmilter.a is a 32 bit file?

Could be.

> Sendmail libmilter readme does not give me a clue on how to compile it into 64 bit...
> Anyone please?

Please ask in some sendmail or Solaris list.

Regards,
Nerijus

Re: [milter-greylist] Compile milter-greylist with 64 bit compiler on Solaris

2007-02-20 by Emmanuel Dreyfus

On Tue, Feb 20, 2007 at 05:34:36AM -0800, An.H.Nguyen wrote:
> Is this problem because my libmilter.a is a 32 bit file?

With no doubt you can't link a 2 bit libmilter with a 64 bit milter-greylist

> Sendmail libmilter readme does not give me a clue on how to compile it 
> into 64 bit...

Sorry, I'm clueless about Solaris. But I remeber the question was answered
here. Have you searched the list archives?

-- 
Emmanuel Dreyfus
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.