>Description: Performing a VPATH build inside an empty build directory fails to compile sql/mysqld.c since the generated db.h (which is created in $top_builddir/bdb/build_unix) isn't found:
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\"" -DDATADIR="\"/usr/local/var\"" -DSHAREDIR="\"/usr/local/share/mysql\"" -DHAVE_CONFIG_H -I. -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql -I.. -I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/../include -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/../regex -I/vol/mysql/src/mysql/dist/mysql-3.23.55/sql -I../include -I.. -I. -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -DHAVE_CURSES_H -I/vol/mysql/obj/mysql-3.23.55-dist/include -DHAVE_RWLOCK_T -c -o mysqld.o `test -f /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc || echo '/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/'`/vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc In file included from /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/mysqld.cc:26: /vol/mysql/src/mysql/dist/mysql-3.23.55/sql/ha_berkeley.h:24:16: db.h: No such file or directory As you can see, there's only a -I option pointing to /vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix (i.e. below $top_srcdir), but nothing to point at $top_builddir/bdb/build_unix. >How-To-Repeat: mkdir objdir cd objdir <path to srcdir>/configure --with-berkeley-db make >Fix: This can be worked around by adding the equivalent of $(top_builddir)/bdb/build_unix to the bdb_includes definition in config.status. Equivalent modifications need to be performed for bdb_libs and bdb_libs_with_path (where references to $srcdir are unnecessary/wrong since the library is only built in builddir). I haven't been easily able to find the correct fix for the maze of BDB related macros in acinclude.m4. =================================================================== RCS file: RCS/config.status,v retrieving revision 1.1 diff -u -r1.1 config.status --- config.status 2003/03/10 19:34:36 1.1 +++ config.status 2003/03/10 20:22:46 @@ -607,9 +607,9 @@ s,@CHARSET_SRCS@,,;t t s,@CHARSET_OBJS@,,;t t s,@CHARSETS_NEED_SOURCE@, latin1,;t t -s,@bdb_includes@,-I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix,;t t -s,@bdb_libs@,-L/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -ldb,;t t -s,@bdb_libs_with_path@,/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix/libdb.a,;t t +s,@bdb_includes@,-I/vol/mysql/src/mysql/dist/mysql-3.23.55/bdb/build_unix -I/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix,;t t +s,@bdb_libs@,-L/vol/mysql/obj/mysql-3.23.55-dist/bdb/build_unix -ldb,;t t +s,@bdb_libs_with_path@,/vol/mysql/obj/mysql-3.23.55/bdb/build_unix/libdb.a,;t t s,@innodb_includes@,,;t t s,@innodb_libs@,,;t t s,@innodb_system_libs@,,;t t >Submitter-Id: net >Originator: Rainer Orth >Organization: Faculty of Technology, Bielefeld University > >MySQL support: none >Synopsis: VPATH build fails with in-tree Berkeley DB >Severity: serious >Priority: medium >Category: mysql >Class: sw-bug >Release: mysql-3.23.55 (Source distribution) >Environment: System: SunOS padouk 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 Some paths: /vol/perl-5.8/bin/perl /vol/gnu/bin/make /vol/gnu/bin/gcc /opt/SUNWspro/bin/cc GCC: Reading specs from /vol/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.1/specs Configured with: /vol/gnu/src/gcc/gcc-3.1/configure --prefix=/vol/gnu --with-local-prefix=/vol/gnu --disable-nls Thread model: posix gcc version 3.1 Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' 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 -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /lib/libc.so.1 -rw-r--r-- 1 root bin 1766784 Aug 8 2002 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Oct 8 15:59 /usr/lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 root bin 1146168 Aug 8 2002 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--with-extra-charsets=complex' '--enable-thread-safe-client' '--with-innodb' '--with-berkeley-db' 'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' '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 -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXX=gcc' --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php