Compiling sysbench 0.4.12 for Debian
Anyway the solution is simple and I will describe it very quickly how to compile sysbench under Debian. Probably it will work for other distributions if you have the same problem.
Let’s start with the error. I run the normal steps to compile the programs as described in README:
[rb@randombugs]$ ./configure --with-mysql-libs=/usr/local/mysql/lib/ --with-mysql-includes=/usr/local/mysql/include/ [rb@randombugs]$ make
and I get this error
[... some lines removed ...] /bin/sh ../libtool --tag=CC --mode=link gcc -pthread -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/local/mysql/lib/ -lmysqlclient_r -lrt -lm ../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/: No such file or directory ../libtool: line 2400: Xsysbench: command not found ../libtool: line 2405: X: command not found ../libtool: line 2412: Xsysbench: command not found ../libtool: line 2420: mkdir /.libs: No such file or directory ../libtool: line 2547: X-lmysqlclient_r: command not found ../libtool: line 2547: X-lrt: command not found ../libtool: line 2547: X-lm: command not found ../libtool: line 2629: X-L/root/sysbench-0.4.12/sysbench: No such file or directory ../libtool: line 2547: X-lmysqlclient_r: command not found ../libtool: line 2547: X-lrt: command not found ../libtool: line 2547: X-lm: command not found ../libtool: line 2629: X-L/root/sysbench-0.4.12/sysbench: No such file or directory ../libtool: line 2547: X-lmysqlclient_r: command not found ../libtool: line 2547: X-lrt: command not found ../libtool: line 2547: X-lm: command not found ../libtool: line 5162: Xgcc -pthread "" "" -o @OUTPUT@ sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/root/sysbench-0.4.12/sysbench -lmysqlclient_r -lrt -lm: No such file or directory ../libtool: line 5163: Xgcc -pthread "" "" -o @OUTPUT@ sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/root/sysbench-0.4.12/sysbench -lmysqlclient_r -lrt -lm: No such file or directory ../libtool: line 5168: X: command not found ../libtool: line 5172: : command not found
Seeing a libtool error I started to recreate all automake utilities with autogen
[rb@randombugs]$ ./autogen.sh
Running autogen it (what is running autoconf) I get the following error:
./autogen.sh sysbench/drivers/mysql/Makefile.am:17: library used but `RANLIB' is undefined sysbench/drivers/mysql/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/drivers/mysql/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/drivers/oracle/Makefile.am:17: library used but `RANLIB' is undefined sysbench/drivers/oracle/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/drivers/oracle/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/drivers/pgsql/Makefile.am:17: library used but `RANLIB' is undefined sysbench/drivers/pgsql/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/drivers/pgsql/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/cpu/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/cpu/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/cpu/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/fileio/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/fileio/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/fileio/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/memory/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/memory/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/memory/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/mutex/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/mutex/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/mutex/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/oltp/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/oltp/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/oltp/Makefile.am:17: to `configure.ac' and run `autoconf' again. sysbench/tests/threads/Makefile.am:17: library used but `RANLIB' is undefined sysbench/tests/threads/Makefile.am:17: The usual way to define `RANLIB' is to add `AC_PROG_RANLIB' sysbench/tests/threads/Makefile.am:17: to `configure.ac' and run `autoconf' again.
The error is explicit enough so all what I made I just opened configure.ac and I add AC_PROG_RANLIB where I found the rest of AC_PROG* variables. After that I just run autogen.sh again, but this time I get another error.
configure.ac:75: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.Seeing this variable in configure.ca I just comment the variable and re run autogen.sh. This time all works flawlessly. After this I run
./configure && make && make install
with success.
In short. Edit configure.ca:
#AC_PROG_LIBTOOL
AC_PROG_RANLIBand re-run
./autogen.shand your are ready to
./configure && make && make install
Good Luck !















Rock on! Allowed me to compile sysbench 0.4.12 for RHEL5.4!
Your solution worked for me and I managed to run sysbench on Ubuntu 9.04 ! Thanks for the info!
Greetings,
posidev
[...] to the tip from randombugs.com I managed to compile it properly.Here what you have to do in [...]
Great, thanks so much.
Hi,
Thanks for the ‘workaround’ , worked like a charm.(centos 5.2 x86_64 && sysbench 0.4.12).
Leave your response!
Syndicate
Blogroll
Earn while you snoring!
Tags
Promote
Categories
Recent Posts
Most Commented
Recent Comments