LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2748|回复: 9

LFS6下编译安装MySQL4.1.8a出错===>已经解决

[复制链接]
发表于 2005-1-12 15:01:02 | 显示全部楼层 |阅读模式
我在安装LFS6下安装MySQL4.1.8a出错,在configure时出现的(错误如下)
[root@mikkoyue:mysql-4.1.8a]# ./configure --prefix=/opt \
--sysconfdir=/etc --libexecdir=/opt/sbin \
--localstatedir=/data/mysql --enable-thread-safe-client \
--enable-local-infile --enable-assembler --without-debug \
--without-bench
...
...

checking for atomic operations... atomic_add atomic_sub
checking if we should use pstack... no
checking for int8... no
checking "LinuxThreads"... "Not found"
configure: error: This is a linux system and Linuxthreads 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,这怎么可能啊,我编译安装glibc时并没有出错啊,高手帮忙看一下,谢了。
 楼主| 发表于 2005-1-13 16:59:41 | 显示全部楼层
自己顶一下,难道没人做过吗?成功了的人报个名好不好,我只是想知道是MySQL的问题还是我的glibc的问题,还是其它问题。
发表于 2005-1-13 17:27:55 | 显示全部楼层
我使用lfs6test版的glibc是1011的没有问题。
发表于 2005-1-14 12:35:44 | 显示全部楼层
http://mirror.vtx.ch/lfs/patches ... 4.0.18-nptl-1.patch
使用以上补丁。

在lfs6。0中,glibc的线程库使用了nptl,而mysql要检查linuxthread线程库。

ntpl性能要好于linuxthread,且大部分兼容linuxthread。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-1-14 18:32:36 | 显示全部楼层
谢谢楼上的,我用--with-mit-threads参数终于不出错了,明天再用你提供的这个补丁试试。
回复 支持 反对

使用道具 举报

发表于 2005-11-6 01:32:42 | 显示全部楼层

又出现错误

我用--with-mit-threads参数后,出现如下错误:

Configuring MIT Pthreads
./configure: line 35814: cd: mit-pthreads: No such file or directory
[root@localhost mysql-4.0.26]# make
make: *** 没有指明目标并且找不到 makefile。 停止。

郁闷!
google上也查不到资料.
我是Red Hat FC 4, mysql 4.0.26.tar.gz

好像是说要安装LinuxThreads,找到了一个网址:ftp://prep.ai.mit.edu/pub/gnu/gl ... 了,安装失败了.

mysql-4.0.18-nptl-1.patch 这个补丁不存在了!404 not found

有人在FC 4 上成功装过mysql吗?说说你的经验吧?谢谢!
回复 支持 反对

使用道具 举报

发表于 2005-11-6 02:24:29 | 显示全部楼层
引用Mysql手册里:
===========================================================================
MIT-pthreads is not part of the MySQL 5.1 source distribution. If you require this package, you need to download it separately from http://www.mysql.com/Downloads/C ... _beta6-mysql.tar.gz

After downloading, extract this source archive into the top level of the MySQL source directory. It creates a new subdirectory named mit-pthreads.

    *

      On most systems, you can force MIT-pthreads to be used by running configure with the --with-mit-threads option:

shell> ./configure --with-mit-threads
========================================================================
到这里下载:
http://dev.mysql.com/get/Downloa ... ql.tar.gz/from/pick
然后解压,会生成mit-pthreads目录,在把这个目录移动到你的mysql源码目录下
然后再:
./configure --prefix=/www_server/mysql --with-mit-threads

我刚学Linux,真是困难重重啊!对于English水平不高的我来说,真的有点吃力!
为解决这个小问题,浪费了三个多小时了,我先吃饭去,呵呵
回复 支持 反对

使用道具 举报

发表于 2005-11-6 03:23:02 | 显示全部楼层
CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \
    --libexecdir=/usr/sbin --localstatedir=/srv/mysql \
    --enable-thread-safe-client --enable-assembler \
    --enable-local-infile --with-named-thread-libs=-lpthread \
    --with-unix-socket-path=/var/run/mysql/mysql.sock \
    --without-debug --without-bench --without-readline

BLFS提供的方法,一点问题都没有。

最重要的是这两个参数:CPPFLAGS="-D_GNU_SOURCE" 和 --with-named-thread-libs=-lpthread

BLFS 的说明:
CPPFLAGS="-D_GNU_SOURCE" and --with-named-thread-libs=-lpthread: This environment variable and configure switch enables building the package on NPTL systems
回复 支持 反对

使用道具 举报

发表于 2005-11-6 03:25:36 | 显示全部楼层
Post by 飞豹游侠
引用Mysql手册里:
===========================================================================
MIT-pthreads is not part of the MySQL 5.1 source distribution. If you require this package, you need to download it separately from http://www.mysql.com/Downloads/C ... _beta6-mysql.tar.gz

After downloading, extract this source archive into the top level of the MySQL source directory. It creates a new subdirectory named mit-pthreads.

    *

      On most systems, you can force MIT-pthreads to be used by running configure with the --with-mit-threads option:

shell> ./configure --with-mit-threads
========================================================================
到这里下载:
http://dev.mysql.com/get/Downloa ... ql.tar.gz/from/pick
然后解压,会生成mit-pthreads目录,在把这个目录移动到你的mysql源码目录下
然后再:
./configure --prefix=/www_server/mysql --with-mit-threads

我刚学Linux,真是困难重重啊!对于English水平不高的我来说,真的有点吃力!
为解决这个小问题,浪费了三个多小时了,我先吃饭去,呵呵



不错,这个是另外一个解决方法,不过还是觉得BLFS的方法比较好,用 NPTL 库。
回复 支持 反对

使用道具 举报

发表于 2005-11-6 04:37:29 | 显示全部楼层
还是有问题!!郁闷啊!

make,make install时,都有错误发生

我在尝试装mysql5.0
./configure时,没有出现那个"LinuxThreads"... "Not found"错误了

我在试试CPPFLAGS="-D_GNU_SOURCE" 这个,谢谢暗然销魂!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表