Bug #65318 dbt2-0.37.50 build error
Submitted: 15 May 2012 14:17 Modified: 15 May 2012 16:20
Reporter: Bin Hong (OCA) Email Updates:
Status: Analyzing Impact on me:
None 
Category:Tests Severity:S7 (Test Cases)
Version: OS:Linux
Assigned to: Assigned Account CPU Architecture:Any

[15 May 2012 14:17] Bin Hong
Description:
i use dbt2-0.37.50.tar.gz from http://dev.mysql.com/downloads/benchmarks.html

for example install this

./configure --with-mysql=/usr/local/mysql

make 
make install

then happen these error

cd . && /bin/sh /home/test/test_dbt2/src/dbt2-0.37.50/missing --run automake-1.11 --foreign Makefile
configure.ac:434: required file `scripts/pgsql/db_stat.sh.in' not found
configure.ac:436: required file `scripts/pgsql/pgsql_profile.in' not found
configure.ac:437: required file `storedproc/pgsql/Makefile.in' not found
configure.ac:438: required file `storedproc/pgsql/c/Makefile.in' not found
configure.ac:439: required file `storedproc/pgsql/c/delivery.sql.in' not found
configure.ac:440: required file `storedproc/pgsql/c/new_order.sql.in' not found
configure.ac:441: required file `storedproc/pgsql/c/order_status.sql.in' not found
configure.ac:442: required file `storedproc/pgsql/c/payment.sql.in' not found
configure.ac:443: required file `storedproc/pgsql/c/stock_level.sql.in' not found
WARNING: `automake-1.11' is needed, and you do not seem to have it handy on your
         system.  You might have modified some files without having the
         proper tools for further handling them.  Check the `README' file,
         it often tells you about the needed prerequirements for installing
         this package.  You may also peek at any GNU archive site, in case
         some other package would contain this missing `automake-1.11' program.
gmake: *** [Makefile.in] 错误 1
Failed command /usr/bin/gmake

maybe not found pgsql?

but i fixed configure.ac  only support pgsql.
i hope that have better method.

How to repeat:
tar xvfz dbt2-0.37.50.tar.gz

./configure --with-mysql=/usr/local/mysql

make 
make install

Suggested fix:
--- Downloads/dbt2-0.37.50/configure.ac	2012-03-13 22:23:22.000000000 +0800
+++ configure.ac	2012-03-13 23:02:52.000000000 +0800
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 AC_REVISION($Id: configure.ac,v 1.31 2005/03/11 19:07:16 fimath Exp $)
-
+# remove postgresql sapdb support
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(dbt2, 0.37.50, osdldbt-general@lists.sourceforge.net)
 AM_INIT_AUTOMAKE
@@ -154,21 +154,7 @@
 )
 
 
-dnl Configuration options for different databases, PostgreSQL is default.
-
-dnl PostgreSQL
-AC_ARG_WITH(postgresql,
-  [AC_HELP_STRING([--with-postgresql=DIR],
-      [Default on. Set to the path of the PostgreSQL's installation, or leave
-          unset if the path is already in the compiler search path.])],
-  [pgsql_path=$withval database_to_use="pgsql"]
-)
 
