This discussion is archived
3 Replies Latest reply: Jul 30, 2012 5:03 PM by 741307 RSS

Dbxml for php: second_arg_force_ref was declared in this scope

741307 Newbie
Currently Being Moderated
Hi all,
I'm getting this error after going into the db-4.8.26 folder and running make.
phpize
./configure --with-db4=$PWD/../../install
make

I was following this thread here but there's no open solution there now.
Berkeley DB XML and PHP 5.3

Here is the output (from the configure onwards)
*root@projects-test:/tmp/dbxml-2.5.16/db-4.8.26/php_db4# ./configure --with-db4=$PWD/../../install*
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable db4 support... yes, shared
checking whether to link against mod_db4... yes, shared
checking if we really need to link against mod_db4... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
configure: WARNING: *** A note about pthreads ***
The db4 c++ library by default tries to link against libpthread on some
systems (notably Linux). If your PHP install is not linked against
libpthread, you will need to disable pthread support in db4. This can
be done by compiling db4 with the flag --with-mutex=x86/gcc-assembly.
PHP can itself be forced to link against libpthread either by manually editing
its build files (which some distributions do), or by building it with
--with-experimental-zts.
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands

root@projects-test:/tmp/dbxml-2.5.16/db-4.8.26/php_db4# make
/bin/bash /tmp/dbxml-2.5.16/db-4.8.26/php_db4/libtool --mode=compile g++  -I. -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4 -DPHP_ATOM_INC -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/include -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/main -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/../../install/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp -o db4.lo
libtool: compile: g++ -I. -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4 -DPHP_ATOM_INC -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/include -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/main -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/tmp/dbxml-2.5.16/db-4.8.26/php_db4/../../install/include -DHAVE_CONFIG_H -g -O2 -c /tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp -fPIC -DPIC -o .libs/db4.o
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:193:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:342:9: error: 'second_arg_force_ref' was not declared in this scope
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:342:9: error: 'second_arg_force_ref' was not declared in this scope
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'int zm_startup_db4(int, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:406:98: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:407:95: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:408:87: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:409:96: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:414:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'DB_ENV* php_db4_getDbEnvFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:671:104: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'php_DB_ENV* php_db4_getPhpDbEnvFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:684:104: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'php_DB* getPhpDbFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:719:94: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'DB* php_db4_getDbFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:730:94: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'DB_TXN* php_db4_getDbTxnFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:788:108: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'php_DB_TXN* getPhpDbTxnFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:801:108: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'DBC* php_db4_getDbcFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:880:103: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'php_DBC* getPhpDbcFromObj(zval*)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:893:103: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_txn_commit(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:969:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_txn_set_timeout(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1026:80: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_txn_set_name(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1047:78: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapnew_db4(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1103:51: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_open(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1143:50: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_del(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1198:49: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_get(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1227:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_pget(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1261:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_set_encrypt(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1328:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_stat(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1361:91: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_join(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1474:46: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_put(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1514:78: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_truncate(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1562:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_cursor(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1590:91: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_close(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1623:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_count(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1642:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_del(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1659:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_dup(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1679:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_get(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1704:89: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_pget(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1740:99: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdbc_put(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1780:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapnew_DbEnv(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1821:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_close(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1849:69: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_dbremove(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1872:66: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_dbrename(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1901:39: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_open(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1932:22: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_remove(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1957:87: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_set_data_dir(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1975:75: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_set_encrypt(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:1995:15: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_txn_begin(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:2033:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp: In function 'void wrapdb_env_txn_checkpoint(int, zval*, zval**, zval*, int)':
/tmp/dbxml-2.5.16/db-4.8.26/php_db4/db4.cpp:2066:87: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
make: *** [db4.lo] Error 1
root@projects-test:/tmp/dbxml-2.5.16/db-4.8.26/php_db4#

