Preface
 
    When I was compiling the sysbench just now,I encountered some failures in the precedure.I'll show the issue and workaround below.
 
Issues
 
1. Executing autogen.sh script turned out to be error.
[root@docker1 sysbench]# ./autogen.sh
-bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory
[root@docker1 sysbench]# cat autogen.sh 
#!/bin/sh
 
autoreconf -vi
 
Even I directly run "autoreconf -vi" command,it still showed error
 
[root@docker1 sysbench]# autoreconf -vi
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
.ibtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4
autoreconf: libtoolize failed with exit status: 1
 
Then,I found a workaround:
 
Because I've used "git clone" to download the source package of sysbench directly without disabling the transcoding first.
 
After that,the shell could be executed,but when I continue to execute configure and make,there were still some errors found.
 
2. Executing make turned out to be error.
[root@docker1 sysbench]# ./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib && make && make install
...
In file included from lj_ffrecord.c:1197:0:
lj_recdef.h:225:1: error: ?.ecff_rawlen?.undeclared here (not in a function)
 recff_rawlen,
 ^
make[3]: *** [lj_ffrecord.o] Error 1
make[3]: Leaving directory `/opt/mysql/sysbench/third_party/luajit/tmp/luajit/src'
make[2]: *** [src/luajit] Error 2
make[2]: Leaving directory `/opt/mysql/sysbench/third_party/luajit/tmp/luajit'
make[1]: *** [lib/libluajit-5.1.a] Error 2
make[1]: Leaving directory `/opt/mysql/sysbench/third_party/luajit'
make: *** [all-recursive] Error 1
 
[root@docker1 luajit]# pwd
/opt/mysql/sysbench/third_party/luajit
[root@docker1 luajit]# find . -type f -print0 | xargs -0 dos2unix
 
Then,the LuaJIT issue was okay.
 
==== Successfully installed LuaJIT 2.1.0-beta3 to /opt/mysql/sysbench/third_party/luajit ====
 
Note: the development releases deliberately do NOT install a symlink for luajit
You can do this now by running this command (with sudo):
 
  ln -sf luajit-2.1.0-beta3 /opt/mysql/sysbench/third_party/luajit/bin/luajit
 
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/opt/mysql/sysbench/third_party/luajit/tmp/luajit'
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/opt/mysql/sysbench/third_party/luajit'
Making all in third_party/concurrency_kit
make[1]: Entering directory `/opt/mysql/sysbench/third_party/concurrency_kit'
make[1]: Warning: File `Makefile' has modification time 143 s in the future
rm -rf tmp
mkdir tmp
tar -C . -cf - ck | tar -xf - -C tmp/
chmod -R u+w tmp
cd tmp/ck && \
CC="gcc -std=gnu99" \
CFLAGS="-O3 -funroll-loops -ggdb3 -march=core2 -D_GNU_SOURCE " \
LDFLAGS="-L/usr/local/lib" \
  ./configure \
  --prefix=/opt/mysql/sysbench/third_party/concurrency_kit && \
make && \
make install
/bin/sh: ./configure: /bin/sh^M: bad interpreter: No such file or directory
make[1]: *** [lib/libck.a] Error 126
make[1]: Leaving directory `/opt/mysql/sysbench/third_party/concurrency_kit'
make: *** [all-recursive] Error 1
 
Then,I used dos2unix to transcode all the files in "/opt/mysql/sysbench/third_party" and it began to go on.But I was not be happy for long.Errors appeared one by one,faint!
 
