[Dovecot] compile troubles - stat.mtim - 1.1hg

Daniel Black daniel.subs at internode.on.net
Sun May 18 17:09:59 EEST 2008


having trouble compiling dovecot-1.1hg latest pull

I'm amost thinking _GNU_SOURCE needs to be defined as its built to work

Any suggestions welcome.

make[4]: Nothing to be done for `all'.
make[4]: Leaving directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage/list'
Making all in index
make[4]: Entering directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage/index'
Making all in maildir
make[5]: Entering directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage/index/maildir'
gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../src/lib -I../../../../src/lib-mail -I../../../../src/lib-imap -I../../../../src/lib-index -I../../../../src/lib-storage -I../../../../src/lib-storage/index   -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2 -I/usr/kerberos/include    -MT 
maildir-uidlist.o -MD -MP -MF .deps/maildir-uidlist.Tpo -c -o 
maildir-uidlist.o maildir-uidlist.c
maildir-uidlist.c: In function 'maildir_uidlist_update_hdr':
maildir-uidlist.c:322: error: request for member 'st_mtim' in something not a 
structure or union
make[5]: *** [maildir-uidlist.o] Error 1
make[5]: Leaving directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage/index/maildir'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage/index'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/home/dan/software_projects/dovecot-1.1/src/lib-storage'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dan/software_projects/dovecot-1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dan/software_projects/dovecot-1.1'



fgrep HAVE_STAT config.h
/* #undef HAVE_STATFS_MNTFROMNAME */
/* #undef HAVE_STATVFS_MNTFROMNAME */
#define HAVE_STAT_XTIM
/* #undef HAVE_STAT_XTIMESPEC */

from config.log
configure:28085: checking if struct stat has st_?tim timespec fields
configure:28117: 
gcc -c -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2  
conftest.c >&5
conftest.c: In function 'main':
conftest.c:104: warning: unused variable 'x'
configure:28123: $? = 0
configure:28134: result: yes
configure:28149: checking if struct stat has st_?timespec fields
configure:28181: 
gcc -c -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wstrict-aliasing=2  
conftest.c >&5
conftest.c: In function 'main':
conftest.c:105: error: 'struct stat' has no member named 'st_mtimespec'
conftest.c:105: warning: unused variable 'x'
configure:28187: $? = 1
configure: failed program was:


Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.2.3, glibc-2.6.1-r0, 
2.6.22-vs2.2.0.7-gentoo x86_64)
=================================================================
System uname: 2.6.22-vs2.2.0.7-gentoo x86_64 AMD Athlon(tm) 64 X2 Dual Core 
Processor 4200+
Timestamp of tree: Sat, 17 May 2008 22:15:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3


features.h
#ifdef  _GNU_SOURCE
# define _BSD_SOURCE    1
#endif
....
#if defined _BSD_SOURCE || defined _SVID_SOURCE
# define __USE_MISC     1
#endif

sys/stat.h includes bits/stat.h 
#include <features.h>
....
struct stat { ....
#ifdef __USE_MISC
    /* Nanosecond resolution timestamps are stored in a format
       equivalent to 'struct timespec'.  This is the type used
       whenever possible but the Unix namespace rules do not allow the
       identifier 'timespec' to appear in the <sys/stat.h> header.
       Therefore we have to handle the use of this header in strictly
       standard-compliant sources special.  */
    struct timespec st_atim;            /* Time of last access.  */
    struct timespec st_mtim;            /* Time of last modification.  */
    struct timespec st_ctim;            /* Time of last status change.  */



-- 

Daniel Black
--
Proudly a Gentoo Linux User.
Gnu-PG/PGP signed and encrypted email preferred
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x76677097
GPG Signature D934 5397 A84A 6366 9687  9EB2 861A 4ABA 7667 7097
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://dovecot.org/pipermail/dovecot/attachments/20080519/6847406d/attachment-0001.bin 


More information about the dovecot mailing list