Edited by: user8894150 on Jul 8, 2012 12:42 PM
Removed configure output from previous command.
  • 1. Re: Dbxml for php: second_arg_force_ref was declared in this scope
    cj Employee ACE
    Currently Being Moderated
    This works for me:

    Download PHP 5.3.14
    Download BDB XML 2.5.16 (I normally use just the Berkeley DB 11gR2 download when I want the PHP DBA extension or to use BDB with PHP's SQLite3 extension)

    cd $HOME
    tar -xzf dbxml-2.5.16.tar.gz
    cd dbxml-2.5.16/db-4.8.26/build_unix/
    ../dist/configure --prefix=$HOME/bdb-4.8.26
    make install

    cd $HOME
    tar -jxf php-5.3.14.tar.bz2
    cd php-5.3.14
    ./configure prefix=$HOME/php5314 disable-all
    make install
    cp php.ini-development $HOME/php5314/lib/php.ini

    cd ext/dba
    export PATH=$PATH:$HOME/php5314/bin
    phpize
    ./configure --with-db4=$HOME/bdb-4.8.26
    make install

    echo "date.timezone = America/Los_Angeles
    extension_dir = /home/cjones/php5314/lib/php/extensions/no-debug-non-zts-20090626/
    extension = dba.so" >> $HOME/php5314/lib/php.ini

    Check the modules loaded:

    $ php -m
    [PHP Modules]
    Core
    date
    dba
    ereg
    pcre
    Reflection
    SPL
    standard

    [Zend Modules]

    Check the DBA extension:

    $ php -r '$f = "/tmp/dba1.db"; $d = dba_open($f, "c", "db4"); dba_insert("k1", "v1", $d); $v = dba_fetch("k1", $d); var_dump($v);'
    string(2) "v1"
  • 2. Re: Dbxml for php: second_arg_force_ref was declared in this scope
    741307 Newbie
    Currently Being Moderated
    Thanks for the reply, I tried what you suggested and got an error about iostream.h no such file or directory. I did some reading and saw some suggestions that I needed to pass the --enable-cxx flag when doing the main build, so I redid that. I'm not even sure if that was necessary, but I got the dba module to build. How do I build dbxml.so though? I'm not sure what arguments to pass to configure. Do I use with-dbxml, prefix? When I run make I keep getting a no such file or directory error, unable to find ext/db4/php_db4.h I think.

    I extracted db-xml-2.5.16.tar.gz ahd PHP 5.3.15 (tar.gz) into $HOME/tmp. I installed PHP 5.3.15 into $HOME/php5314 (made a mistake with the numbers there).

    These are the steps I followed:
    cd ~/tmp/
    tar -xvf dbxml-2.5.16.tar.gz
    cd dbxml-2.5.16/db-4.8.26/build_unix/
    ../dist/configure prefix=$HOME/tmp/dbxml-2.5.16/db-4.8.26 enable-cxx
    make
    make install

    # build PHP
    cd ~/tmp
    tar -xvf php-5.3.15.tar.gz
    cd php-5.3.15
    ./configure prefix=$HOME/*php5314* disable-all # should have called that 5315... oops
    make install
    cp php.ini-development $HOME/php5314/lib/php.ini

    # Building dba
    cd ext/dba
    export PATH=$PATH:$HOME/php5314/bin
    phpize
    ./configure --with-db4=$HOME/bdb-4.8.26
    sudo make install

    # Now for dbxml
    cd $HOME/tmp/dbxml-2.5.16/dbxml/src/php
    phpize
    *./configure ?????*
    make
    /bin/bash /home/jay/tmp/dbxml-2.5.16/dbxml/src/php/libtool --mode=compile g++  -I. -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php -DPHP_ATOM_INC -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php/include -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php/main -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/include -I/home/jay/tmp/dbxml-2.5.16/db-4.8.26/php_db4  -DHAVE_CONFIG_H  -g -O2   -c /home/jay/tmp/dbxml-2.5.16/dbxml/src/php/php_dbxml.cpp -o php_dbxml.lo
    libtool: compile: g++ -I. -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php -DPHP_ATOM_INC -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php/include -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php/main -I/home/jay/tmp/dbxml-2.5.16/dbxml/src/php -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/include -I/home/jay/tmp/dbxml-2.5.16/db-4.8.26/php_db4 -DHAVE_CONFIG_H -g -O2 -c /home/jay/tmp/dbxml-2.5.16/dbxml/src/php/php_dbxml.cpp -fPIC -DPIC -o .libs/php_dbxml.o
    In file included from /home/jay/tmp/dbxml-2.5.16/dbxml/src/php/php_dbxml.cpp:10:0:
    */home/jay/tmp/dbxml-2.5.16/dbxml/src/php/php_dbxml_int.hpp:24:29: fatal error: ext/db4/php_db4.h: No such file or directory*
    compilation terminated.
    make: *** [php_dbxml.lo] Error 1
  • 3. Re: Dbxml for php: second_arg_force_ref was declared in this scope
    741307 Newbie
    Currently Being Moderated
    Hi any help with this? If I can't figure this one out I think we're going to have to rebuild our entire app using a different platform.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points