Sendmail with smtp auth, qpopper, smtps, spop3 howto. Version 1.1 2000-12-18 Mike Leidy (mike@nerdfest.org) Acknowlegements: Many thanks to grioghar and kb1 for their efforts and testing of this howto. Without them, this definitely wouldn't work on Redhat 7.0 installations. grioghar = Grioghar Thomas kb1 = Kris Boutilier NOTE FOR REDHAT 7.0 USERS: You have much work to do. See the section at the end of this howto before you proceed. Sources needed: openssl ftp.openssl.org/source/openssl-0.9.6.tar.gz cyrus-sasl ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-1.5.24.tar.gz sendmail ftp.sendmail.org/pub/sendmail/sendmail-8.11.1.tar.gz Optional Sources: qpopper ftp.qualcomm.com/eudora/servers/unix/popper/qpopper3.1.2.tar.gz stunnel http://www.stunnel.org/download/stunnel/src/stunnel-3.8p4.tgz fetchmail http://www.tuxedo.org/~esr/fetchmail/fetchmail-5.6.0.tar.gz mutt ftp://ftp.mutt.org/pub/mutt/mutt-1.2.5i.tar.gz I'll assume you have the three required source files in a directory called /usr/src/sendmail-sasl and that you are not real familiar with GNU/Linux and compiling programs. Compile openssl: cd /usr/src/sendmail-sasl tar zxvf openssl-0.9.6.tar.gz cd openssl-0.9.6 ./Configure --prefix=/usr --openssldir=/usr/share/openssl shared linux-elf make make install /sbin/ldconfig Verify openssl: ls -l /usr/lib/libcrypto* Look for the libcrypto.so file. If you don't have it, something is wrong. This setup doesn't work correctly if openssl is compiled static. It must be shared for the digest-md5 piece of sasl to function correctly. I don't know why, this is just my experience. Compile sasl: cd /usr/src/sendmail-sasl tar zxvf cyrus-sasl-1.5.24.tar.gz cd cyrus-sasl-1.5.24 ------- START OF PATCH ------- --- configure.in.orig Mon Nov 27 12:46:51 2000 +++ configure.in Mon Nov 27 12:47:31 2000 @@ -378,7 +378,7 @@ if test "$with_des" != no; then AC_DEFINE(WITH_DES) - LIB_DES="-ldes" +# LIB_DES="-ldes" fi AC_SUBST(LIB_DES) ------- END OF PATCH ------- patch -p0 < the patch shown above ./configure --enable-login --prefix=/usr --mandir=/usr/share/man make make install echo "/usr/lib/sasl" >> /etc/ld.so.conf /sbin/ldconfig Verify cyrus-sasl: ldd /usr/lib/sasl/libdigestmd5.so* You should see libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x0011a000) listed for each of the 3 files found. Generate the sasldb: /usr/sbin/saslpasswd -a Sendmail bob <-- or whatever user name tail /var/log/messages and look for 3 lines from saslpasswd. If there are any library errors, then you had a problem when you compiled openssl or sasl. Make sure that /etc/sasldb has 600 permissions. Anything else and you won't get sendmail to respond correctly. Compile sendmail: cd /usr/src/sendmail-sasl tar zxvf sendmail.8.11.1.tar.gz cd sendmail-8.11.1 cd ./cf/cf vi config.mc ------- START OF config.mc ------- divert(-1) # # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # By using this file, you agree to the terms and conditions set # forth in the LICENSE file which can be found at the top level of # the sendmail distribution. # # # # This file is a heavily modified version of the generic-linux file # that is included with the sendmail source. # divert(0)dnl OSTYPE(linux)dnl DOMAIN(generic)dnl define(`confAUTO_REBUILD')dnl define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl FEATURE(use_cw_file)dnl FEATURE(local_procmail)dnl FEATURE(`access_db')dnl FEATURE(`blacklist_recipients')dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(procmail)dnl TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confDEF_AUTH_INFO', `/etc/mail/default-auth-info')dnl FEATURE(dnsbl,`rbl.maps.vix.com',`Mail from $&{client_addr} rejected; see http://mail-abuse.org/rbl/')dnl ------- END OF config.mc ------- cd ../.. cd devtools/Site vi site.config.m4 ------- START OF site.config.m4 ------- APPENDDEF(`confENVDEF', `-DSASL') APPENDDEF(`conf_sendmail_LIBS', `-lsasl') ------- END OF site.config.m4 ------- cd .. cd .. ./Build cd cf/cf ./Build config.cf cd ../.. ./Build install cp cf/cf/config.cf /etc/mail/sendmail.cf cd /etc/mail vi access ------- START OF access ------- # # this file controls relaying # localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY ------- END OF access ------- vi aliases ------- START OF aliases ------- # # @(#)aliases 8.2 (Berkeley) 3/5/94 # # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. # # Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root daemon: root adm: root lp: root sync: root shutdown: root halt: root mail: root operator: root nobody: root apache: root named: root mysql: root postgres: root system: root manager: root abuse: root # trap decode to catch security attacks decode: root # Person who should get root's mail #root: some other account ------- END OF aliases ------- makemap hash aliases < aliases makemap hash access < access makemap hash virtusertable < virtusertable cd /usr/lib/sasl vi Sendmail.conf ------- START OF Sendmail.conf ------- pwcheck_method: sasldb ------- END OF Sendmail.conf ------- Verify sendmail: /usr/sbin/sendmail -O LogLevel=14 -bs EHLO localhost quit You should have seen a message like: 250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN Test the configuration: /usr/sbin/sendmail -bd setup your email client to use your server for smtp and smtp auth with the username and password that you just created. Things to note: NEVER use the account's real password in the sasldb. Only accounts listed in the sasldb will be able to relay email. If using a client that only does LOGIN or PLAIN, you should concider using stunnel or some other ssl encryption method. You can check the auth method by looking at /var/log/maillog. Optional Sources: Compile Stunnel: cd /usr/src/sendmail-sasl tar zxvf stunnel-3.8p4.tgz cd stunnel-3.8p4 ./Configure --prefix=/usr --mandir=/usr/share/man --with-pem-dir=/usr/etc make install -m755 -s stunnel /usr/sbin install -m755 -s stunnel.so /usr/lib install -m644 stunnel.8 /usr/share/man/man8 /sbin/ldconfig Generate SSL key: openssl req -new -x509 -days 365 -nodes -out /usr/etc/stunnel.pem -keyout /usr/etc/stunnel.pem Compile Qpopper: cd /usr/src/sendmail-sasl tar zxvf qpopper3.1.2.tar.gz cd qpopper3.1.2 ./configure --prefix=/usr --mandir=/usr/share/man --enable-specialauth --enable-log-login --without-pam --enable-standalone make cp popper/popper /usr/sbin/qpopper cp man/popper.8 /usr/share/man/man8/qpopper.8 cp man/popauth.8 /usr/share/man/man8/popauth.8 Start Qpopper: /usr/sbin/qpopper If you want to use stunnel to encrypt your transfers/logins.... /usr/sbin/stunnel -d 465 -r smtp /usr/sbin/stunnel -d 995 -r pop3 Compile Fetchmail: cd /usr/src/sendmail-sasl tar zxvf fetchmail-5.6.0.tar.gz cd fetchmail-5.6.0 ./configure --prefix=/usr --mandir=/usr/share/man --with-ssl make make install Compile Mutt: cd /usr/src/sendmail-sasl tar zxvf mutt-1.2.5i.tar.gz cd mutt-1.2.5 ./configure --prefix=/usr --mandir=/usr/share/man --enable-imap --enable-ssl make make install Things to note: 465 and 995 are the "default" ssl ports for those services according to the stunnel docs. You might want to close port 110 and force your users to always use port 995. MS Outlook uses 995 by default if you choose the "use ssl" option for the pop server. It does not however change from port 25 if you choose the same for smtp. So you must manually change the port. Also, you can't really disable port 25 or you won't be able to receive mail and may not be able to send either, but I haven't tried that. Of course I don't want to either. There are other ways of doing this stuff. This just happens to be the way that I got it working. *NOTES FOR REDHAT 7.0 USERS: *These instructions were tested with a "server" installation type. *I believe that you already have a sasl capable sendmail installed. You will *have to configure it and some of this howto may be helpful for that. However, *if you wish to go ahead with this howto, you will have to upgrade some of your *packages and delete others... * ****************************************************************************** * *You will need to get updated glibc rpms from redhat. Those packages are: *(assuming you have i386 architecture) *glibc-2.2-5.i386.rpm *glibc-devel-2.2-5.i386-rpm * *rpm -Uvh glibc-2.2-5.i386.rpm *rpm -Uvh glibc-devel-2.2-5.i386.rpm * ******************************************************************************* * *You will have to install gcc-2.95.2 to fix the compile problems associated *with the installed gcc-2.96 that is on your system. This requires a patch *to work with your newly installed glibc-2.2 libraries. * *Get the gcc source: *ftp://ftp.gnu.org/pub/gcc/gcc-2.95.2.tar.gz *Get the patch for gcc to work with glibc-2.2 from the end of this howto. *Name the patch gcc-glibc-2.2.patch *tar zxvf gcc-2.95.2.tar.gz *cd gcc-2.95.2 *patch -p0 < ../gcc-glibc-2.2.patch *patch -p1 < install/glibc-2.2.patch *./configure --prefix=usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-shared *make -e bootstrap *make install *cd /usr/bin *ln -s gcc cc */sbin/ldconfig * ******************************************************************************* * *You will have to recompile db1 and db3 with the new glibc-2.2 libraries. *Both of these packages are a huge pain in the ass to install so I'll have to *put some time into this section later. :) * ****************************************************************************** * *You will have to remove the following packages before you follow this howto. *This is because the current sendmail package will have file installed in *places other than the default, and those files will conflict with the ones *that you install from the source code. *rpm -e mutt *rpm -e fetchmail *rpm -e sendmail *rpm -e cyrus-sasl * *Also note that compiling openssl breaks openssh and maybe other things. *And if you want to compile openssl, you should remove the openssl rpms, which *would take --force since there are many dependencies. * ********** Patch to make gcc-2.95.2 work with glibc-2.2 *********** --- /dev/null Tue May 5 13:32:27 1998 +++ install/glibc-2.2.patch Thu Nov 2 09:06:34 2000 @@ -0,0 +1,282 @@ +2000-10-11 Jakub Jelinek + + * iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >= 2]: + Initialize new fields wide and i18n of struct printf_info. + (ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 2]: + Likewise. + +2000-09-23 Franz Sirl + + * stdstreams.cc: Include , not "libio.h". + * iolibio.h: Likewise. + (_IO_pos_BAD): Use _IO_off_t instead of _IO_fpos_t. + * libio.h (_IO_USER_LOCK): Define. + +1999-12-13 Jakub Jelinek + + * libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of + _IO_fpos_t. + (_IO_seekoff, _IO_seekpos): Likewise. Use _IO_off64_t instead of + _IO_fpos64_t. + * libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t): Likewise. + (_IO_seekoff, _IO_seekpos): Likewise. + (_IO_default_seekoff, _IO_default_seekpos): Likewise. + (_IO_default_seek): Likewise. + (_IO_file_seekoff, _IO_file_seek, _IO_str_seekoff): Likewise. + * streambuf.h (streampos): Typedef to _IO_off_t resp. _IO_off64_t. + * parsestream.h (class parsebuf::pos_at_line_start): Change type + to _IO_off_t. + +--- gcc-2.95.2/libio/libio.h.jj Mon Jun 29 20:06:26 1998 ++++ gcc-2.95.2/libio/libio.h Thu Nov 2 17:33:00 2000 +@@ -136,6 +136,7 @@ + #define _IO_IS_APPENDING 0x1000 + #define _IO_IS_FILEBUF 0x2000 + #define _IO_BAD_SEEN 0x4000 ++#define _IO_USER_LOCK 0x8000 + + /* These are "formatting flags" matching the iostream fmtflags enum values. */ + #define _IO_SKIPWS 01 +@@ -277,7 +278,7 @@ typedef struct + { + _IO_ssize_t (*read) __PMT ((struct _IO_FILE *, void *, _IO_ssize_t)); + _IO_ssize_t (*write) __PMT ((struct _IO_FILE *, const void *, _IO_ssize_t)); +- _IO_fpos_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int)); ++ _IO_off_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int)); + int (*close) __PMT ((struct _IO_FILE *)); + } _IO_cookie_io_functions_t; + +@@ -348,11 +349,11 @@ extern _IO_ssize_t _IO_padn __P ((_IO_FI + extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t)); + + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); +-extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int)); ++extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); ++extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); + #else +-extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); +-extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int)); ++extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); ++extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int)); + #endif + + extern void _IO_free_backup_area __P ((_IO_FILE *)); +--- gcc-2.95.2/libio/libioP.h.jj Tue May 18 00:58:56 1999 ++++ gcc-2.95.2/libio/libioP.h Tue Oct 10 11:40:57 2000 +@@ -146,10 +146,10 @@ typedef _IO_size_t (*_IO_xsgetn_t) __PMT + It matches the streambuf::seekoff virtual function. + It is also used for the ANSI fseek function. */ + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-typedef _IO_fpos64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF, ++typedef _IO_off64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF, + int DIR, int MODE)); + #else +-typedef _IO_fpos_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF, ++typedef _IO_off_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF, + int DIR, int MODE)); + #endif + #define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE) +@@ -160,9 +160,9 @@ typedef _IO_fpos_t (*_IO_seekoff_t) __PM + It is also used for the ANSI fgetpos and fsetpos functions. */ + /* The _IO_seek_cur and _IO_seek_end options are not allowed. */ + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-typedef _IO_fpos64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos64_t, int)); ++typedef _IO_off64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off64_t, int)); + #else +-typedef _IO_fpos_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos_t, int)); ++typedef _IO_off_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off_t, int)); + #endif + #define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS) + +@@ -213,9 +213,9 @@ typedef _IO_ssize_t (*_IO_write_t) __PMT + It matches the streambuf::sys_seek virtual function, which is + specific to this implementation. */ + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-typedef _IO_fpos64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int)); ++typedef _IO_off64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int)); + #else +-typedef _IO_fpos_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int)); ++typedef _IO_off_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int)); + #endif + #define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE) + +@@ -298,11 +298,11 @@ struct _IO_FILE_plus + /* Generic functions */ + + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); +-extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int)); ++extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); ++extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int)); + #else +-extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); +-extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int)); ++extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); ++extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int)); + #endif + + extern void _IO_switch_to_main_get_area __P ((_IO_FILE *)); +@@ -340,22 +340,22 @@ extern _IO_size_t _IO_default_xsputn __P + _IO_size_t)); + extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t)); + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_default_seekoff __P ((_IO_FILE *, ++extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *, + _IO_off64_t, int, int)); +-extern _IO_fpos64_t _IO_default_seekpos __P ((_IO_FILE *, +- _IO_fpos64_t, int)); ++extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *, ++ _IO_off64_t, int)); + #else +-extern _IO_fpos_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); +-extern _IO_fpos_t _IO_default_seekpos __P ((_IO_FILE *, _IO_fpos_t, int)); ++extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); ++extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int)); + #endif + extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *, + _IO_ssize_t)); + extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t)); + extern int _IO_default_stat __P ((_IO_FILE *, void *)); + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int)); ++extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int)); + #else +-extern _IO_fpos_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int)); ++extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int)); + #endif + extern int _IO_default_sync __P ((_IO_FILE *)); + #define _IO_default_close ((_IO_close_t) _IO_default_sync) +@@ -389,11 +389,11 @@ extern void _IO_flush_all_linebuffered _ + extern int _IO_file_doallocate __P ((_IO_FILE *)); + extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t)); + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); +-extern _IO_fpos64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int)); ++extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); ++extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int)); + #else +-extern _IO_fpos_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); +-extern _IO_fpos_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int)); ++extern _IO_off_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); ++extern _IO_off_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int)); + #endif + extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t)); + extern int _IO_file_stat __P ((_IO_FILE *, void *)); +@@ -427,9 +427,9 @@ extern int _IO_str_underflow __P ((_IO_F + extern int _IO_str_overflow __P ((_IO_FILE *, int)); + extern int _IO_str_pbackfail __P ((_IO_FILE *, int)); + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-extern _IO_fpos64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); ++extern _IO_off64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int)); + #else +-extern _IO_fpos_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); ++extern _IO_off_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int)); + #endif + extern void _IO_str_finish __P ((_IO_FILE *, int)); + +@@ -544,12 +544,12 @@ extern int _IO_vscanf __P ((const char * + where an _IO_fpos_t is a struct. + Note that _IO_off_t must be an integral type. */ + +-/* _IO_pos_BAD is an _IO_fpos_t value indicating error, unknown, or EOF. */ ++/* _IO_pos_BAD is an _IO_off_t value indicating error, unknown, or EOF. */ + #ifndef _IO_pos_BAD + # if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 +-# define _IO_pos_BAD ((_IO_fpos64_t) -1) ++# define _IO_pos_BAD ((_IO_off64_t) -1) + # else +-# define _IO_pos_BAD ((_IO_fpos_t) -1) ++# define _IO_pos_BAD ((_IO_off_t) -1) + # endif + #endif + /* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */ +--- gcc-2.95.2/libio/streambuf.h.jj Mon Aug 9 02:07:01 1999 ++++ gcc-2.95.2/libio/streambuf.h Tue Oct 10 11:40:57 2000 +@@ -72,10 +72,10 @@ class ostream; class streambuf; + + #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 + typedef _IO_off64_t streamoff; +-typedef _IO_fpos64_t streampos; ++typedef _IO_off64_t streampos; + #else + typedef _IO_off_t streamoff; +-typedef _IO_fpos_t streampos; ++typedef _IO_off_t streampos; + #endif + typedef _IO_ssize_t streamsize; + +--- gcc-2.95.2/libio/parsestream.h.jj Fri Aug 22 00:58:20 1997 ++++ gcc-2.95.2/libio/parsestream.h Tue Oct 10 11:40:57 2000 +@@ -42,7 +42,7 @@ extern "C++" { + + class parsebuf : public streambuf { + protected: +- _IO_fpos_t pos_at_line_start; ++ _IO_off_t pos_at_line_start; + long _line_length; + unsigned long __line_number; + char *buf_start; +--- gcc-2.95.2/libio/iostream.cc.jj Sat Aug 7 08:01:46 1999 ++++ gcc-2.95.2/libio/iostream.cc Thu Nov 2 17:33:00 2000 +@@ -1,5 +1,5 @@ + /* This is part of libio/iostream, providing -*- C++ -*- input/output. +- Copyright (C) 1993, 1997 Free Software Foundation, Inc. ++ Copyright (C) 1993, 1997, 2000 Free Software Foundation, Inc. + + This file is part of the GNU IO Library. This library is free + software; you can redistribute it and/or modify it under the +@@ -687,6 +687,10 @@ ostream& ostream::operator<<(double n) + /* extra: */ 0, + #if __GLIBC_MINOR__ >= 1 + /* is_char: */ 0, ++#if __GLIBC_MINOR__ >= 2 ++ /* wide: */ 0, ++ /* i18n: */ 0, ++#endif + #endif + #endif + /* pad: */ fill() +@@ -793,6 +797,10 @@ ostream& ostream::operator<<(long double + /* extra: */ 0, + #if __GLIBC_MINOR__ >= 1 + /* is_char: */ 0, ++#if __GLIBC_MINOR__ >= 2 ++ /* wide: */ 0, ++ /* i18n: */ 0, ++#endif + #endif + #endif + /* pad: */ fill() +--- gcc-2.95.2/libio/iolibio.h.jj Tue Feb 24 21:09:50 1998 ++++ gcc-2.95.2/libio/iolibio.h Thu Nov 2 17:33:00 2000 +@@ -1,4 +1,4 @@ +-#include "libio.h" ++#include + + /* These emulate stdio functionality, but with a different name + (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */ +@@ -38,7 +38,11 @@ extern int _IO_obstack_vprintf __P ((str + _IO_va_list)); + extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...)); + #ifndef _IO_pos_BAD +-#define _IO_pos_BAD ((_IO_fpos_t)(-1)) ++# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 ++# define _IO_pos_BAD ((_IO_off64_t) -1) ++# else ++# define _IO_pos_BAD ((_IO_off_t) -1) ++# endif + #endif + #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN)) + #define _IO_fseek(__fp, __offset, __whence) \ +--- gcc-2.95.2/libio/stdstreams.cc.jj Fri Aug 22 00:58:21 1997 ++++ gcc-2.95.2/libio/stdstreams.cc Thu Nov 2 17:33:00 2000 +@@ -36,7 +36,7 @@ the executable file might be covered by + // then we don't need to, since in that case stdin/stdout/stderr + // are identical to _IO_stdin/_IO_stdout/_IO_stderr. + +-#include "libio.h" ++#include + + #ifdef _STDIO_USES_IOSTREAM + #define CIN_SBUF _IO_stdin_ Index: install/specific.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/install/specific.html,v retrieving revision 1.66 diff -u -p -r1.66 specific.html --- install/specific.html 2000/10/18 06:45:24 1.66 +++ install/specific.html 2000/11/02 17:06:34 @@ -154,6 +154,12 @@ bootstrap'.


i?86-*-linux*

+ +

If you have glibc 2.2 (or 2.1.9x), GCC 2.95.2 won't install +out-of-the-box. You'll get compile errors while building libstdc++. +The patch glibc-2.2.patch, that is to be +applied in the GCC source tree, fixes the compatibility problems.

+

You will need binutils-2.9.1.0.15 or newer for exception handling to work.

If you receive Signal 11 errors when building on GNU/Linux, then it is