Bug #9698 Configure does not set #define HAVE_DLFCN_H 1 in bdb/db_config.h
Submitted: 7 Apr 2005 0:16 Modified: 20 May 2006 20:26
Reporter: Boyd GERBER Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:mysql-4.1.11 OS:UnixWare 7.1.4
Assigned to: Kent Boortz CPU Architecture:Any

[7 Apr 2005 0:16] Boyd GERBER
Description:
MySQL-4.1.11 when you run

CC="cc" CFLAGS="-I/usr/local/include" CXX="CC" CFLAGS="-I/usr/local/include" ./configure --prefix=/usr/local/mysql --enable-thread-safe-client --with-innodb --with-openssl --with-extra-charsets=complex

db_config.h has
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_DIRENT_H */

instead of

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
#define HAVE_DIRENT_H 1

How to repeat:
run this command in the mysql main source directory.

CC="cc" CFLAGS="-I/usr/local/include" CXX="CC" CFLAGS="-I/usr/local/include" ./c
onfigure --prefix=/usr/local/mysql --enable-thread-safe-client --with-innodb --w
ith-openssl --with-extra-charsets=complex

cd bdb/build_unix

edit db_config.h

Suggested fix:
Fix configure
[7 Apr 2005 2:32] Boyd GERBER
Actually all these have problems.

*** ../mysql-4.1.10/bdb/build_unix/db_config.h  Thu Apr  7 02:16:10 2005
--- bdb/build_unix/db_config.h  Tue Apr  5 19:21:57 2005
***************
*** 27,33 ****
  
  /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
     */
! #define HAVE_DIRENT_H 1
  
  /* Define to 1 if you have the <dlfcn.h> header file. */
  #define HAVE_DLFCN_H 1
--- 27,33 ----
  
  /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
     */
! /* #undef HAVE_DIRENT_H */
  
  /* Define to 1 if you have the <dlfcn.h> header file. */
  #define HAVE_DLFCN_H 1
***************
*** 42,57 ****
  /* #undef HAVE_FILESYSTEM_NOTZERO */
  
  /* Define to 1 if you have the `getcwd' function. */
! #define HAVE_GETCWD 1
  
  /* Define to 1 if you have the `getopt' function. */
! #define HAVE_GETOPT 1
  
  /* Define to 1 if you have the `gettimeofday' function. */
! #define HAVE_GETTIMEOFDAY 1
  
  /* Define to 1 if you have the `getuid' function. */
! #define HAVE_GETUID 1
  
  /* Define to 1 if you have the <inttypes.h> header file. */
  #define HAVE_INTTYPES_H 1
--- 42,57 ----
  /* #undef HAVE_FILESYSTEM_NOTZERO */
  
  /* Define to 1 if you have the `getcwd' function. */
! /* #undef HAVE_GETCWD */
  
  /* Define to 1 if you have the `getopt' function. */
! /* #undef HAVE_GETOPT */
  
  /* Define to 1 if you have the `gettimeofday' function. */
! /* #undef HAVE_GETTIMEOFDAY */
  
  /* Define to 1 if you have the `getuid' function. */
! /* #undef HAVE_GETUID */
  
  /* Define to 1 if you have the <inttypes.h> header file. */
  #define HAVE_INTTYPES_H 1
***************
*** 60,87 ****
  /* #undef HAVE_LIBNSL */
  
  /* Define to 1 if you have the `memcmp' function. */
! #define HAVE_MEMCMP 1
  
  /* Define to 1 if you have the `memcpy' function. */
! #define HAVE_MEMCPY 1
  
  /* Define to 1 if you have the `memmove' function. */
! #define HAVE_MEMMOVE 1
  
  /* Define to 1 if you have the <memory.h> header file. */
  #define HAVE_MEMORY_H 1
  
  /* Define to 1 if you have the `mlock' function. */
! #define HAVE_MLOCK 1
  
  /* Define to 1 if you have the `mmap' function. */
! #define HAVE_MMAP 1
  
  /* Define to 1 if you have the `munlock' function. */
! #define HAVE_MUNLOCK 1
  
  /* Define to 1 if you have the `munmap' function. */
! #define HAVE_MUNMAP 1
  
  /* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */
  /* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
--- 60,87 ----
  /* #undef HAVE_LIBNSL */
  
  /* Define to 1 if you have the `memcmp' function. */
