Subject: Re: Build problem with mail/bogofilter on Darwin 6.5
To: Yuji Yamano <yyamano@kt.rim.or.jp>
From: Sean J. Schluntz <schluntz@workofstone.com>
List: tech-pkg
Date: 05/06/2003 09:26:53
In message <20030507.004310.92590083.yyamano@kt.rim.or.jp>, Yuji Yamano writes:
>Sean,
>
>"Sean J. Schluntz" <schluntz@workofstone.com> writes:
>
>> But for some reason bogofilter doesn't recognize it.  When trying to 
>> built it by hand it reports it can't find DB at all.  When using the
>> packages version the config.log shows:
>
>Could you check if you have the declaration of db_cretae()
>in /usr/pkg/include/db4/db.h? 

  ttyp1 blue-schluntz> grep db_create /usr/pkg/include/db4/db.h
   * Flags private to db_create.
  int db_create __P((DB **, DB_ENV *, u_int32_t));


>Also could you try to build it with CFLAGS=-v and give me config.log?

I've attached the part I think you need below, if you need the entire
file let me know and I will post it on a web site (23k, dont' want
to spam the whole list with it.)


>Mine is Darwin 5.2 and I can build bogofilter.

Joy, well at least it's working on one release :) what version of gcc are
you using? I'm on:

  Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
  Thread model: posix
  Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 20020420 (prerelease)




### extract from config.log
configure:3274: checking whether db_create is declared
configure:3301: cc -c -v  -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsh
adow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-re
turn -Wmissing-declarations -Wmissing-format-attribute -Wnested-externs -fno-com
mon -Wchar-subscripts -Wcomment -Wimplicit -Wsequence-point -Wreturn-type -Wfloa
t-equal -Wpointer-arith -Wno-system-headers -I/usr/pkg/include/db4 -no-cpp-preco
mp -I/usr/pkg/include conftest.c >&5
Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1175, based on gcc version 3.1 20020420 (prerel
ease)
 /usr/libexec/gcc/darwin/ppc/3.1/cc1 -lang-c -v -I/Volumes/Blue_UFS/usr/pkgsrc/m
ail/bogofilter/work/.buildlink/include/db4 -I/Volumes/Blue_UFS/usr/pkgsrc/mail/b
ogofilter/work/.buildlink/include -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCH
LEVEL__=0 -D__APPLE_CC__=1175 -D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNMENT__ -D
__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__ppc__ -D__POWERPC__ -D__NATURAL_ALIGNM
ENT__ -D__MACH__ -D__BIG_ENDIAN__ -D__APPLE__ -D__NO_INLINE__ -D__STDC_HOSTED__=
1 -D__DYNAMIC__ conftest.c -fPIC -quiet -dumpbase conftest.c -Wall -W -Wstrict-p
rototypes -Wmissing-prototypes -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-a
lign -Wwrite-strings -Waggregate-return -Wmissing-declarations -Wmissing-format-
attribute -Wnested-externs -Wchar-subscripts -Wcomment -Wimplicit -Wsequence-poi
nt -Wreturn-type -Wfloat-equal -Wpointer-arith -Wno-system-headers -version -fno
-common -o - |
 /usr/libexec/gcc/darwin/ppc/as -arch ppc -o conftest.o
GNU CPP version 3.1 20020420 (prerelease) (cpplib) (Darwin/PowerPC)
GNU C version 3.1 20020420 (prerelease) (ppc-darwin)
        compiled by GNU C version 3.1 20020420 (prerelease).
ignoring nonexistent directory "/usr/lib/gcc-lib/ppc-darwin/3.1/../../../../ppc-
darwin/include"
ignoring nonexistent directory "/Local/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /Volumes/Blue_UFS/usr/pkgsrc/mail/bogofilter/work/.buildlink/include/db4
 /Volumes/Blue_UFS/usr/pkgsrc/mail/bogofilter/work/.buildlink/include
 /usr/local/include
 /usr/include/gcc/darwin/3.1
 /usr/include
End of search list.
Framework search starts here:
 /System/Library/Frameworks
 /Library/Frameworks
End of framework search list.
configure:3296: warning: function declaration isn't a prototype
configure: In function `main':
configure:3298: `db_create' undeclared (first use in this function)
configure:3298: (Each undeclared identifier is reported only once
configure:3298: for each function it appears in.)
configure:3298: warning: unused variable `p'
configure:3304: $? = 1
configure: failed program was:
| #line 3279 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "bogofilter"
| #define PACKAGE_TARNAME "bogofilter"
| #define PACKAGE_VERSION "0.11.1.3"
| #define PACKAGE_STRING "bogofilter 0.11.1.3"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "bogofilter"
| #define VERSION "0.11.1.3"
| #define YYTEXT_POINTER 1
| #define HAVE_LIBM 1
| /* end confdefs.h.  */
| #include <db.h>
| 
| 
| int
| main ()
| {
| #ifndef db_create
|   char *p = (char *) db_create;
| #endif
| 
|   ;
|   return 0;
| }
configure:3321: result: no
configure:3337: error: Can not locate a suitable BerkeleyDB db.h header file.
Use --with-db=PATH to specify the path to a v3+ install directory.
You can download BerkeleyDB 4.0.x from http://www.sleepycat.com/