postgresql上安装sysbench-0.5

来源:互联网 发布:游戏变速器源码 编辑:程序博客网 时间:2024/05/17 22:28
环境centos 6.8pg9.6sysbench-0.5[postgres@node2]$ tar -xvf sysbench-0.5.tar.gz[postgres@node2 sysbench-0.5]$ lltotal 100-rw-r--r--. 1 postgres postgres  3074 Oct 19  2012 autogen.sh-rw-r--r--. 1 postgres postgres  7585 Oct 19  2012 ChangeLogdrwxr-xr-x. 2 postgres postgres  4096 Jun  8  2013 config-rw-r--r--. 1 postgres postgres 11022 Oct 19  2012 configure.ac-rw-r--r--. 1 postgres postgres 17992 Oct 19  2012 COPYINGdrwxr-xr-x. 3 postgres postgres  4096 Jun  8  2013 doc-rw-r--r--. 1 postgres postgres  7122 Oct 19  2012 install-shdrwxr-xr-x. 2 postgres postgres  4096 Jun  8  2013 m4-rw-r--r--. 1 postgres postgres   840 Oct 19  2012 Makefile.am-rw-r--r--. 1 postgres postgres 10266 Oct 19  2012 missing-rw-r--r--. 1 postgres postgres  1988 Oct 19  2012 mkinstalldirs-rw-r--r--. 1 postgres postgres  3044 Oct 19  2012 README-rw-r--r--. 1 postgres postgres   953 Oct 19  2012 README-WIN.txtdrwxr-xr-x. 5 postgres postgres  4096 Jun  8  2013 sysbench-rw-r--r--. 1 postgres postgres    26 Oct 19  2012 TODO[postgres@node2 sysbench-0.5]$ sh autogen.sh automake 1.10.x (aclocal) wasn't found, exiting解决方法 安装automake依赖包[root@node2 ~]# yum install automake[postgres@node2 sysbench-0.5]$ sh autogen.sh libtoolize 1.4+ wasn't found, exiting解决方法  安装libtool依赖包[root@node2 ~]# yum install libtool[postgres@node2 sysbench-0.5]$ sh autogen.sh autogen.sh: running `aclocal -I m4' autogen.sh: running `libtoolize --copy --force' libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.libtoolize: copying file `config/ltmain.sh'libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.libtoolize: copying file `m4/libtool.m4'libtoolize: copying file `m4/ltoptions.m4'libtoolize: copying file `m4/ltsugar.m4'libtoolize: copying file `m4/ltversion.m4'libtoolize: copying file `m4/lt~obsolete.m4'autogen.sh: running `autoheader' autogen.sh: running `automake -c --foreign --add-missing' configure.ac:23: installing `config/compile'configure.ac:11: installing `config/config.guess'configure.ac:11: installing `config/config.sub'configure.ac:16: installing `config/install-sh'configure.ac:16: installing `config/missing'sysbench/Makefile.am: installing `config/depcomp'autogen.sh: running `autoconf' Libtoolized with: libtoolize (GNU libtool) 2.2.6bAutomade with: automake (GNU automake) 1.11.1Configured with: autoconf (GNU Autoconf) 2.63[postgres@node2 sysbench-0.5]$ lltotal 996-rw-rw-r--. 1 postgres postgres 317842 Apr 11 07:36 aclocal.m4-rw-r--r--. 1 postgres postgres   3074 Oct 19  2012 autogen.shdrwxr-xr-x. 2 postgres postgres   4096 Apr 11 07:36 autom4te.cache-rw-r--r--. 1 postgres postgres   7585 Oct 19  2012 ChangeLogdrwxr-xr-x. 2 postgres postgres   4096 Apr 11 07:36 config-rwxrwxr-x. 1 postgres postgres 567878 Apr 11 07:36 configure-rw-r--r--. 1 postgres postgres  11022 Oct 19  2012 configure.ac-rw-r--r--. 1 postgres postgres  17992 Oct 19  2012 COPYINGdrwxr-xr-x. 3 postgres postgres   4096 Apr 11 07:36 doc-rw-r--r--. 1 postgres postgres   7122 Oct 19  2012 install-shdrwxr-xr-x. 2 postgres postgres   4096 Apr 11 07:36 m4-rw-r--r--. 1 postgres postgres    840 Oct 19  2012 Makefile.am-rw-rw-r--. 1 postgres postgres  24419 Apr 11 07:36 Makefile.in-rw-r--r--. 1 postgres postgres  10266 Oct 19  2012 missing-rw-r--r--. 1 postgres postgres   1988 Oct 19  2012 mkinstalldirs-rw-r--r--. 1 postgres postgres   3044 Oct 19  2012 README-rw-r--r--. 1 postgres postgres    953 Oct 19  2012 README-WIN.txtdrwxr-xr-x. 5 postgres postgres   4096 Apr 11 07:36 sysbench-rw-r--r--. 1 postgres postgres     26 Oct 19  2012 TODO[postgres@node2 sysbench-0.5]$ ./configure  --without-mysql --with-pgsql checking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking target system type... x86_64-unknown-linux-gnuchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for gcc... gccchecking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for style of include used by make... GNUchecking dependency style of gcc... gcc3checking how to run the C preprocessor... gcc -Echecking whether gcc and cc understand -c and -o together... yeschecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking minix/config.h usability... nochecking minix/config.h presence... nochecking for minix/config.h... nochecking whether it is safe to define __EXTENSIONS__... yeschecking for a sed that does not truncate output... /bin/sedchecking for fgrep... /bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1966080checking whether the shell understands some XSI constructs... yeschecking whether the shell understands "+="... yeschecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for ar... archecking for strip... stripchecking for ranlib... ranlibchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for dlfcn.h... yeschecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... nochecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking whether __SUNPRO_C is declared... nochecking "C Compiler version"... "gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)"checking whether to compile with MySQL support... (cached) nochecking whether to compile with Drizzle support... (cached) yeschecking whether to compile with Oracle support... (cached) nochecking whether to compile with PostgreSQL support... (cached) yeschecking whether to compile with Lua support... (cached) yeschecking whether SHM_HUGETLB is declared... yeschecking whether O_SYNC is declared... yeschecking for xsltproc... xsltprocchecking whether xsltproc works... nochecking for the pthreads library -lpthreads... nochecking whether pthreads work without any flags... nochecking whether pthreads work with -Kthread... nochecking whether pthreads work with -kthread... nochecking for the pthreads library -llthread... nochecking whether pthreads work with -pthread... yeschecking for joinable pthread attribute... PTHREAD_CREATE_JOINABLEchecking if more special flags are required for pthreads... nochecking for sqrt in -lm... yeschecking for ld used by GCC... /usr/bin/ld -m elf_x86_64checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yeschecking for shared library run path origin... donechecking for libdrizzle... nochecking for pg_config... /opt/postgresdb//bin/pg_configchecking PostgreSQL C flags... -I/opt/postgresdb/includechecking PostgreSQL linker flags... -L/opt/postgresdb/lib -lpqchecking libaio.h usability... nochecking libaio.h presence... nochecking for libaio.h... nochecking for malloc in -lumem... nochecking for malloc in -lmtmalloc... nochecking for ANSI C header files... (cached) yeschecking errno.h usability... yeschecking errno.h presence... yeschecking for errno.h... yeschecking fcntl.h usability... yeschecking fcntl.h presence... yeschecking for fcntl.h... yeschecking math.h usability... yeschecking math.h presence... yeschecking for math.h... yeschecking pthread.h usability... yeschecking pthread.h presence... yeschecking for pthread.h... yeschecking sched.h usability... yeschecking sched.h presence... yeschecking for sched.h... yeschecking signal.h usability... yeschecking signal.h presence... yeschecking for signal.h... yeschecking for stdlib.h... (cached) yeschecking for string.h... (cached) yeschecking sys/aio.h usability... nochecking sys/aio.h presence... nochecking for sys/aio.h... nochecking sys/ipc.h usability... yeschecking sys/ipc.h presence... yeschecking for sys/ipc.h... yeschecking sys/time.h usability... yeschecking sys/time.h presence... yeschecking for sys/time.h... yeschecking sys/mman.h usability... yeschecking sys/mman.h presence... yeschecking for sys/mman.h... yeschecking sys/shm.h usability... yeschecking sys/shm.h presence... yeschecking for sys/shm.h... yeschecking thread.h usability... nochecking thread.h presence... nochecking for thread.h... nochecking for unistd.h... (cached) yeschecking for inline... inlinechecking for off_t... yeschecking for size_t... yeschecking whether time.h and sys/time.h may both be included... yeschecking for special C compiler options needed for large files... nochecking for _FILE_OFFSET_BITS value needed for large files... nochecking size of size_t... 8checking for stdlib.h... (cached) yeschecking for GNU libc compatible malloc... yeschecking for stdlib.h... (cached) yeschecking for unistd.h... (cached) yeschecking for getpagesize... yeschecking for working mmap... yeschecking whether strerror_r is declared... yeschecking for strerror_r... yeschecking whether strerror_r returns char *... yeschecking whether clock_gettime is declared... yeschecking for library containing clock_gettime... -lrtchecking for alarm... yeschecking for directio... nochecking for fdatasync... yeschecking for gettimeofday... yeschecking for lrand48... yeschecking for memalign... yeschecking for memset... yeschecking for mkstemp... yeschecking for popen... yeschecking for posix_memalign... yeschecking for pthread_yield... yeschecking for _setjmp... yeschecking for setvbuf... yeschecking for sqrt... yeschecking for strdup... yeschecking for thr_setconcurrency... nochecking for valloc... yeschecking for pthread_once... yesconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating doc/xsl/Makefileconfig.status: creating doc/xsl/catalog.xmlconfig.status: creating doc/Makefileconfig.status: creating sysbench/Makefileconfig.status: creating sysbench/drivers/Makefileconfig.status: creating sysbench/drivers/mysql/Makefileconfig.status: creating sysbench/drivers/drizzle/Makefileconfig.status: creating sysbench/drivers/oracle/Makefileconfig.status: creating sysbench/drivers/pgsql/Makefileconfig.status: creating sysbench/tests/Makefileconfig.status: creating sysbench/tests/cpu/Makefileconfig.status: creating sysbench/tests/fileio/Makefileconfig.status: creating sysbench/tests/memory/Makefileconfig.status: creating sysbench/tests/threads/Makefileconfig.status: creating sysbench/tests/mutex/Makefileconfig.status: creating sysbench/tests/db/Makefileconfig.status: creating sysbench/scripting/Makefileconfig.status: creating sysbench/scripting/lua/Makefileconfig.status: creating sysbench/scripting/lua/src/Makefileconfig.status: creating config/config.hconfig.status: executing depfiles commandsconfig.status: executing libtool commands[postgres@node2 sysbench-0.5]$ makeMaking all in docmake[1]: Entering directory `/tmp/sysbench-0.5/doc'Making all in xslmake[2]: Entering directory `/tmp/sysbench-0.5/doc/xsl'make[2]: Nothing to be done for `all'.make[2]: Leaving directory `/tmp/sysbench-0.5/doc/xsl'make[2]: Entering directory `/tmp/sysbench-0.5/doc'touch manual.htmlmake[2]: Leaving directory `/tmp/sysbench-0.5/doc'make[1]: Leaving directory `/tmp/sysbench-0.5/doc'Making all in sysbenchmake[1]: Entering directory `/tmp/sysbench-0.5/sysbench'Making all in driversmake[2]: Entering directory `/tmp/sysbench-0.5/sysbench/drivers'Making all in pgsqlmake[3]: Entering directory `/tmp/sysbench-0.5/sysbench/drivers/pgsql'gcc -DHAVE_CONFIG_H -I. -I../../../config  -I/opt/postgresdb/include -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3  -MT libsbpgsql_a-drv_pgsql.o -MD -MP -MF .deps/libsbpgsql_a-drv_pgsql.Tpo -c -o libsbpgsql_a-drv_pgsql.o `test -f 'drv_pgsql.c' || echo './'`drv_pgsql.cdrv_pgsql.c:95: warning: excess elements in struct initializerdrv_pgsql.c:95: warning: (near initialization for ‘pgsql_drv_caps’)drv_pgsql.c: In function ‘pgsql_drv_describe’:drv_pgsql.c:202: error: ‘table_name’ undeclared (first use in this function)drv_pgsql.c:202: error: (Each undeclared identifier is reported only oncedrv_pgsql.c:202: error: for each function it appears in.)make[3]: *** [libsbpgsql_a-drv_pgsql.o] Error 1make[3]: Leaving directory `/tmp/sysbench-0.5/sysbench/drivers/pgsql'make[2]: *** [all-recursive] Error 1make[2]: Leaving directory `/tmp/sysbench-0.5/sysbench/drivers'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/tmp/sysbench-0.5/sysbench'make: *** [all-recursive] Error 1解决方式:[postgres@node2 pgsql]$ pwd/tmp/sysbench-0.5/sysbench/drivers/pgsql[postgres@node2 pgsql]$ vi drv_pgsql.c注释掉: /* (void)table_name; /* unused */这行int pgsql_drv_describe(drv_caps_t *caps){  PGconn *con; /* (void)table_name; /* unused */  *caps = pgsql_drv_caps;  /* Determine the server version */执行make clean / ./configure / make /make install ,安装成功!在centos7上在sh autogen.sh时会出现错误Can't execute automake  [postgres@node2 sysbench-0.5]# vi configure.ac  添加一行 AM_PROG_AR    AC_PROG_CC    AM_PROG_AR    AC_PROG_CPP  configure  报错:  configure: error: *** pthread_once() is not available on this platform ***  注释掉使用到的地方:      285 #AC_CHECK_FUNC(pthread_once, ,      286 #              AC_MSG_ERROR([*** pthread_once() is not available on this platform ***])      287 #)  

0 0
原创粉丝点击