• sysbench0.4.12安装和调试


    sysbench-0.4.12安装和调试

    下载
    wget http://nchc.dl.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz
    shell>tar xvf sysbench-0.4.12.tar.gz
    [root@localhost sysbench-0.4.12]# uname -a
    Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
    ./configure
    编译错误:
    drv_mysql.c:35:19: 错误:mysql.h:没有那个文件或目录
    drv_mysql.c:36:26: 错误:mysqld_error.h:没有那个文件或目录
    drv_mysql.c: In function ‘mysql_drv_describe’:
    drv_mysql.c:284: 错误:‘MYSQL_RES’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:284: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
    drv_mysql.c:284: 错误:所在的函数内只报告一次。)
    drv_mysql.c:284: 错误:‘res’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:285: 错误:‘MYSQL_ROW’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:285: 错误:expected ‘;’ before ‘row’
    drv_mysql.c:286: 错误:‘MYSQL_FIELD’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:286: 错误:‘fields’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:328: 错误:‘row’ 未声明 (在此函数内第一次使用)
    drv_mysql.c: In function ‘mysql_drv_connect’:
    drv_mysql.c:360: 错误:‘MYSQL’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:360: 错误:‘con’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:366: 错误:expected expression before ‘)’ token
    drv_mysql.c:401: 错误:‘MYSQL_VERSION_ID’ 未声明 (在此函数内第一次使用)
    drv_mysql.c: In function ‘mysql_drv_disconnect’:
    drv_mysql.c:441: 错误:‘MYSQL’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:441: 错误:‘con’ 未声明 (在此函数内第一次使用)
    drv_mysql.c: In function ‘mysql_drv_bind_param’:
    drv_mysql.c:520: 错误:‘MYSQL’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:520: 错误:‘con’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:520: 错误:expected expression before ‘)’ token
    drv_mysql.c: In function ‘mysql_drv_query’:
    drv_mysql.c:729: 错误:‘MYSQL’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:729: 错误:‘con’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:739: 错误:‘ER_LOCK_DEADLOCK’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:739: 错误:‘ER_LOCK_WAIT_TIMEOUT’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:739: 错误:‘ER_CHECKREAD’ 未声明 (在此函数内第一次使用)
    drv_mysql.c: In function ‘mysql_drv_store_results’:
    drv_mysql.c:789: 错误:‘MYSQL’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:789: 错误:‘con’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:790: 错误:‘MYSQL_RES’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:790: 错误:‘res’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:791: 错误:‘MYSQL_ROW’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:791: 错误:expected ‘;’ before ‘row’
    drv_mysql.c:839: 错误:‘ER_LOCK_DEADLOCK’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:839: 错误:‘ER_LOCK_WAIT_TIMEOUT’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:855: 错误:‘row’ 未声明 (在此函数内第一次使用)
    drv_mysql.c: In function ‘mysql_drv_free_results’:
    drv_mysql.c:879: 错误:‘MYSQL_RES’ 未声明 (在此函数内第一次使用)
    drv_mysql.c:879: 错误:expected expression before ‘)’ token
    make[3]: *** [libsbmysql_a-drv_mysql.o] 错误 1
    make[3]: Leaving directory `/share/softwares/mysql_test/sysbench-0.4.12/sysbench/drivers/mysql'
    make[2]: *** [all-recursive] 错误 1
    make[2]: Leaving directory `/share/softwares/mysql_test/sysbench-0.4.12/sysbench/drivers'
    make[1]: *** [all-recursive] 错误 1
    make[1]: Leaving directory `/share/softwares/mysql_test/sysbench-0.4.12/sysbench'
    make: *** [all-recursive] 错误 1

    解决方法:
    由于linux上mysql版本为编译版本,需要指定库文件位置
    ./configure --with-mysql-includes=/usr/local/mysql/include/mysql --with-mysql-libs=/usr/local/mysql/lib/mysql/

    make
    编译错误:
    ../libtool: line 838: X--tag=CC: command not found
    ../libtool: line 871: libtool: ignoring unknown tag : command not found
    ../libtool: line 838: X--mode=link: command not found
    ../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found
    ../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
    ../libtool: line 2231: X-g: command not found
    ../libtool: line 2231: X-O2: command not found
    ../libtool: line 1951: X-L/usr/local/mysql/lib/mysql/: No such file or directory
    ../libtool: line 2400: Xsysbench: command not found
    解决方法:
    在sysbench-0.4.12目录下:
    ./autogen
    在make && make install

  • 相关阅读:
    My Houdini First Step
    MaxScript随机赋材质
    Groups of Operators
    Select groups in scene
    投篮球
    U3D PlayMovie
    unicornForest
    MaxScript Spinner/progressBar
    MaxScript Button
    MaxScript 扇子打开
  • 原文地址:https://www.cnblogs.com/alang85/p/sysbench.html
Copyright © 2020-2023  润新知