! /* #undef HAVE_MEMCMP */
  
  /* Define to 1 if you have the `memcpy' function. */
! /* #undef HAVE_MEMCPY */
  
  /* Define to 1 if you have the `memmove' function. */
! /* #undef HAVE_MEMMOVE */
  
  /* Define to 1 if you have the <memory.h> header file. */
  #define HAVE_MEMORY_H 1
  
  /* Define to 1 if you have the `mlock' function. */
! /* #undef HAVE_MLOCK */
  
  /* Define to 1 if you have the `mmap' function. */
! /* #undef HAVE_MMAP */
  
  /* Define to 1 if you have the `munlock' function. */
! /* #undef HAVE_MUNLOCK */
  
  /* Define to 1 if you have the `munmap' function. */
! /* #undef HAVE_MUNMAP */
  
  /* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */
  /* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
***************
*** 179,215 ****
  /* #undef HAVE_O_DIRECT */
  
  /* Define to 1 if you have the `pread' function. */
! #define HAVE_PREAD 1
  
  /* Define to 1 if you have the `pstat_getdynamic' function. */
  /* #undef HAVE_PSTAT_GETDYNAMIC */
  
  /* Define to 1 if you have the `pwrite' function. */
! #define HAVE_PWRITE 1
  
  /* Define to 1 if building on QNX. */
  /* #undef HAVE_QNX */
  
  /* Define to 1 if you have the `qsort' function. */
! #define HAVE_QSORT 1
  
  /* Define to 1 if you have the `raise' function. */
! #define HAVE_RAISE 1
  
  /* Define to 1 if building RPC client/server. */
  /* #undef HAVE_RPC */
  
  /* Define to 1 if you have the `sched_yield' function. */
! #define HAVE_SCHED_YIELD 1
  
  /* Define to 1 if you have the `select' function. */
! #define HAVE_SELECT 1
  
  /* Define to 1 if you have the `shmget' function. */
! #define HAVE_SHMGET 1
  
  /* Define to 1 if you have the `snprintf' function. */
! #define HAVE_SNPRINTF 1
  
  /* Define to 1 if you have the <stdint.h> header file. */
  #define HAVE_STDINT_H 1
--- 179,215 ----
  /* #undef HAVE_O_DIRECT */
  
  /* Define to 1 if you have the `pread' function. */
! /* #undef HAVE_PREAD */
  
  /* Define to 1 if you have the `pstat_getdynamic' function. */
  /* #undef HAVE_PSTAT_GETDYNAMIC */
  
  /* Define to 1 if you have the `pwrite' function. */
! /* #undef HAVE_PWRITE */
  
  /* Define to 1 if building on QNX. */
  /* #undef HAVE_QNX */
  
  /* Define to 1 if you have the `qsort' function. */
! /* #undef HAVE_QSORT */
  
  /* Define to 1 if you have the `raise' function. */
! /* #undef HAVE_RAISE */
  
  /* Define to 1 if building RPC client/server. */
  /* #undef HAVE_RPC */
  
  /* Define to 1 if you have the `sched_yield' function. */
! /* #undef HAVE_SCHED_YIELD */
  
  /* Define to 1 if you have the `select' function. */
! /* #undef HAVE_SELECT */
  
  /* Define to 1 if you have the `shmget' function. */
! /* #undef HAVE_SHMGET */
  
  /* Define to 1 if you have the `snprintf' function. */
! /* #undef HAVE_SNPRINTF */
  
  /* Define to 1 if you have the <stdint.h> header file. */
  #define HAVE_STDINT_H 1
***************
*** 218,230 ****
  #define HAVE_STDLIB_H 1
  
  /* Define to 1 if you have the `strcasecmp' function. */
! #define HAVE_STRCASECMP 1
  
  /* Define to 1 if you have the `strdup' function. */
! #define HAVE_STRDUP 1
  
  /* Define to 1 if you have the `strerror' function. */
! #define HAVE_STRERROR 1
  
  /* Define to 1 if you have the <strings.h> header file. */
  #define HAVE_STRINGS_H 1
--- 218,230 ----
  #define HAVE_STDLIB_H 1
  
  /* Define to 1 if you have the `strcasecmp' function. */
