top
Loading...
2.12.5.2.HP-UX11.x版注意事項
2.12.5.2. HP-UX 11.x版注意事項
由于在標準 HP-UX庫中有一些嚴重錯誤,試圖在HP-UX 11.0上運行MySQL前應當安裝下面的補丁:
PHKL_22840 Streams cumulative
PHNE_22397 ARPA cumulative

這樣可以解決在線程應用程序中運行recv()時得到EWOULDBLOCK和執行accept()時得到EBADF的問題。

如果你在未打補丁的HP-UX 11.x系統中使用gcc 2.95.1,可能會遇到下面的錯誤:

In file included from /usr/include/unistd.h:11,
                 from ../include/global.h:125,
                 from mysql_priv.h:15,
                 from item.cc:19:
/usr/include/sys/unistd.h:184: declaration of C function ...
/usr/include/sys/pthread.h:440: previous declaration ...
In file included from item.h:306,
                 from mysql_priv.h:158,
                 from item.cc:19:

問題是HP-UX沒有一致地定義pthreads_atfork()。它同/usr/include/sys/unistd.h184/usr/include/sys/pthreads.h440中的原型沖突。

一個解決辦法是將/usr/include/sys/unistd.h復制到MySQL/include并編輯unistd.h,對它進行更改以匹配pthreads.h中的定義。查找下列行:

extern int pthreads_atfork(void (*prepare)()void (*parent)(),
                                          void (*child)())

將它更改為:

extern int pthreads_atfork(void (*prepare)(void)void (*parent)(void),
                                          void (*child)(void))

更改完后,下面的configure行應當工作:

CFLAGS="-fomit-frame-pointer -O3 -fpic" CXX=gcc 
CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3" 
./configure --prefix=/usr/local/mysql --disable-shared

如果你使用HP-UX 編譯器,可以使用下面的命令(已經用cc B.11.11.04進行了測試)

CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure 
    --with-extra-character-set=complex

你可以忽略下面類型的任何錯誤:

aCC: warning 901: unknown option: `-3': use +help for online
documentation

如果運行configure時遇到下面的錯誤,請驗證在到HP-UX CC++編譯器的路徑前是否有到K&R編譯器的路徑:

checking for cc option to accept ANSI C... no
configure: error: MySQL requires an ANSI C compiler (and a C++ compiler).
Try gcc. See the Installation chapter in the Reference Manual.

不能編譯的另一個原因可能是你沒有按照前面所述定義+DD64標記。

對于HP-UX 11,另一個辦法是使用http://dev.mysql.com/downloads/提供的MySQL二進制,這是我們已經構建并測試過的。我們也收到了MySQLHP-UX 10.20二進制可以在HP-UX 11上成功運行的報告。如果你遇到問題,一定要檢查HP-UX補丁的版本。

作者:mysql.com
來源:http://dev.mysql.com/doc/refman/5.1/zh/installing.html
北斗有巢氏 有巢氏北斗