Subject: Problems compiling on Solaris 10 because of redeclaration of scandir

From: Jonas Bygdén <[email-masked]>
Date: Mon, 27 Sep 2004 12:33:13 +0200

Hi!

I'm trying to compile the c-client on Solaris 10 (beta) to be able to build 
php with imap-support but I've run into trouble.

Apparently there's a new declaration of the scandir function in Solaris 10, 
that's not been in Solaris earlier. This seems to be a SysV version instead 
of the UCB version that's been the only one in earlier Solaris (< 10).

Has anyone tried to compile any part of the imapd on Solaris 10, and found 
a solution to this?

Access to Solaris 10 can be provided upon request.

jonasb@bygden $ make gso
make sslnopwd
make[1]: Entering directory `/home/jonasb/src/build/imap-2004a'
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Building in full compliance with RFC 3501 security
+ requirements:
++ TLS/SSL encryption is supported
++ Unencrypted plaintext passwords are prohibited
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
make[1]: Leaving directory `/home/jonasb/src/build/imap-2004a'
Applying an process to sources...
tools/an "ln -s" src/c-client c-client
tools/an "ln -s" src/ansilib c-client
tools/an "ln -s" src/charset c-client
tools/an "ln -s" src/osdep/unix c-client
tools/an "ln -s" src/mtest mtest
tools/an "ln -s" src/ipopd ipopd
tools/an "ln -s" src/imapd imapd
tools/an "ln -s" src/mailutil mailutil
tools/an "ln -s" src/mlock mlock
tools/an "ln -s" src/dmail dmail
tools/an "ln -s" src/tmail tmail
ln -s tools/an .
make build EXTRACFLAGS='' EXTRALDFLAGS='' EXTRADRIVERS='mbox' 
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd IP=4 EXTRASPECIALS='' 
BUILDTYPE=gso
make[1]: Entering directory `/home/jonasb/src/build/imap-2004a'
Building c-client for gso...
echo `cat SPECIALS`  > c-client/SPECIALS
cd c-client;make gso EXTRACFLAGS=''\
 EXTRALDFLAGS=''\
 EXTRADRIVERS='mbox'\
 EXTRAAUTHENTICATORS=''\
 PASSWDTYPE=std SSLTYPE=nopwd IP=4\

make[2]: Entering directory `/home/jonasb/src/build/imap-2004a/c-client'
sh -c '(strings /lib/libc.a | grep getpassphrase > /dev/null) && ln -s 
os_soln.h os_sol.h || ln -s os_solo.h os_sol.h'
/lib/libc.a: No such file or directory
make build EXTRACFLAGS='' EXTRALDFLAGS='' EXTRADRIVERS='mbox' 
EXTRAAUTHENTICATORS='' PASSWDTYPE=std SSLTYPE=nopwd `cat SPECIALS` OS=sol \
 SIGTYPE=psx CHECKPW=psx CRXTYPE=nfs \
 SPOOLDIR=/var/spool MAILSPOOL=/var/mail \
 ACTIVEFILE=/usr/share/news/active \
 RSHPATH=/usr/bin/rsh \
 BASECFLAGS="-g -O2" \
 BASELDFLAGS="-lsocket -lnsl -lgen" \
 RANLIB=true CC=gcc
make[3]: Entering directory `/home/jonasb/src/build/imap-2004a/c-client'
sh -c 'rm -rf auths.c crexcl.c nfstest.c linkage.[ch] siglocal.c 
osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo gcc > CCTYPE
echo -g -O2 '' > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
 -DMAILSPOOL=\"/var/mail\" \
 -DANONYMOUSHOME=\"/var/mail/anonymous\" \
 -DACTIVEFILE=\"/usr/share/news/active\" -DNEWSSPOOL=\"/var/spool/news\" \
 -DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"/etc/mlock\" > OSCFLAGS
echo -lsocket -lnsl -lgen  > LDFLAGS
echo "ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o utf8.o 
siglocal.o dummy.o pseudo.o netmsg.o flstring.o fdstring.o rfc822.o nntp.o 
smtp.o imap4r1.o pop3.o unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o 
mh.o mx.o;true c-client.a" > ARCHIVE
echo sol > OSTYPE
./drivers mbox imap nntp pop3 mh mx mbx tenex mtx mmdf unix news phile dummy
./mkauths  md5 pla log
make[4]: Entering directory `/home/jonasb/src/build/imap-2004a/c-client'
echo -DMD5ENABLE=\"/etc/cram-md5.pwd\" >> OSCFLAGS
make[4]: Leaving directory `/home/jonasb/src/build/imap-2004a/c-client'
ln -s os_sol.h osdep.h
ln -s os_sol.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_psx.c siglocal.c
ln -s crx_nfs.c crexcl.c
ln -s ip4_unix.c ip_unix.c
sh -c '(test -f /usr/include/sys/statvfs.h -a sol != sc5 -a sol != sco) && 
ln -s nfstnew.c nfstest.c || ln -s nfstold.c nfstest.c'
Standard password authentication
ln -s ckp_psx.c osdepckp.c
Building with SSL
ln -s ssl_unix.c osdepssl.c
echo -I/opt/csw/include -I/opt/csw/include/openssl 
-DSSL_CERT_DIRECTORY=\"/opt/csw/ssl/certs\" 
-DSSL_KEY_DIRECTORY=\"/opt/csw/ssl/certs\" >> OSCFLAGS
echo "  ssl_onceonlyinit ();" >> linkage.c
echo -L/opt/csw/lib -lssl -lcrypto  >> LDFLAGS
Building with SSL and plaintext passwords disabled unless SSL/TLS
echo "  mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);" >> linkage.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make sol SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
In file included from osdep.c:23:
osdep.h:64: error: conflicting types for 'scandir'
/usr/include/dirent.h:92: error: previous declaration of 'scandir' was here
osdep.h:64: error: conflicting types for 'scandir'
/usr/include/dirent.h:92: error: previous declaration of 'scandir' was here
make[3]: *** [osdep.o] Error 1
make[3]: Leaving directory `/home/jonasb/src/build/imap-2004a/c-client'
make[2]: *** [gso] Error 2
make[2]: Leaving directory `/home/jonasb/src/build/imap-2004a/c-client'
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/jonasb/src/build/imap-2004a'
make: *** [gso] Error 2
jonasb@bygden $

-- 
 Jonas Bygdén <[email-masked]>

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------