bitscn.com1.在rhel5.1上安装mysql-4.0.18, configure的时候报如下错误:
configure: error: this is a linux system and linux threads was not
found. on linux linuxthreads should be used. please install linuxthreads
(or a new glibc) and try again. see the installation chapter in the
reference manual for more information.
看来需要新版本的glibc;configure的时候增加参数 --with-named-thread-libs=-lpthread ;顺利通过。
2.不过make的时候又出错了
mysqld.o: in function `main':
mysqld.cc:(.text+0x3ee0): undefined reference to `my_fast_mutexattr'
mysqld.o:mysqld.cc:(.text+0x4143): more undefined references to `my_fast_mutexattr' follow
collect2: ld returned 1 exit status
make[4]: *** [mysqld] error 1
make[4]: leaving directory `/usr/local/src/mysql-4.0.26/sql'
make[3]: *** [all-recursive] error 1
make[3]: leaving directory `/usr/local/src/mysql-4.0.26/sql'
make[2]: *** [all] error 2
make[2]: leaving directory `/usr/local/src/mysql-4.0.26/sql'
make[1]: *** [all-recursive] error 1
make[1]: leaving directory `/usr/local/src/mysql-4.0.26'
make: *** [all] error 2
在mysql-4.0.26/sql/sql_class.cc文件中的
#include
(约39行)语句下面写如下代码
#ifdef pthread_adaptive_mutex_initializer_np
pthread_mutexattr_t my_fast_mutexattr;
#endif
make顺利通过;
3.我按照上面的步骤坐下来仍然报错,最后直接修改mysql-4.0.26/sql/sql_class.cc文件,添加pthread_mutexattr_t my_fast_mutexattr;,不知道有没有什么影响。
bitscn.com