lua/internal/sysbench.histogram.lua.h:137:3: warning: missing terminating " character [enabled by default]
lua/internal/sysbench.histogram.lua.h:137:1: error: missing terminating " character
make[2]: *** [sb_lua.o] Error 1
make[2]: Leaving directory `/opt/mysql/sysbench/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/mysql/sysbench/src'
make: *** [all-recursive] Error 1
 
This time I decided to transcode the whole files in "/opt/mysql/sysbench/src",but it turned out to be useless.Okay,then I gave up for continuing seeking the way to find it out.I downloaded the sysbench package again and disable transcoding automatically method by executing command below:
 
git config --global core.autocrlf false
git config --global core.safecrlf true
git config --global core.eol lf
 
Another make error shew up.
 
Making all in lua
make[2]: Entering directory `/opt/mysql/sysbench/src/lua'
make[2]: Warning: File `Makefile' has modification time 479 s in the future
Making all in internal
make[3]: Entering directory `/opt/mysql/sysbench/src/lua/internal'
make[3]: Warning: File `Makefile' has modification time 479 s in the future
make all-am
make[4]: Entering directory `/opt/mysql/sysbench/src/lua/internal'
make[4]: Warning: File `Makefile' has modification time 478 s in the future
make[4]: Nothing to be done for `all-am'.
make[4]: warning: Clock skew detected. Your build may be incomplete.
make[4]: Leaving directory `/opt/mysql/sysbench/src/lua/internal'
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory `/opt/mysql/sysbench/src/lua/internal'
make[3]: Entering directory `/opt/mysql/sysbench/src/lua'
make[3]: Warning: File `Makefile' has modification time 478 s in the future
make[3]: Nothing to be done for `all-am'.
make[3]: warning: Clock skew detected. Your build may be incomplete.
make[3]: Leaving directory `/opt/mysql/sysbench/src/lua'
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/opt/mysql/sysbench/src/lua'
Making all in .
make[2]: Entering directory `/opt/mysql/sysbench/src'
make[2]: Warning: File `.deps/sysbench.Po' has modification time 536 s in the future
make[2]: Nothing to be done for `all-am'.
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Leaving directory `/opt/mysql/sysbench/src'
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/opt/mysql/sysbench/src'
Making all in tests
make[1]: Entering directory `/opt/mysql/sysbench/tests'
make[1]: Warning: File `Makefile' has modification time 478 s in the future
make[1]: Nothing to be done for `all'.
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/opt/mysql/sysbench/tests'
make[1]: Entering directory `/opt/mysql/sysbench'
make[1]: Warning: File `Makefile' has modification time 478 s in the future
make[1]: Nothing to be done for `all-am'.
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory `/opt/mysql/sysbench'
make: warning: Clock skew detected. Your build may be incomplete.
 
There's a solution here:
 
But I waited for the count down over and then make it again.It was done successfully in the end.
 
[root@docker1 third_party]# sysbench -v
sysbench 1.1.0-431660d (using bundled LuaJIT 2.1.0-beta3)
 

使用git bash编译安装sysbench时遇到的坑的更多相关文章

  1. 编译安装PHP 时遇到问题解决方法.

    编译安装PHP时出现下面的错误代码: error 2 checking for pkg-config... /usr/bin/pkg-config configure: error: Cannot f ...

  2. 编译安装php时遇到virtual memory exhausted: Cannot allocate memory

    有时候用vps建站时需要通过编译的方式来安装主机控制面板.对于大内存的VPS来说一般问题不大,但是对于小内存,比如512MB内存的godaddy VPS来说,很有可能会出现问题,因为编译过程是一个内存 ...

  3. 编译安装nginx时配置开机自启

    详细编译安装nginx请参考[Nginx目录结构与配置文件详解]以及[Nginx安装部署],在这里就进行简单安装 安装Nginx 环境介绍 操作系统: [root@localhost ~]# cat ...

  4. 编译安装 zbar 时两次 make 带来的惊喜

    为了装 php 的条形码扩展模块 php-zbarcode,先装了一天的 ImageMagick 和 zbar.也许和我装的 Ubuntu 17.10 的有版本兼容问题吧,总之什么毛病都有,apt 不 ...

  5. 编译安装php时提示Cannot find MySQL header files的解决方法

    php的配置文件中有一行--with-mysql=/usr/local/mysql ,安装的时候提示:configure: error: Cannot find MySQL header files ...

  6. 【转】解决编译安装NGINX时make报错

    编译参数:--[root@localhostnginx-1.4.6]#./configure--user=nginx--group=nginx--prefix=/usr/local/nginx--wi ...

  7. git bash的安装与配置

    作业要求来自于:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE2/homework/2097 1.下载安装配置用户名和邮箱. (1)下载安装Github配置 ...

  8. CentOS 7编译安装gcc5.3碰到的坑

    下载最新的iso安装完毕后,发现gcc还是4.8版本的,就考虑升级到5.x 参考这个帖子 基本也没啥,但是执行download_prerequisites 时简直坑爹,三个压缩包都不超过2M 反复尝试 ...

  9. 安装Pomelo 时遇到的坑

    一.Pomelo相关的代码地址 https://github.com/NetEase,这里面包含比较多的项目. 2. https://github.com/NetEase/pomelo/wiki/%E ...

随机推荐

  1. java的foreach,后台弹框

    for (String string : list) { if(string.equals(ids)){ int res = JOptionPane.showConfirmDialog(null, & ...

  2. STS使用git下载项目代码

    在自己的eclipse 上安装git 插件,一般都自带了现在. 4.选择Clone URI 5.下一步输入刚才的复制的路劲,填写自己的github 账户名密码即可 6.选择要克隆的分支 7.设置本地g ...

  3. HDU 2088 Box of Bricks(脑洞)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=2088 Box of Bricks Time Limit: 1000/1000 MS (Java/Oth ...

  4. 微信小程序跳H5页面

    主页面:index.wxml 主页面:index.js ↑跳转到另一个wxml页面→recharge.wxml recharge.wxml web-view中设置跳转h5的链接,可以加上需要的参数: ...

  5. ajax 与 axios区别

    Ajax: Ajax 即“Asynchronous Javascript And XML”(异步 JavaScript 和 XML),是指一种创建交互式网页应用的网页开发技术. Ajax = 异步 J ...

  6. Python基础 List和Tuple类型

    python 创建list python 内置一种数据类型是列表: 列表是一种有序的集合,可以随时添加和 删除其中的元素,list 中的元素是按照顺序排列的.构建list 直接用 [ ], list ...

  7. MySQL---视图、触发器

    一.视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名称]即可获取结果集,并可以将其当作表来使用. SELECT * FROM ( S ...

  8. echarts 点击方法总结,点任意一点获取点击数据,举例说明:在多图联动中点击绘制标线

    关于点击(包括左击,双击,右击等)echarts图形任意一点,获取相关的图形数据,尤其是多图,我想部分人遇到这个问题一直很头大.下面我用举例说明,如何在多图联动基础上,我们点击任意一个图上任意一点,在 ...

  9. nuxt 优化项:禁用js的预加载

    这里有个nuxt和vue不同的地方,这个地方很有意思,官方的中文文档说得蜜汁自信 ------------------------------- In production, nuxt.js uses ...

  10. 剑指Offer-迭代

    1.大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项(从0开始,第0项为0) 备注:斐波那契数列指的是这样一个数列从第3项开始,每一项都等于前两项之和. public st ...