Mailing List Archive

compiling qmail on amd64
I'm attempting to compile a shupp toaster on ubuntu 12.04 on an amd64
chip VPS server.

This came up during the second compile of qmail, after the shupp patch
set went in. This I presume is a new thing, this has worked on 32 bit
machines many times.


./compile open_rw.c
In file included from /usr/include/fcntl.h:252:0,
from open_rw.c:2:
In function ‘open’,
inlined from ‘open_rw’ at open_rw.c:6:3:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to
‘__open_missing_mode’ declared with attribute error: open with O_CREAT
in second argument needs 3 arguments
make: *** [open_rw.o] Error 1
ERROR in make



--
-----------------
Bob Hutchinson
Midwales dot com
-----------------
Re: compiling qmail on amd64 [ In reply to ]
On 7/29/2012 9:40 AM, Bob Hutchinson wrote:
> inlined from ‘open_rw’ at open_rw.c:6:3:
> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to
> ‘__open_missing_mode’ declared with attribute error: open with O_CREAT


I don't know much about the patch, but if you want to hack at it try
editing open_rw.c
find the line:
{ return open(fn,O_RDWR | O_CREAT);

change it to:
{ return open(fn,O_RDWR | O_CREAT,0644);

then make again

--

Jeremy Kister
http://jeremy.kister.net./
Re: compiling qmail on amd64 [ In reply to ]
On 29/07/12 15:24, Jeremy Kister wrote:
> On 7/29/2012 9:40 AM, Bob Hutchinson wrote:
>> inlined from ‘open_rw’ at open_rw.c:6:3:
>> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:51:24: error: call to
>> ‘__open_missing_mode’ declared with attribute error: open with O_CREAT
>
>
> I don't know much about the patch, but if you want to hack at it try
> editing open_rw.c
> find the line:
> { return open(fn,O_RDWR | O_CREAT);
>
> change it to:
> { return open(fn,O_RDWR | O_CREAT,0644);
>
> then make again
>

That did it, Thanks!

But now another error has popped up, oh dear, I do hope I can have my
trusty qmail toaster on this new box ;-(

Here is what it gives, going back to the last compile

./compile surbl.c
surbl.c: In function ‘store_move’:
surbl.c:233:10: warning: ignoring return value of ‘link’, declared with
attribute warn_unused_result [-Wunused-result]
./load qmail-smtpd chkuser.o qregex.o rcpthosts.o commands.o timeoutread.o \
timeoutwrite.o ip.o ipme.o ipalloc.o strsalloc.o control.o
control_time.o time.o \
constmap.o tls.o ssl_timeoutio.o ndelay.a -L/usr/local/ssl/lib -lssl
-lcrypto \
received.o date822fmt.o now.o qmail.o spf.o spam.o spam_get.o
cdb.a fd.a wait.a \
datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
alloc.a strerr.a substdio.a error.a str.a fs.a auto_qmail.o
auto_uids.o base64.o `cat \
socket.lib tai.lib dns.lib` dns.o surbl.o lock.a `head -1
/home/vpopmail/etc/lib_deps`
dns.o: In function `resolve':
dns.c:(.text+0x156): undefined reference to `__dn_expand'
dns.o: In function `findname':
dns.c:(.text+0x46c): undefined reference to `__dn_expand'
dns.c:(.text+0x519): undefined reference to `__dn_expand'
dns.o: In function `dns_ipplus':
dns.c:(.text+0x697): undefined reference to `__dn_expand'
dns.o: In function `dns_init':
dns.c:(.text+0x7c3): undefined reference to `__res_search'
dns.o: In function `dns_mxip':
dns.c:(.text+0xb9b): undefined reference to `__dn_expand'
dns.c:(.text+0xe09): undefined reference to `__dn_expand'
dns.o: In function `dns_txt':
dns.c:(.text+0xfb1): undefined reference to `__dn_expand'
dns.o: In function `dns_surbl_txt':
dns.c:(.text+0x11c7): undefined reference to `__dn_expand'
dns.o:(.data+0x0): undefined reference to `__res_query'
collect2: ld returned 1 exit status
make: *** [qmail-smtpd] Error 1
ERROR in make



--
-----------------
Bob Hutchinson
Midwales dot com
-----------------
Re: compiling qmail on amd64 [ In reply to ]
On 7/29/2012 11:34 AM, Bob Hutchinson wrote:
> auto_uids.o base64.o `cat \
> socket.lib tai.lib dns.lib` dns.o surbl.o lock.a `head -1
> /home/vpopmail/etc/lib_deps`

What's the output of head -1 /home/vpopmail/etc/lib_deps ?

if it doesnt have -lresolv add it in there and make again


--

Jeremy Kister
http://jeremy.kister.net./
Re: compiling qmail on amd64 [ In reply to ]
On 29/07/12 17:00, Jeremy Kister wrote:
> On 7/29/2012 11:34 AM, Bob Hutchinson wrote:
>> auto_uids.o base64.o `cat \
>> socket.lib tai.lib dns.lib` dns.o surbl.o lock.a `head -1
>> /home/vpopmail/etc/lib_deps`
>
> What's the output of head -1 /home/vpopmail/etc/lib_deps ?
>
> if it doesnt have -lresolv add it in there and make again
>
>

That did it, thank you very much, qmail lives on!


--
-----------------
Bob Hutchinson
Midwales dot com
-----------------