Bug 152886 - databases/py-bsddb fails to build with databases/db51
Summary: databases/py-bsddb fails to build with databases/db51
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 12:20 UTC by Anatoly Borodin
Modified: 2011-10-04 17:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anatoly Borodin 2010-12-07 12:20:04 UTC
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.

Fix: 

The old constant names should be patched, but the logic should be checked too.
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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-12-07 12:20:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2011-09-15 15:15:12 UTC
State Changed
From-To: open->feedback

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
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2011-10-04 17:42:15 UTC
Responsible Changed
From-To: freebsd-python->sunpoet

I'll take it.
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-10-04 17:44:21 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"
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2011-10-04 17:44:38 UTC
State Changed
From-To: feedback->closed

Problem solved in the ports tree.