dbTalk Databases Forums  

php_db4: Compile failed

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss php_db4: Compile failed in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Maurice
 
Posts: n/a

Default php_db4: Compile failed - 04-09-2006 , 07:50 AM






Hi @all,

I tried to compile the php_db4 extension in order to use bdb4
transactions along with php4 (not possible with standard dba_*
functions from php4).

What I did so far is:
- compiled and installed the Berkley DB 4.4 libs without problems
- tried the following in /root/db-4.4.20/php_db4
# phpize
# ./configure --with-db4=/usr/local/BerkeleyDB.4.4/lib
# make

However this extension won't compile...
I'm using Debian 3.1 stable with PHP 4.3.10, Apache2, Berkley DB 4.4
(compiled from sources) and GCC 3.3.5.

Output:

~/db-4.4.20/php_db4# make

/bin/sh /root/db-4.4.20/php_db4/libtool --mode=compile g++ -I.
-I/root/db-4.4.20/php_db4 -DPHP_ATOM_INC
-I/root/db-4.4.20/php_db4/include -I/root/db-4.4.20/php_db4/main
-I/root/db-4.4.20/php_db4 -I/usr/include/php4 -I/usr/include/php4/main
-I/usr/include/php4/Zend -I/usr/include/php4/TSRM
-I/usr/local/BerkeleyDB.4.4/include -DHAVE_CONFIG_H -c
/root/db-4.4.20/php_db4/db4.cpp -o db4.lo
mkdir .libs
g++ -I. -I/root/db-4.4.20/php_db4 -DPHP_ATOM_INC
-I/root/db-4.4.20/php_db4/include -I/root/db-4.4.20/php_db4/main
-I/root/db-4.4.20/php_db4 -I/usr/include/php4 -I/usr/include/php4/main
-I/usr/include/php4/Zend -I/usr/include/php4/TSRM
-I/usr/local/BerkeleyDB.4.4/include -DHAVE_CONFIG_H -c
/root/db-4.4.20/php_db4/db4.cpp -fPIC -DPIC -o .libs/db4.o
In file included from /usr/include/c++/3.3/backward/iostream.h:31,
from /usr/local/BerkeleyDB.4.4/include/db_cxx.h:60,
from /root/db-4.4.20/php_db4/db4.cpp:24:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning:
#warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or <sstream> instead of
the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.
In file included from /root/db-4.4.20/php_db4/db4.cpp:24:
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:61:23: exception.h: No such
file or directory
In file included from /root/db-4.4.20/php_db4/db4.cpp:24:
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1032: error: parse error
before `{'
token
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1035: error: parse error
before `int
'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1036: error: parse error
before `
const'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1037: error: parse error
before `
const'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1038: error: parse error
before `
const'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1039: error: non-member
function `
int get_errno()' cannot have `const' method qualifier
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1040: error: virtual outside
class
declaration
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1040: error: non-member
function `
const char* what()' cannot have `const' method qualifier
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1041: error: non-member
function `
DbEnv* get_env()' cannot have `const' method qualifier
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1044: error: parse error
before `
const'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1045: error: `DbException&
operator=(const DbException&)' must be a nonstatic member function
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1045: error: `DbException&
operator=(const DbException&)' must take exactly two arguments
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1047: error: parse error
before `
private'
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1053: error: parse error
before `}'
token
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1060: error: base class
`DbException
' has incomplete type
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1076: error: base class
`DbException
' has incomplete type
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1106: error: base class
`DbException
' has incomplete type
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1125: error: base class
`DbException
' has incomplete type
/usr/local/BerkeleyDB.4.4/include/db_cxx.h:1139: error: base class
`DbException
' has incomplete type
make: *** [db4.lo] Error 1


Anyone any ideas?

Thank you in advance,
Maurice.


Reply With Quote
  #2  
Old   
Maurice
 
Posts: n/a

Default Re: php_db4: Compile failed - 04-09-2006 , 09:02 AM






Ok, solved it:

# pwd
/root/db-4.4.20/build_unix
# CPPFLAGS=-DHAVE_CXX_STDHEADERS ../dist/configure --enable-cxx
# make
# make install

# cd ../php_db4
# pwd
/root/db-4.4.20/php_db4
# CPPFLAGS=-DHAVE_CXX_STDHEADERS ./configure
--with-db4=/usr/local/BerkeleyDB.4.4/lib
# make

DONE!

For more info about HAVE_CXX_STDHEADERS see:
http://groups.google.com/group/comp....70d4725c747d06


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.