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.h:184和/usr/include/sys/pthreads.h:440中的原型冲突。
一个解决办法是将/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 C和C++编译器的路径前是否有到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二进制,这是我们已经构建并测试过的。我们也收到了MySQL的HP-UX 10.20二进制可以在HP-UX 11上成功运行的报告。如果你遇到问题,一定要检查HP-UX补丁的版本。