From nobody@FreeBSD.org  Tue Dec  7 12:17:19 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 306671065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Dec 2010 12:17:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 060338FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  7 Dec 2010 12:17:19 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oB7CHIWS016856
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 7 Dec 2010 12:17:18 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oB7CHIMB016855;
	Tue, 7 Dec 2010 12:17:18 GMT
	(envelope-from nobody)
Message-Id: <201012071217.oB7CHIMB016855@red.freebsd.org>
Date: Tue, 7 Dec 2010 12:17:18 GMT
From: Anatoly Borodin <anatoly.borodin@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: databases/py-bsddb fails to build with databases/db51
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152886
>Category:       ports
>Synopsis:       databases/py-bsddb fails to build with databases/db51
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 07 12:20:04 UTC 2010
>Closed-Date:    Tue Oct 04 16:44:38 UTC 2011
>Last-Modified:  Tue Oct  4 16:50:12 UTC 2011
>Originator:     Anatoly Borodin
>Release:        
>Organization:
>Environment:
>Description:
The constants like DB_XIDDATASIZE were renamed in db51 or earlier releases.

I don't know if I could use databases/py-bsddb3 instead, but databases/py-bsddb is being used by a dozen of other ports.
>How-To-Repeat:
# cd /usr/ports/databases/py-bsddb && make
===>  License check disabled, port has not defined LICENSE
===>  Extracting for py26-bsddb-2.6.6_2
=> SHA256 Checksum OK for python/Python-2.6.6.tgz.
===>  Patching for py26-bsddb-2.6.6_2
/usr/bin/sed -i.bak -e  's,^\(#include.*\)\(db\.h.*\)$,\1/usr/local/include/db51/\2,'  /usr/obj/usr/ports/databases/py-bsddb/work/Python-2.6.6/Modules/bsddb.h
===>   py26-bsddb-2.6.6_2 depends on file: /usr/local/bin/python2.6 - found
===>   py26-bsddb-2.6.6_2 depends on shared library: db-5.1.0 - found
===>  Configuring for py26-bsddb-2.6.6_2
running config
===>  Building for py26-bsddb-2.6.6_2
running build
running build_ext
building '_bsddb' extension
creating build
creating build/temp.freebsd-8.1-STABLE-i386-2.6
cc -DNDEBUG -O2 -pipe -march=native -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x100000 -fno-strict-aliasing -O2 -pipe -march=native -fno-strict-aliasing -fPIC -I/usr/local/include -I/usr/local/include/python2.6 -c _bsddb.c -o build/temp.freebsd-8.1-STABLE-i386-2.6/_bsddb.o
_bsddb.c: In function 'DBEnv_txn_recover':
_bsddb.c:4514: warning: passing argument 4 of 'self->db_env->txn_recover' from incompatible pointer type
_bsddb.c:4525: error: 'DB_XIDDATASIZE' undeclared (first use in this function)
_bsddb.c:4525: error: (Each undeclared identifier is reported only once
_bsddb.c:4525: error: for each function it appears in.)
_bsddb.c: In function 'DBEnv_set_rpc_server':
_bsddb.c:5065: error: 'DB_ENV' has no member named 'set_rpc_server'
_bsddb.c: In function 'DBTxn_prepare':
_bsddb.c:5952: error: 'DB_XIDDATASIZE' undeclared (first use in this function)
_bsddb.c: In function 'init_bsddb':
_bsddb.c:7095: error: 'DB_RPCCLIENT' undeclared (first use in this function)
_bsddb.c:7101: error: 'DB_XA_CREATE' undeclared (first use in this function)
_bsddb.c:7118: error: 'DB_XIDDATASIZE' undeclared (first use in this function)
error: command 'cc' failed with exit status 1
*** Error code 1

Stop in /usr/ports/databases/py-bsddb.

>Fix:
The old constant names should be patched, but the logic should be checked too.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-python 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Dec 7 12:20:13 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152886 
State-Changed-From-To: open->feedback 
State-Changed-By: sunpoet 
State-Changed-When: Thu Sep 15 14:15:12 UTC 2011 
State-Changed-Why:  
Please try this patch [1].  Save it as 
${PORTSDIR}/databases/py-bsddb/files/patch-_bsddb.c and build 
databases/py-bsddb with databases/db5. 

[1] 
http://people.freebsd.org/~sunpoet/patch/py-bsddb__files__patch-_bsddb.c 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152886 
Responsible-Changed-From-To: freebsd-python->sunpoet 
Responsible-Changed-By: sunpoet 
Responsible-Changed-When: Tue Oct 4 16:42:15 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152886 
State-Changed-From-To: feedback->closed 
State-Changed-By: sunpoet 
State-Changed-When: Tue Oct 4 16:44:38 UTC 2011 
State-Changed-Why:  
Problem solved in the ports tree. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152886 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/152886: commit references a PR
Date: Tue,  4 Oct 2011 16:44:21 +0000 (UTC)

 sunpoet     2011-10-04 16:44:07 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/py-bsddb   Makefile 
   Added files:
     databases/py-bsddb/files patch-_bsddb.c 
   Log:
   - Fix build with db5
   - Cosmetic change
   
   PR:             ports/152886
   Reported by:    Anatoly Borodin <anatoly.borodin@gmail.com>
   
   Revision  Changes    Path
   1.16      +2 -2      ports/databases/py-bsddb/Makefile
   1.1       +63 -0     ports/databases/py-bsddb/files/patch-_bsddb.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