! /* #undef HAVE_STRCASECMP */
  
  /* Define to 1 if you have the `strdup' function. */
! /* #undef HAVE_STRDUP */
  
  /* Define to 1 if you have the `strerror' function. */
! /* #undef HAVE_STRERROR */
  
  /* Define to 1 if you have the <strings.h> header file. */
  #define HAVE_STRINGS_H 1
***************
*** 233,245 ****
  #define HAVE_STRING_H 1
  
  /* Define to 1 if you have the `strtoul' function. */
! #define HAVE_STRTOUL 1
  
  /* Define to 1 if `st_blksize' is member of `struct stat'. */
  #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
  
  /* Define to 1 if you have the `sysconf' function. */
! #define HAVE_SYSCONF 1
  
  /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
     */
--- 233,245 ----
  #define HAVE_STRING_H 1
  
  /* Define to 1 if you have the `strtoul' function. */
! /* #undef HAVE_STRTOUL */
  
  /* Define to 1 if `st_blksize' is member of `struct stat'. */
  #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
  
  /* Define to 1 if you have the `sysconf' function. */
! /* #undef HAVE_SYSCONF */
  
  /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
     */
***************
*** 250,262 ****
  /* #undef HAVE_SYS_NDIR_H */
  
  /* Define to 1 if you have the <sys/select.h> header file. */
! #define HAVE_SYS_SELECT_H 1
  
  /* Define to 1 if you have the <sys/stat.h> header file. */
  #define HAVE_SYS_STAT_H 1
  
  /* Define to 1 if you have the <sys/time.h> header file. */
! #define HAVE_SYS_TIME_H 1
  
  /* Define to 1 if you have the <sys/types.h> header file. */
  #define HAVE_SYS_TYPES_H 1
--- 250,262 ----
  /* #undef HAVE_SYS_NDIR_H */
  
  /* Define to 1 if you have the <sys/select.h> header file. */
! /* #undef HAVE_SYS_SELECT_H */
  
  /* Define to 1 if you have the <sys/stat.h> header file. */
  #define HAVE_SYS_STAT_H 1
  
  /* Define to 1 if you have the <sys/time.h> header file. */
! /* #undef HAVE_SYS_TIME_H */
  
  /* Define to 1 if you have the <sys/types.h> header file. */
  #define HAVE_SYS_TYPES_H 1
***************
*** 268,274 ****
  /* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */
  
  /* Define to 1 if you have the `vsnprintf' function. */
! #define HAVE_VSNPRINTF 1
  
  /* Define to 1 if building VxWorks. */
  /* #undef HAVE_VXWORKS */
--- 268,274 ----
  /* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */
  
  /* Define to 1 if you have the `vsnprintf' function. */
! /* #undef HAVE_VSNPRINTF */
  
  /* Define to 1 if building VxWorks. */
  /* #undef HAVE_VXWORKS */
[16 May 2005 16:54] Matt Wagner
Boyd,

As you are not using --with-bdb in your ./configure statement, these undefined bdb/ subdir header files is to be expected!

Are you sure the ./configure line you report using is correct? You say you use --with-innodb, did you mean that to be --with-bdb?

As you reported it here, this is "not a bug". If you want bdb/ headers to be configured, you have to use --with-bdb.

    Matt
[16 May 2005 17:22] Boyd GERBER
I have tried this

CC="cc" CFLAGS="-I/usr/local/include" CXX="CC" CFLAGS="-I/usr/local/include" ./c
onfigure --prefix=/usr/local/mysql --enable-thread-safe-client --with-bdb=./bdb --with-innodb --with-openssl --with-extra-charsets=complex --with-vio

and

CC="cc" CFLAGS="-I/usr/local/include" CXX="CC" CFLAGS="-I/usr/local/include" ./c
onfigure --prefix=/usr/local/mysql --enable-thread-safe-client --with-berkeley-d
b=./bdb --with-innodb --with-openssl --with-extra-charsets=complex --with-vio

They both give me the same errors.
[20 May 2006 20:26] Kent Boortz
The flag to enable Berkeley DB in 4.1 is --with-berkeley-db,
and without an argument, the bundled Berkeley DB is built
and used. The reporte behaviour can't be repated, but it
was not tested on UnixWare 7.1.4.