[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10

Steven King sking at kingrst.com
Mon Jul 5 00:49:14 EEST 2010


 Interesting, it is almost like the fopen function fails to open
conftestval for write.

On 7/4/10 5:44 PM, Dennis Clarke wrote:
> Further details from config.log :
>
> |       #include <stdio.h>
> |       #include <sys/types.h>
> |       int main() {
> |       FILE *f=fopen("conftestval", "w");
> |       if (!f) exit(1);
> |       fprintf(f, "%d\n", sizeof(off_t));
> |       exit(0);
> |       }
> |
> configure:18477: result: unknown
> configure:18512: error: Unsupported off_t type
>
> This is bogus however as that code compiles and runs just fine :
>
> $ cat sizeof.c
> /*
>  * Main function
>  */
>
> /* Feature test switches */
> #define _POSIX_SOURCE 1
>
> /* System Headers */
> #include <stdio.h>
> #include <sys/types.h>
> #include <time.h>
> #include <stdlib.h>
> #include <unistd.h>
>
> /* Macros */
>
> /* External function */
>
> /*
>  * print size of basic data types used in Solaris 8 upwards
>  */
>
> int main(int argc, char *argv[])
> {
>     printf ("\nC\n");
>     printf ( "sizeof char = %d\n", sizeof (char));
>     printf ( "sizeof double = %d\n", sizeof (double));
>     printf ( "sizeof float = %d\n", sizeof (float));
>     printf ( "sizeof int = %d\n", sizeof (int));
>     printf ( "sizeof long = %d\n", sizeof (long));
>     printf ( "sizeof long long = %d\n", sizeof (long long));
>     printf ( "sizeof short = %d\n", sizeof (short));
>     printf ( "sizeof void * = %d\n", sizeof (void *));
>     printf ( "sizeof clock_t = %d\n", sizeof (clock_t));
>     printf ( "sizeof gid_t = %d\n", sizeof (gid_t));
>     printf ( "sizeof pid_t = %d\n", sizeof (pid_t));
>     printf ( "sizeof size_t = %d\n", sizeof (size_t));
>     printf ( "sizeof ssize_t = %d\n", sizeof (ssize_t));
>     printf ( "sizeof time_t = %d\n", sizeof (time_t));
>     printf ( "sizeof uid_t = %d\n", sizeof (uid_t));
>     printf ( "sizeof \"\" = %d\n", sizeof (""));
>
>     /* quick file test  */
>     printf ( "\nWill attempt FILE *f=fopen(\"conftestval\", \"w\");\n\n" );
>     FILE *f=fopen("conftestval", "w");
>     if (!f)
>         printf ( " * * * FAIL * * * \n" );
>     else {
>         printf ( "\nWill attempt to write sizeof(off_t) to FILE f\n" );
>         fprintf( f, "%d\n", sizeof(off_t) );
>     }
>
>     printf( "sizeof off_t = %d\n", sizeof(off_t));
>     return(0);
> }
>
> $ cat compile.sh
> #!/bin/ksh
> /usr/xpg4/bin/rm -rf /tmp/`uname -n`_`uname -p`_temp
> mkdir /tmp/`uname -n`_`uname -p`_temp
> /opt/studio/SOS11/SUNWspro/bin/cc -keeptmp -xtemp=/tmp/`uname -n`_`uname
> -p`_temp -V -v -Xc -xstrconst -xildoff -xarch=386 -xlibmil -Kpic
> -xlibmieee -xregs=no%frameptr -g -D_TS_ERRNO -H -\# -o sizeof sizeof.c
>
> $ ./compile.sh
> cc: Sun C 5.8 Patch 121016-08 2009/04/20
> ### Note: NLSPATH =
> /opt/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
> ### Note: TMPDIR = /tmp/titan_i386_temp
> ###     command line files and options (expanded):
> ### -D_TS_ERRNO -g -H -keeptmp -Kpic -V -v -Xc -xarch=386 -xlibmieee
> -xlibmil -xregs=no%frameptr -xstrconst -xtemp=/tmp/titan_i386_temp
> sizeof.c -o sizeof
> /opt/SUNWspro/prod/bin/acomp -dg -xldscope=global -i sizeof.c -y-fbe
> -y/opt/SUNWspro/prod/bin/fbe -y-pic -y-k -y-xarch=386 -y-td
> -y/tmp/titan_i386_temp -y-g -y-o -ysizeof.o -y-verbose -y-il
> -y/opt/SUNWspro/prod/lib/libm.il -y-xthreadvar=dynamic -y-comdat
> -xdbggen=no%stabs+dwarf2+usedonly -V -v -strconst -D_TS_ERRNO -H
> -xdbggen=incl -y-s -2k -fparam_ir -Qy -D__SunOS_5_8 -D__SUNPRO_C=0x580
> -D__SVR4 -D__unix -D__sun -D__i386 -D__BUILTIN_VA_ARG_INCR
> -D__C99FEATURES__ -Xc -D__PRAGMA_REDEFINE_EXTNAME -xc99=%all,no%lib
> -D__FLT_EVAL_METHOD__=-1 -I/opt/SUNWspro/prod/include/cc
> "-g/opt/SUNWspro/prod/bin/cc -keeptmp -xtemp=/tmp/titan_i386_temp -V -v
> -Xc -xstrconst -xildoff -xarch=386 -xlibmil -Kpic -xlibmieee
> -xregs=no%frameptr -g -D_TS_ERRNO -H -c " -fsimple=0 -destination_ir=yabe
> acomp: Sun C 5.8 Patch 121016-08 2009/04/20
> /usr/include/stdio.h
>         /usr/include/iso/stdio_iso.h
>                 /usr/include/sys/feature_tests.h
>                         /usr/include/sys/isa_defs.h
>                 /usr/include/sys/va_list.h
>                 /usr/include/stdio_tag.h
>                 /usr/include/stdio_impl.h
> /usr/include/sys/types.h
>         /usr/include/sys/machtypes.h
>                 /usr/include/ia32/sys/machtypes.h
>         /usr/include/sys/int_types.h
> /usr/include/time.h
>         /usr/include/iso/time_iso.h
> /usr/include/stdlib.h
>         /usr/include/iso/stdlib_iso.h
> /usr/include/unistd.h
>         /usr/include/sys/unistd.h
> /opt/SUNWspro/prod/bin/fbe -s -o sizeof.o -warn=%none -Qy
> /tmp/titan_i386_temp/yabeAAAkoaqGj
> ### Note: LD_LIBRARY_PATH = <null>
> ### Note: LD_RUN_PATH = <null>
> /usr/ccs/bin/ld /opt/SUNWspro/prod/lib/crti.o
> /opt/SUNWspro/prod/lib/crt1.o /opt/SUNWspro/prod/lib/values-xi.o -o sizeof
> -V sizeof.o -Y "P,/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib" -Qy
> -lc /opt/SUNWspro/prod/lib/crtn.o
> ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.302
> $
>
> $ ./sizeof
>
> C
> sizeof char = 1
> sizeof double = 8
> sizeof float = 4
> sizeof int = 4
> sizeof long = 4
> sizeof long long = 8
> sizeof short = 2
> sizeof void * = 4
> sizeof clock_t = 4
> sizeof gid_t = 4
> sizeof pid_t = 4
> sizeof size_t = 4
> sizeof ssize_t = 4
> sizeof time_t = 4
> sizeof uid_t = 4
> sizeof "" = 1
>
> Will attempt FILE *f=fopen("conftestval", "w");
>
>
> Will attempt to write sizeof(off_t) to FILE f
> sizeof off_t = 4
> $
>
> $ ls -lap
> total 80
> drwxr-xr-x   2 sysadmin sysadmin     277 Jul  4 21:43 ./
> drwxrwxrwt   7 root     sys          538 Jul  4 21:42 ../
> -rwx------   1 sysadmin sysadmin     311 Jul  4 21:33 compile.sh
> -rw-r--r--   1 sysadmin sysadmin       2 Jul  4 21:42 conftestval
> -rwxr-xr-x   1 sysadmin sysadmin    9424 Jul  4 21:42 sizeof
> -rw-r--r--   1 sysadmin sysadmin    1626 Jul  4 21:41 sizeof.c
> -rw-r--r--   1 sysadmin sysadmin    6152 Jul  4 21:42 sizeof.o
>
> $ cat conftestval
> 4
>
> So I'm at a loss why the dovecot configure script fails due to anything
> regarding off_t.
>

-- 
Steve King

Senior Linux Engineer - Advance Internet, Inc.
Cisco Certified Network Associate
CompTIA Linux+ Certified Professional
CompTIA A+ Certified Professional



More information about the dovecot mailing list