Bug #16808 MySQL 5 build fails when BerkeleyDB4.2 support included
Description:
Build from source aborts when BerkeleyDB 4.2 support included in config.
Config/Build script:
#!/bin/sh
PATH=/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/local/ssl/bin:/usr/bin:/usr/sbin
export PATH
CC="gcc"
export CC
CXX="gcc"
export CXX
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa"
export CFLAGS
CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g"
export CXXFLAGS
CPPFLAGS="-I/usr/local/include:/usr/local/ssl/include:/usr/include"
export CPPFLAGS
LDFLAGS="-L/usr/local/lib:/usr/local/ssl/lib:/usr/ccs/lib:/usr/lib -R/usr/local/lib:/usr/local/ssl/lib:/usr/ccs/lib:/usr/lib"
export LDFLAGS
LD_LIBRARY_PATH=""
export LD_LIBRARY_PATH
cd mysql-5.0.19-nightly-20060115
./configure --prefix=/usr/local/mysql \
--sysconfdir=/etc/mysql \
--localstatedir=/var/mysql \
--enable-assembler \
--with-extra-charsets=complex \
--enable-thread-safe-client \
--without-gnu-ld \
--with-server-suffix \
--with-unix-socket-path=/tmp/mysql.sock \
--with-mysqld-user=mysql \
--with-zlib-dir=/usr/local \
--with-libwrap=/usr/local \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib \
--without-berkeley-db \
--without-bench \
--without-ndbcluster
[ $? = 0 ] && make -j 4
Note - CFLAGS and CXXFLAGS values taken from solaris build script in ./BUILD subdirectory. CPPFLAGS and LDFLAGS settings are necessary, as my system default search paths only looks in /usr/include and /usr/lib.
Build output at point of failure:
<..snip loads of compile output..>
if gcc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/var/mysql\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/local/BerkeleyDB.4.2/include -I../innobase/include -I../include -I../include -I../regex -I. -I/usr/local/ssl/include -I/usr/local/include:/usr/local/ssl/include:/usr/local/BerkeleyDB.4.2/include:/usr/include -I/usr/local/include -DDBUG_OFF -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g -fno-implicit-templates -fno-exceptions -fno-rtti -D_FILE_OFFSET_BITS=64 -DHAVE_CURSES_H -I/var/build/mysql-5.0.19-nightly-20060115/include -DHAVE_RWLOCK_T -MT ha_ndbcluster.o -MD -MP -MF ".deps/ha_ndbcluster.Tpo" -c -o ha_ndbcluster.o ha_ndbcluster.cc; \
then mv -f ".deps/ha_ndbcluster.Tpo" ".deps/ha_ndbcluster.Po"; else rm -f ".deps/ha_ndbcluster.Tpo"; exit 1; fi
ha_berkeley.cc:104: error: type specifier omitted for parameter `db_notices'
ha_berkeley.cc:104: error: parse error before `)' token
ha_berkeley.cc: In function `bool berkeley_init()':
ha_berkeley.cc:177: error: `set_noticecall' undeclared (first use this
function)
ha_berkeley.cc:177: error: (Each undeclared identifier is reported only once
for each function it appears in.)
ha_berkeley.cc: In function `int berkeley_commit(THD*, bool)':
ha_berkeley.cc:261: error: `txn_commit' undeclared (first use this function)
ha_berkeley.cc: In function `int berkeley_rollback(THD*, bool)':
ha_berkeley.cc:276: error: `txn_abort' undeclared (first use this function)
ha_berkeley.cc: At global scope:
ha_berkeley.cc:340: error: type specifier omitted for parameter `db_notices'
ha_berkeley.cc:340: error: parse error before `)' token
ha_berkeley.cc: In function `void berkeley_noticecall(...)':
ha_berkeley.cc:342: error: `notice' undeclared (first use this function)
ha_berkeley.cc:344: error: `DB_NOTICE_LOGFILE_CHANGED' undeclared (first use
this function)
ha_berkeley.cc: In function `int berkeley_cmp_packed_key(DB*, const DBT*, const
DBT*)':
ha_berkeley.cc:454: error: 'const struct __db_dbt' has no member named '
app_private'
ha_berkeley.cc:454: error: 'const struct __db_dbt' has no member named '
app_private'
ha_berkeley.cc: In member function `virtual int ha_berkeley::open(const char*,
int, unsigned int)':
ha_berkeley.cc:626: error: `txn_begin' undeclared (first use this function)
ha_berkeley.cc: In member function `DBT* ha_berkeley::create_key(DBT*, unsigned
int, char*, const byte*, int)':
ha_berkeley.cc:878: error: 'struct __db_dbt' has no member named 'app_private'
ha_berkeley.cc: In member function `DBT* ha_berkeley::pack_key(DBT*, unsigned
int, char*, const byte*, unsigned int)':
ha_berkeley.cc:919: error: 'struct __db_dbt' has no member named 'app_private'
ha_berkeley.cc: In member function `int ha_berkeley::read_row(int, char*,
unsigned int, DBT*, DBT*, bool)':
ha_berkeley.cc:1454: error: 'struct DBT' has no member named 'app_private'
ha_berkeley.cc: In member function `virtual int
ha_berkeley::external_lock(THD*, int)':
ha_berkeley.cc:1858: error: `txn_begin' undeclared (first use this function)
ha_berkeley.cc:1893: error: `txn_commit' undeclared (first use this function)
ha_berkeley.cc: In member function `virtual int ha_berkeley::start_stmt(THD*,
thr_lock_type)':
ha_berkeley.cc:1922: error: `txn_begin' undeclared (first use this function)
ha_berkeley.cc: In member function `virtual ulonglong
ha_berkeley::get_auto_increment()':
ha_berkeley.cc:2185: error: 'struct DBT' has no member named 'app_private'
make[4]: *** [ha_berkeley.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/var/build/mysql-5.0.19-nightly-20060115/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/build/mysql-5.0.19-nightly-20060115/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/build/mysql-5.0.19-nightly-20060115/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/build/mysql-5.0.19-nightly-20060115'
make: *** [all] Error 2
How to repeat:
Include the following in the configure command line:
--with-berkeley-db=/usr/local/BerkeleyDB.4.2 \
--with-berkeley-db-includes=/usr/local/BerkeleyDB.4.2/include \
--with-berkeley-db-libs=/usr/local/BerkeleyDB.4.2/lib \
Build continues to completion without these.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.