Subject: Postfix build errors
To: None <tech-pkg@netbsd.org>
From: Daniel Cox <dc@microbits.com.au>
List: tech-pkg
Date: 09/28/2005 11:26:33
Hi,

I have found 2 build errors with both postfix and postfix-current on =
NetBSD 2.1RC3, pkgsrc-2005Q3.
pgsql support is enabled but does not appear to be the cause.

ERROR 1:

fsspace.c:50:25: sys/statvfs.h: No such file or directory
fsspace.c: In function `fsspace':
fsspace.c:90: error: storage size of `fsbuf' isn't known

patches/patch-ag looks like it was designed to fix this but it actually =
changes settings in a section that applies to Unix on MAC.

The following fixes the error.

*** 50,56 ****
  #endif
  #define GETTIMEOFDAY(t)       gettimeofday(t,(struct timezone *) 0)
  #define ROOT_PATH     "/bin:/usr/bin:/sbin:/usr/sbin"
! #if (defined(__NetBSD_Version__) && __NetBSD_Version__ > 200040000)
  # define USE_STATVFS
  # define STATVFS_IN_SYS_STATVFS_H
  #else
--- 51,57 ----
  #endif
  #define GETTIMEOFDAY(t)       gettimeofday(t,(struct timezone *) 0)
  #define ROOT_PATH     "/bin:/usr/bin:/sbin:/usr/sbin"
! #if (defined(__NetBSD_Version__) && __NetBSD_Version__ > 299000900)
  # define USE_STATVFS
  # define STATVFS_IN_SYS_STATVFS_H
  #else


ERROR 2:

cc -DDEF_QUEUE_DIR=3D\"/var/spool/postfix\" -DDEF_DAEMON_DIR=3D\"/usr/pkg/l=
ibexec/postfix\" -DDEF_COMMAND_DIR=3D\"/usr/pkg/sbin\" -DDEF_CONFIG_DIR=3D\=
"/usr/pkg/etc/postfix\" -DDEF_SENDMAIL_PATH=3D\"/usr/pkg/sbin/sendmail\" =
-DDEF_MAILQ_PATH=3D\"/usr/pkg/bin/mailq\" -DDEF_NEWALIAS_PATH=3D\"/usr/pkg/=
bin/newaliases\" -DDEF_MANPAGE_DIR=3D\"/usr/pkg/man\" -DDEF_SAMPLE_DIR=3D\"=
/usr/pkg/share/examples/postfix\" -DDEF_README_DIR=3D\"/usr/pkg/share/doc/p=
ostfix\" -DNO_PCRE -DHAS_PGSQL -I/usr/pkg/include/pgsql -DSNAPSHOT -g -O2 =
-I/usr/pkg/include -I/usr/include -I. -I../../include -DNETBSD2 -o master =
master.o master_conf.o master_ent.o master_sig.o master_avail.o  master_spa=
wn.o master_service.o master_status.o master_listen.o  master_vars.o =
master_wakeup.o master_flow.o ../../lib/libglobal.a ../../lib/libutil.a =
-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib =
-lpq -L/usr/lib -lcrypt -lssl -lcrypto
master.o(.text+0xc1): In function `main':
/usr/pkgsrc/mail/postfix-current/work/postfix-2.3-20050726/src/master/maste=
r.c:266: undefined reference to `closefrom'


I am not sure exactly how to fix this one but commenting out HAS_CLOSEFROM =
lets it build and install. Hopefully there are no bad side affects.


*** 123,129 ****
  #endif
 =20
  #if __NetBSD_Version__ >=3D 200060000   /* 2.0F */
! #define HAS_CLOSEFROM
  #endif
 =20
  #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >=3D 105000000) \
--- 132,138 ----
  #endif
 =20
  #if __NetBSD_Version__ >=3D 200060000   /* 2.0F */
! //#define HAS_CLOSEFROM
  #endif


Daniel Cox.