-dnl SAP DB
-AC_ARG_WITH(sapdb,
-  [AC_HELP_STRING([--with-sapdb], [using ODBC])],
-  [database_to_use="sapdb"]
-)
 
 dnl MySQL
 AC_ARG_WITH(mysql,
@@ -284,177 +270,7 @@
   fi
 fi
 
-dnl Set up rules depending on what database is selected.
-if test "$database_to_use" == "pgsql"; then
-  if test "$use_odbc" == "yes"; then
-    DBC_CORE="odbc"
-    DBC_FUNCTIONS="odbc"
-    SP_DIR=""
-  else
-    DBC_FUNCTIONS="libpq"
-    DBC_CORE="libpq"
-    SP_DIR="pgsql"
-    AC_DEFINE(LIBPQ, 1, [using PostgreSQL])
-
-    dnl check if the user has specified path for pgsql
-    if test "$pgsql_path" != ""; then
-      CPPFLAGS="-I${pgsql_path}/include -I${pgsql_path}/include/server -I${pgsql_path}/include/postgresql/server -I${pgsql_path}/include/pgsql/server $CPPFLAGS"
-      CFLAGS="-I${pgsql_path}/include -I${pgsql_path}/include/server -I${pgsql_path}/include/postgresql/server -I${pgsql_path}/include/pgsql/server $CFLAGS"
-      LDFLAGS="-L${pgsql_path}/lib -Wl,-R${pgsql_path}/lib $LDFLAGS"
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/libpq-fe.h libpq-fe.h],
-        [libpq_ok=yes; break], [libpq_ok=no]
-    )
-    if test "x$libpq_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate libpq-fe.h])
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/server/funcapi.h ${pgsql_path}/include/postgresql/server/funcapi.h ${pgsql_path}/include/pgsql/server/funcapi.h server/funcapi.h postgresql/server/funcapi.h pgsql/server/funcapi.h],
-        [funcapi_ok=yes; break],
-        [funcapi_ok=no]
-    )
-    if test "x$funcapi_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate funcapi.h])
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/server/executor/spi.h ${pgsql_path}/include/postgresql/server/executor/spi.h ${pgsql_path}/include/pgsql/server/executor/spi.h server/executor/spi.h postgresql/server/executor/spi.h pgsql/server/executor/spi.h],
-        [spi_ok=yes; break],
-        [spi_ok=no]
-    )
-    if test "x$spi_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate spi.h])
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/server/executor/executor.h ${pgsql_path}/include/postgresql/server/executor/executor.h ${pgsql_path}/include/pgsql/server/executor/executor.h server/executor/executor.h postgresql/server/executor/executor.h pgsql/server/executor/executor.h],
-        [executor_ok=yes; break],
-        [executor_ok=no]
-    )
-    if test "x$spi_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate executor.h])
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/server/fmgr.h ${pgsql_path}/include/postgresql/server/fmgr.h ${pgsql_path}/include/pgsql/server/fmgr.h server/fmgr.h postgresql/server/fmgr.h pgsql/server/fmgr.h],
-        [fmgr_ok=yes; break],
-        [fmgr_ok=no]
-    )
-    if test "x$fmgr_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate fmgr.h])
-    fi
-
-    AC_CHECK_HEADERS(
-        [${pgsql_path}/include/server/postgres.h ${pgsql_path}/include/postgresql/server/postgres.h ${pgsql_path}/include/pgsql/server/postgres.h server/postgres.h postgresql/server/postgres.h pgsql/server/postgres.h],
-        [postgres_ok=yes; break],
-        [postgres_ok=no]
-    )
-    if test "x$postgres_ok" == "xno"; then
-        AC_MSG_ERROR([could not locate postgres.h])
-    fi
-
-    AC_SEARCH_LIBS(PQexec, pq, [], AC_MSG_ERROR([libpq libs required]))
-  fi
-
-  dnl check for initdb
-  AC_PATH_PROGS([INITDB], [initdb], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$INITDB" ; then
-    AC_MSG_ERROR([*** initdb is required])
-  fi
-
-  dnl check for createdb
-  AC_PATH_PROGS([CREATEDB], [createdb], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$CREATEDB" ; then
-    AC_MSG_ERROR([*** createdb is required])
-  fi
-
-  dnl check for dropdb
-  AC_PATH_PROGS([DROPDB], [dropdb], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$DROPDB" ; then
-    AC_MSG_ERROR([*** dropdb is required])
-  fi
-
-  dnl check for pg_restore
-  AC_PATH_PROGS([PGRESTORE], [pg_restore], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$PGRESTORE" ; then
-    AC_MSG_ERROR([*** pg_restore is required])
-  fi
-
-  dnl check for createlang
-  AC_PATH_PROGS([CREATELANG], [createlang], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$CREATELANG" ; then
-    AC_MSG_ERROR([*** createlang is required])
-  fi
-
-  dnl check for pg_ctl
-  AC_PATH_PROGS([PG_CTL], [pg_ctl], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$PG_CTL" ; then
-    AC_MSG_ERROR([*** pg_ctl is required])
-  fi
-
-  dnl check for psql
-  AC_PATH_PROGS([PSQL], [psql], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$PSQL" ; then
-    AC_MSG_ERROR([*** psql is required])
-  fi
-
-  dnl check for vacuumdb
-  AC_PATH_PROGS([VACUUMDB], [vacuumdb], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$VACUUMDB" ; then
-    AC_MSG_ERROR([*** vacuumdb is required])
-  fi
-
-  dnl check for pg_autovacuum
-  AC_PATH_PROGS([PG_AUTOVACUUM], [pg_autovacuum], ,
-    [$PATH:$pgsql_path/bin:/bin:/usr/bin:/usr/local/bin]
-  )
-  if test -z "$PG_AUTOVACUUM" ; then
-    AC_MSG_WARN([*** pg_autovacuum is recommended from 7.4 and 8.0])
-  fi
-
-  AC_CONFIG_FILES([scripts/pgsql/db_stat.sh],
-      [chmod +x scripts/pgsql/db_stat.sh])
-  AC_CONFIG_FILES([scripts/pgsql/pgsql_profile])
-  AC_CONFIG_FILES([storedproc/pgsql/Makefile])
-  AC_CONFIG_FILES([storedproc/pgsql/c/Makefile])
-  AC_CONFIG_FILES([storedproc/pgsql/c/delivery.sql])
-  AC_CONFIG_FILES([storedproc/pgsql/c/new_order.sql])
-  AC_CONFIG_FILES([storedproc/pgsql/c/order_status.sql])
-  AC_CONFIG_FILES([storedproc/pgsql/c/payment.sql])
-  AC_CONFIG_FILES([storedproc/pgsql/c/stock_level.sql])
-elif test "$database_to_use" == "sapdb"; then
-  dnl ODBC Library (required)
-  dnl check for `odbcinit' in -lodbc, -liodbc
-
-  if test "$use_odbc" == "yes" -a -z "$NONSP"; then 
-    AC_MSG_ERROR(["It is possible to build only nonSP version of test for ODBC mode. Please 
-                   use --enable-nonsp option"])
-  fi
-  
-  DBC_CORE="odbc"
-  DBC_FUNCTIONS="odbc"
-
-  SP_DIR=""
-elif test "$database_to_use" == "mysql"; then
+if test "$database_to_use" == "mysql"; then
   AC_CHECK_MYSQL([$ac_cv_use_mysql], ["libmysql_r"])
 
   CFLAGS="$CFLAGS $MYSQL_CFLAGS"
@@ -483,15 +299,15 @@
 
   AC_CONFIG_FILES([scripts/run_mysql.sh], [chmod +x scripts/run_mysql.sh])
 else
-  AC_MSG_ERROR('Please choose DBMS. ./configure --with-(postgresql|sapdb|mysql)!')
+  AC_MSG_ERROR('Please choose DBMS. ./configure --with-mysql!')
 fi
 
 dnl Check for test type(SP/NONSP)
-if test "x$NONSP" == "xyes" && test "$database_to_use" != "pgsql"; then
+if test "x$NONSP" == "xyes" ; then
   DBC_FUNCTIONS="nonsp"  
 fi
 
-AM_CONDITIONAL(NONSP, test "x$NONSP" == "xyes" && test "$database_to_use" != "pgsql")
+AM_CONDITIONAL(NONSP, test "x$NONSP" == "xyes" )
 
 dnl Checks for header files.
 AC_HEADER_STDC
[18 May 2012 10:28] Mikael Ronström
Have never seen this problem myself, but on the other hand the tarball is intended for MySQL testing so will remove pgsql support also from public tarball, will update bug when done so.