各位高手帮忙,在编译mysql出现的错误
我从mysql.com上下载了源代码的安装文件(附件中com.tar.gz是编译时输出的,config.tar.gz编译时的日志)
1、tar zxvf mysql-4.1.21-nightly-20060528.tar.gz
2、cd mysql-4.1.21-nightly-20060528
3、./configure
编译到IB_CONFIG.H就不能往下编译了,在编译过程有很多文件不能找到
以下的是在编译为no的地方(./configure | grep no)
----------------------------------------
------
checking whether we are cross compiling... no
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /bin/sed
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether -lc should be explicitly linked in... no
checking for pdftex... no
checking for tex... no
checking for gnutar... no
checking for pdflatex... no
checking for makeindex... no
nm: lc-messages.o: no symbols
nm: lc-monetary.o: no symbols
nm: lc-numeric.o: no symbols
nm: lc-time.o: no symbols
nm: lc-paper.o: no symbols
nm: lc-name.o: no symbols
nm: lc-address.o: no symbols
nm: lc-telephone.o: no symbols
nm: lc-measurement.o: no symbols
nm: lc-identification.o: no symbols
nm: lc-collate.o: no symbols
nm: old_atexit.o: no symbols
nm: udiv_qrnnd.o: no symbols
nm: mp_clz_tab.o: no symbols
nm: getopt_init.o: no symbols
nm: init-posix.o: no symbols
nm: lseek64.o: no symbols
nm: oldgetrlimit64.o: no symbols
nm: getutmpx.o: no symbols
checking if we should use assembler functions... no
checking if we should use RAID... no
checking If we should should enable LOAD DATA LOCAL by default... no
checking for _LARGE_FILES... no
checking for library containing opendir... none required
checking floatingpoint.h usability... no
checking floatingpoint.h presence... no
checking for floatingpoint.h... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking select.h usability... no
checking select.h presence... no
checking for select.h... no
checking synch.h usability... no
checking synch.h presence... no
checking for synch.h... no
checking sys/vadvise.h usability... no
checking sys/vadvise.h presence... no
checking for sys/vadvise.h... no
checking sys/utime.h usability... no
checking sys/utime.h presence... no
checking for sys/utime.h... no
checking sys/malloc.h usability... no
checking sys/malloc.h presence... no
checking for sys/malloc.h... no
checking for gethostbyname_r in -lnsl_r... no
checking for p2open... no
checking for p2open in -lgen... no
checking for sem_init... no
checking for sem_init in -lposix4... no
checking for atomic operations... no
checking if we should use pstack... no
checking for int8... no
"no need to check headers"
checking the need for #pragma interface/implementation... no
checking whether byte ordering is bigendian... no
checking if struct timespec has a ts_sec member... no
checking for type uchar... no
checking for type fp_except... no
checking if pthread_yield takes 1 argument... no
checking whether gcc needs -traditional... no
checking vis.h usability... no
checking vis.h presence... no
checking for vis.h... no
checking for strlcat... no
checking for strlcpy... no
checking for issetugid... no
checking for fgetln... no
checking varargs.h usability... no
checking varargs.h presence... no
checking for varargs.h... no
checking ndir.h usability... no
checking ndir.h presence... no
checking for ndir.h... no
checking sys/ndir.h usability... no
checking sys/ndir.h presence... no
checking for sys/ndir.h... no
checking sys/ptem.h usability... no
checking sys/ptem.h presence... no
checking for sys/ptem.h... no
checking sys/pte.h usability... no
checking sys/pte.h presence... no
checking for sys/pte.h... no
checking sys/stream.h usability... no
checking sys/stream.h presence... no
checking for sys/stream.h... no
checking termbits.h usability... no
checking termbits.h presence... no
checking for termbits.h... no
checking whether stat file-mode macros are broken... no
checking for TIOCSTAT in sys/ioctl.h... no
checking if struct dirent has a d_ino member... yes
checking if struct dirent has a d_namlen member... no
checking for strunvis... no
checking for strvis... no
checking for strlcpy... (cached) no
checking for strlcat... (cached) no
checking for fgetln... (cached) no
checking for _doprnt... no
checking for bfill... no
checking for bmove... no
checking for chsize... no
checking for fconvert... no
checking for fpresetsticky... no
checking for fpsetmask... no
checking for getpassphrase... no
checking for locking... no
checking for pthread_attr_create... no
checking for pthread_attr_setprio... no
checking for pthread_condattr_create... no
checking for pthread_getsequence_np... no
checking for pthread_setprio... no
checking for pthread_setprio_np... no
checking for rwlock_init... no
checking for setupterm... no
checking for sigthreadmask... no
checking for tell... no
checking for thr_setconcurrency... no
checking for vidattr... no
checking for clock_gettime... no
which: no orbit-config in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
checking for ORBit... not found
checking if we should build MySQLFS... no
checking for OpenSSL... no
checking for big tables support... no
checking for BerkeleyDB... no
checking for Innodb... Using Innodb
checking for example storage engine... no
checking for archive storage engine... no
checking for csv storage engine... no
checking for blackhole storage engine... no
configure: configuring in innobase
configure: running /bin/sh './configure' --prefix=/usr/local CFLAGS='-O3 -DDBUG_OFF ' CXXFLAGS='-O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti' --cache-file=/dev/null --srcdir=.
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether we are cross compiling... no
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /bin/sed
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether -lc should be explicitly linked in... no
checking whether byte ordering is bigendian... no
----------------------------------------------
以下是在config.log中没有找到文件(grep directory config.log )
-----------------------------------------------
conftest.c:22:28: ac_nonexistent.h: No such file or directory
conftest.c:22:28: ac_nonexistent.h: No such file or directory
conftest.cc:33:28: ac_nonexistent.h: No such file or directory
conftest.cc:33:28: ac_nonexistent.h: No such file or directory
conftest.c:76:27: floatingpoint.h: No such file or directory
conftest.c:42:27: floatingpoint.h: No such file or directory
conftest.c:76:20: ieeefp.h: No such file or directory
conftest.c:42:20: ieeefp.h: No such file or directory
conftest.c:79:20: select.h: No such file or directory
conftest.c:45:20: select.h: No such file or directory
conftest.c:83:19: synch.h: No such file or directory
conftest.c:49:19: synch.h: No such file or directory
conftest.c:90:25: sys/vadvise.h: No such file or directory
conftest.c:56:25: sys/vadvise.h: No such file or directory
conftest.c:94:23: sys/utime.h: No such file or directory
conftest.c:60:23: sys/utime.h: No such file or directory
conftest.c:101:24: sys/malloc.h: No such file or directory
conftest.c:67:24: sys/malloc.h: No such file or directory
conftest.c:99:20: ieeefp.h: No such file or directory
conftest.c:146:17: vis.h: No such file or directory
conftest.c:112:17: vis.h: No such file or directory
conftest.c:151:18: ndir.h: No such file or directory
conftest.c:117:18: ndir.h: No such file or directory
conftest.c:153:22: sys/ndir.h: No such file or directory
conftest.c:119:22: sys/ndir.h: No such file or directory
conftest.c:153:22: sys/ptem.h: No such file or directory
conftest.c:119:22: sys/ptem.h: No such file or directory
conftest.c:153:21: sys/pte.h: No such file or directory
conftest.c:119:21: sys/pte.h: No such file or directory
conftest.c:154:24: sys/stream.h: No such file or directory
conftest.c:120:24: sys/stream.h: No such file or directory
conftest.c:158:22: termbits.h: No such file or directory
conftest.c:124:22: termbits.h: No such file or directory
-----------------------------------------------
以下是在config.log有error字样的行(grep error config.log)
---------------------------------------------
conftest.c:2: error: syntax error before "me"
conftest.cc:23: error: `exit' undeclared (first use this function)
conftest.cc:23: error: (Each undeclared identifier is reported only once for each function it appears in.)
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
conftest.cc:81: error: `atomic_add' undeclared (first use this function)
conftest.cc:81: error: (Each undeclared identifier is reported only once for each function it appears in.)
conftest.cc:81: error: `atomic_sub' undeclared (first use this function)
conftest.cc:81: error: (Each undeclared identifier is reported only once for each function it appears in.)
conftest.c:89: error: `int8' undeclared (first use in this function)
conftest.c:89: error: (Each undeclared identifier is reported only once
conftest.c:89: error: for each function it appears in.)
conftest.c:89: error: syntax error before "i"
conftest.c:96: error: `not' undeclared (first use in this function)
conftest.c:96: error: (Each undeclared identifier is reported only once
conftest.c:96: error: for each function it appears in.)
conftest.c:96: error: syntax error before "big"
configure:29313: g++ -c -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -Werror conftest.cc >&5
configure:29453: g++ -c -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -Werror conftest.cc >&5
conftest.cc:99: error: cannot convert `rlimit64*' to `const rlimit*' for argument `2' to `int setrlimit(__rlimit_resource_t, const rlimit*)'
conftest.c:104: error: structure has no member named `ts_sec'
conftest.c:105: error: structure has no member named `ts_nsec'
conftest.c:100: error: `uchar' undeclared (first use in this function)
conftest.c:100: error: (Each undeclared identifier is reported only once
conftest.c:100: error: for each function it appears in.)
conftest.c:100: error: syntax error before "foo"
conftest.c:101: error: `foo' undeclared (first use in this function)
conftest.c:102: error: `fp_except' undeclared (first use in this function)
conftest.c:102: error: (Each undeclared identifier is reported only once
conftest.c:102: error: for each function it appears in.)
conftest.c:102: error: syntax error before "foo"
conftest.c:103: error: `foo' undeclared (first use in this function)
conftest.c:114: error: too many arguments to function `pthread_yield'
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/varargs.h:4:2: #error "GCC no longer implements <varargs.h>."
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/varargs.h:5:2: #error "Revise your code to use <stdarg.h>."
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/varargs.h:4:2: #error "GCC no longer implements <varargs.h>."
/usr/lib/gcc/i386-redhat-linux/3.4.3/include/varargs.h:5:2: #error "Revise your code to use <stdarg.h>."
conftest.c:143: error: `TIOCSTAT' undeclared (first use in this function)
conftest.c:143: error: (Each undeclared identifier is reported only once
conftest.c:143: error: for each function it appears in.)
conftest.c:164: error: structure has no member named `d_namlen'
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
configure:35086: checking for perror
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
configure:35086: checking for strerror
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
| /* Override any gcc2 internal prototype to avoid an error. */
configure:35469: checking for dlerror
configure:35701: g++ -c -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -Werror conftest.cc >&5
conftest.cc:236: error: cannot convert `int*' to `hostent**' for argument `7' to `int gethostbyaddr_r(const void*, __socklen_t, int, hostent*, char*, size_t, hostent**, int*)'
configure:35798: g++ -c -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -Werror conftest.cc >&5
configure:35892: g++ -c -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -Werror conftest.cc >&5
conftest.cc:237: error: cannot convert `hostent_data*' to `char*' for argument `3' to `int gethostbyname_r(const char*, hostent*, char*, size_t, hostent**, int*)'
ac_cv_func_dlerror=yes
ac_cv_func_perror=yes
ac_cv_func_strerror=yes
man1_files='isamchk.1 isamlog.1 msql2mysql.1 myisam_ftdump.1 myisamchk.1 myisamlog.1 myisampack.1 mysql.1 mysql.server.1 mysql_config.1 mysql_fix_privilege_tables.1 mysql_zap.1 mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 mysqld.1 mysqld_multi.1 mysqld_safe.1 mysqldump.1 mysqlhotcopy.1 mysqlimport.1 mysqlman.1 mysqlshow.1 pack_isam.1 perror.1 replace.1 safe_mysqld.1'
[ 本帖最后由 anysoft 于 2006-5-29 09:41 编辑 ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
1)有没有读过mysql的安装手册啊?
http://dev.mysql.com/doc/refman/5.1/en/installing-source.html
2)你还没有开始编译吧?--> configure
把需要的其他软件全部安装好了再编译应该没有问题的。
3)另外,如果没有特殊的必要,
建议用rpm安装。*configure的时候似乎没看见你定义其他属性
能不能说说你要用源玛编译的理由?
看过了,都研究了好几遍了,需要环境都存在了
你还没有开始编译吧?--> configure
什么叫还没开始编译,不懂,我没带参数,主要是为了让大家看看错在那里
我以前用rpm包编译是能成功的。我用源代码是为了学习,和以后要用到,还有想学学优化数据库之类的
[ 本帖最后由 anysoft 于 2006-5-29 12:27 编辑 ]
./configure
make
make install
这才是编译文件安装完成!!!
这个我知道,但是我在./configure的时候有这么多错误,在用make,make install就没必要了。
这个错误是在这样的情况下出现的,我的linux是企业版4,装在vvmware上,在以前的时候用这些软件的源代码安装都正常,有一次我装postfix的时候出现一些错误,没解决,因为刚学不久,以前的linux系统让我弄的很乱,就重新安装了。
装好之后在重新安装mysql的时候就出现这样了。我装过5.0/5.1/4.1的版本都这样。我在想是不是系统设置方面对安装mysql有要求,但是我看了INSTALL文件又没有提及,所以我到现在还没找到原因。还有装好之后安装zhcon软件也出现差不多的问题,就是一些头文件没找到。在fc5系统上安装,也是一些头文件没找到。
高手能告诉我,安装源代码文件是不是需要这方面的设置。
?????????????????????????????没高手吗
为什么你从mysql上下载下来的源码包是mysql-4.1.21-nightly-20060528.tar.gz,而我怎么找也没有找到这个包。
推荐你还是去下载stable的版本的源码包来安装,下载下来后最好看看MD5值和MYSQL提供的是否一致。
linux发行版的版本也不说,唉。
mysql-4.1.21-nightly-20060528.tar.gz这个包是我安装stable失败之后我才去下载的,我还曾经安装过4.0/5.0/5.1都出现大同小异的错误,下载后的MD5值和MYSQL提供的也是一致。我曾经在REDHAT的fc5&RHEL4上安装都出现差不多的错误