top
Loading...
2.12.5.5.Alpha-DEC-UNIX(Tru64)版注意事項
2.12.5.5. Alpha-DEC-UNIX(Tru64)版注意事項

如果你在Digital Unix上使用egcs 1.1.2,應當升級到gcc 2.95.2,因為egcsDEC上有一些嚴重缺陷!

當在Digital UNIX下編譯線程程序時,文檔推薦對于cccxx使用-pthread選項和-lmach -lexc庫(除了-lpthread)。你應該象下面這樣運行configure

CC="cc -pthread" CXX="cxx -pthread -O" 
./configure --with-named-thread-libs="-lpthread -lmach -lexc -lc"

當編譯mysqld時,會看見下面的警告:

mysqld.cc: In function void handle_connections()':
mysqld.cc:626: passing long unsigned int *' as argument 3 of
accept(int,sockadddr *, int *)'

你可以放心地忽略這些警告,它們的發生是因為configure只能檢測出錯誤,而不是警告。

如果直接從命令行啟動服務器,當退出時,可能有死掉的問題。(當你退出時,重要進程收到一個SIGHUP信號),如果如此,試著象這樣啟動服務器:

nohup mysqld [options] &

nohup使得后面的命令忽視從終端發來的任何SIGHUP信號了。另外,通過運行safe_mysqld啟動服務器,可以讓nohup調用mysqld。請參見5.1.3節,“mysqld_safe:MySQL服務器啟動腳本”。

如果編譯mysys/get_opt.c時遇到問題,只需要從啟動文件刪掉#define _NO_PROTO行。

如果使用CompaqCC編譯器,下面的configure應當工作:

CC="cc -pthread"
CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed all -arch host"
CXX="cxx -pthread"
CXXFLAGS="-O4 -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

如果用共享庫編譯時libtool出現問題,應當能夠在鏈接mysql時通過下述命令解決該問題:

cd mysql
/bin/sh ../libtool --mode=link cxx -pthread  -O3 -DDBUG_OFF 
    -O4 -ansi_alias -ansi_args -fast -inline speed 
    -speculate all  -arch host  -DUNDEF_HAVE_GETHOSTBYNAME_R 
    -o mysql  mysql.o readline.o sql_string.o completion_hash.o 
    ../readline/libreadline.a -lcurses 
    ../libmysql/.libs/libmysqlclient.so  -lm
cd ..
gnumake
gnumake install
scripts/mysql_install_db
作者:mysql.com
來源:http://dev.mysql.com/doc/refman/5.1/zh/installing.html
北斗有巢氏 有巢氏北斗