Subject: pkg/35417: opencobol doesn't build with db4
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 01/13/2007 17:05:00
>Number:         35417
>Category:       pkg
>Synopsis:       opencobol doesn't build with db4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 13 17:05:00 +0000 2007
>Originator:     David A. Holland <>
>Release:        NetBSD 2.1.0_STABLE (-20061223)
   Harvard EECS
System: NetBSD bantha 2.1.0_STABLE NetBSD 2.1.0_STABLE (GENERIC) #3: Fri Dec  1 14:58:15 EST 2006  root@bantha:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

If you have 

lang/opencobol fails to build. This is because its configure stuff
assumes that if it can find dbopen without taking any special steps it
must have db 1.85. With the above settings that's not true, and so it
includes the wrong header and bombs.


Set the default to db4 and build opencobol. It fails on libcob/fileio.c.


(1) Add this patch so it'll always have --with-db if it's not using db1:

Index: Makefile
RCS file: /cvsroot/pkgsrc/lang/opencobol/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	11 Jan 2007 11:56:08 -0000	1.15
+++ Makefile	13 Jan 2007 16:56:47 -0000
@@ -33,4 +33,7 @@
 .include "../../devel/libltdl/"
 .include "../../devel/ncurses/"
 .include "../../mk/"
+.if ${BDB_TYPE} != "db1"
+CONFIGURE_ARGS+=	--with-db
 .include "../../mk/"

and (2) add this patch as patches/patch-ab or whatever so it uses the
right header file.

--- libcob/fileio.c.orig	2005-05-03 05:31:14.000000000 -0400
+++ libcob/fileio.c	2007-01-13 11:42:01.000000000 -0500
@@ -48,7 +48,11 @@
+#if defined(WITH_DB)
+#include <db_185.h>
 #include <db.h>
 #if HAVE_DB1_DB_H
 #include <db1/db.h>

Note that this is still a hack; the right fix is to straighten out and not try to use the results of function tests to
govern header inclusion.