当前位置: 技术问答>linux和unix
Unix下编译Mysql源文件的问题!!
来源: 互联网 发布时间:2015-12-06
本文导语: 在Tru64下要安装Mysql,为此下载了Mysql的源码。 按照官方的文档输入一大串命令: CC="cc -pthread" CFLAGS="-ansi_alias -ansi_args -fast -inline speed all -arch host" CXX="cxx -pthread" CXXFLAGS="-ansi_alias -ansi_args -fast -inline speed all ...
在Tru64下要安装Mysql,为此下载了Mysql的源码。
按照官方的文档输入一大串命令:
CC="cc -pthread"
CFLAGS="-ansi_alias -ansi_args -fast -inline speed all -arch host"
CXX="cxx -pthread"
CXXFLAGS="-ansi_alias -ansi_args -fast -inline speed all
-arch host -noexceptions -nortti"
export CC CFLAGS CXX CXXFLAGS
./configure
--prefix=/usr/local/mysql
--with-low-memory
--enable-large-files
--enable-shared=yes
--with-named-thread-libs="-lpthread -lmach -lexc -lc"
gnumake
当输入完./configure --prefix=/usr/local/mysql --with-low-memory --enable-large-files --enable-shared=yes --with-named-thread-libs="-lpthread -lmach -lexc -lc"
后,出现如下提示:
system type... alphaev6-dec-osf4.0f
checking host system type... alphaev6-dec-osf4.0f
checking target system type... alphaev6-dec-osf4.0f
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking "character sets"... default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8
checking whether to compile national Unicode collations... yes
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for gcc... cc -pthread
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
查看了config.log,出问题的应该是这段:
Digital UNIX Compiler Driver 3.11
configure:3666: $? = 0
configure:3689: checking for C compiler default output file name
configure:3692: cc -pthread -ansi_alias -ansi_args -fast -inline speed all -arch host conftest.c >&5
ld:
Can't open: all (No such file or directory)
configure:3695: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
有没人遇到过类似情况?请问该如何解决?!!,谢了。
按照官方的文档输入一大串命令:
CC="cc -pthread"
CFLAGS="-ansi_alias -ansi_args -fast -inline speed all -arch host"
CXX="cxx -pthread"
CXXFLAGS="-ansi_alias -ansi_args -fast -inline speed all
-arch host -noexceptions -nortti"
export CC CFLAGS CXX CXXFLAGS
./configure
--prefix=/usr/local/mysql
--with-low-memory
--enable-large-files
--enable-shared=yes
--with-named-thread-libs="-lpthread -lmach -lexc -lc"
gnumake
当输入完./configure --prefix=/usr/local/mysql --with-low-memory --enable-large-files --enable-shared=yes --with-named-thread-libs="-lpthread -lmach -lexc -lc"
后,出现如下提示:
system type... alphaev6-dec-osf4.0f
checking host system type... alphaev6-dec-osf4.0f
checking target system type... alphaev6-dec-osf4.0f
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking "character sets"... default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8
checking whether to compile national Unicode collations... yes
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for gcc... cc -pthread
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
查看了config.log,出问题的应该是这段:
Digital UNIX Compiler Driver 3.11
configure:3666: $? = 0
configure:3689: checking for C compiler default output file name
configure:3692: cc -pthread -ansi_alias -ansi_args -fast -inline speed all -arch host conftest.c >&5
ld:
Can't open: all (No such file or directory)
configure:3695: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
有没人遇到过类似情况?请问该如何解决?!!,谢了。
|
也许是你的make或者其他软件版本太低,不妨检查一下,参见
http://dev.mysql.com/doc/refman/5.1/zh/installing.html#installing-source
http://dev.mysql.com/doc/refman/5.1/zh/installing.html#installing-source
|
unix自带的make的版本比较低,应该用GNU
|
Makefile的问题
|
gcc 没有安装
重新安装一个吧
重新安装一个吧