Dennis Clarke
2010-Jul-04 21:12 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
configure fails with : configure: error: Unsupported off_t type I am not too sure what off_t is needed but this is a pretty standard thing. My configure line : ./configure --build=i386-pc-solaris2.10 --host=i386-pc-solaris2.10 --prefix=/opt/csw --with-zlib --with-ssl=openssl --with-storages=mbox,maildir --with-libiconv-prefix=/opt/csw Yes, the openssl libs are in /opt/csw/lib Not sure what Dovecot needs to build or what other options are required. Any thoughts would be appreciated. -- Dennis Clarke dclarke at opensolaris.ca <- Email related to the open source Solaris
Steven King
2010-Jul-04 21:40 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
Have you read the compilation wiki http://wiki.dovecot.org/CompilingSource ? This should explain any peculiarities with Solaris. Also, did the compile fail, or the build itself? If you could send the errors that either display in more completion, that may point us in the right direction. On 7/4/10 5:12 PM, Dennis Clarke wrote:> configure fails with : > > configure: error: Unsupported off_t type > > I am not too sure what off_t is needed but this is a pretty standard thing. > > My configure line : > > ./configure --build=i386-pc-solaris2.10 --host=i386-pc-solaris2.10 > --prefix=/opt/csw --with-zlib --with-ssl=openssl > --with-storages=mbox,maildir --with-libiconv-prefix=/opt/csw > > Yes, the openssl libs are in /opt/csw/lib > > Not sure what Dovecot needs to build or what other options are required. > > Any thoughts would be appreciated. >-- Steve King Senior Linux Engineer - Advance Internet, Inc. Cisco Certified Network Associate CompTIA Linux+ Certified Professional CompTIA A+ Certified Professional
Dennis Clarke
2010-Jul-04 21:44 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
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. -- Dennis Clarke dclarke at opensolaris.ca <- Email related to the open source Solaris
Dennis Clarke
2010-Jul-04 21:46 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
> Have you read the compilation wiki > http://wiki.dovecot.org/CompilingSource ?Yep .. been there. This is configure that fails. We never even get to "make". :-( I even tried a real simple ./configure and that fails at the same point. I just posted a really verbose test to the maillist also that confirms that the conf.c code should work as is. -- Dennis Clarke dclarke at opensolaris.ca <- Email related to the open source Solaris
Dennis Clarke
2010-Jul-04 21:56 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
> Interesting, it is almost like the fopen function fails to open > conftestval for write.Makes me wonder. However my simple test code works fine. Something very fishy going on here. Dennis
Dennis Clarke
2010-Jul-05 12:42 UTC
[Dovecot] dovecot-1.2.12 fails to build on Solaris 8 and 10
> On Sun, Jul 04, 2010 at 05:56:54PM -0400, Dennis Clarke wrote: >> Makes me wonder. However my simple test code works fine. >> Something very fishy going on here. > > Just as a datapoint. Here is 1.2.12 on opensolaris 2009.06While that is very far away from production Solaris 8 it is a valid datapoint. However I did manage to find the ID-Ten-T error that I was having related to a CFLAGS switch of all things. # uname -a SunOS titan 5.8 Generic_127722-03 i86pc i386 i86pc # /opt/csw/sbin/dovecot --version 1.2.12 # /opt/csw/sbin/dovecot --build-options Build options: ioloop=poll ipv6 openssl Mail storages: maildir mbox raw shared SQL drivers: Passdb: checkpassword pam passwd passwd-file shadow Userdb: passwd passwd-file prefetch static If you wonder why it is compiled on a ten year old OS it is because of the Solaris ABI ( Application Binary Interface ) stability in which *anything* that compiles and runs on Solaris 8 will run everywhere else flawlessly. However, your dovecot compiled on that OpenSolaris beta release won't run anywhere else but on that machine. In fact, no promises on that[1] OpenSolaris release either. :-) Dennis [1] keep in mind that there ha never been a prod ready release of OpenSolaris. Maybe someday but Oracle isn't talking. :-(