hp-ux mysql_MySQL 5.1 英文手册 :: 2.11 Installing MySQL on HP-UX

2.11. Installing MySQL on HP-UX

If you install MySQL using a binary tarball distribution on HP-UX,

you may run into trouble even before you get the MySQL distribution

unpacked, as the HP-UX tar cannot handle long

file names. This means that you may see errors when you try to

unpack MySQL.

If this occurs, you must use GNU tar

(gtar) to unpack the distribution.

Because of some critical bugs in the standard HP-UX libraries, you

should install the following patches before trying to run MySQL on

HP-UX 11.0:

PHKL_22840 Streams cumulative

PHNE_22397 ARPA cumulative

This solves the problem of getting EWOULDBLOCK

from recv() and EBADF from

accept() in threaded applications.

If you are using gcc 2.95.1 on an unpatched HP-UX

11.x system, you may get the following error:

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:

The problem is that HP-UX does not define

pthreads_atfork() consistently. It has

conflicting prototypes in

/usr/include/sys/unistd.h:184 and

/usr/include/sys/pthread.h:440.

One solution is to copy

/usr/include/sys/unistd.h into

mysql/include and edit

unistd.h and change it to match the definition

in pthread.h. Look for this line:

extern int pthread_atfork(void (*prepare)(), void (*parent)(),

void (*child)());

Change it to look like this:

extern int pthread_atfork(void (*prepare)(void), void (*parent)(void),

void (*child)(void));

After making the change, the following configure

line should work:

CFLAGS="-fomit-frame-pointer -O3 -fpic" CXX=gcc \

CXXFLAGS="-felide-constructors -fno-exceptions -fno-rtti -O3" \

./configure --prefix=/usr/local/mysql --disable-shared

If you are using HP-UX compiler, you can use the following command

(which has been tested with cc B.11.11.04):

CC=cc CXX=aCC CFLAGS=+DD64 CXXFLAGS=+DD64 ./configure \

--with-extra-character-set=complex

You can ignore any errors of the following type:

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

documentation

If you get the following error from configure,

verify that you do not have the path to the K&R compiler before

the path to the HP-UX C and C++ compiler:

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.

Another reason for not being able to compile is that you didn't

define the +DD64 flags as just described.

Another possibility for HP-UX 11 is to use the MySQL binaries

provided at http://dev.mysql.com/downloads/, which we have built

and tested ourselves. We have also received reports that the HP-UX

10.20 binaries supplied by MySQL can be run successfully on HP-UX

11. If you encounter problems, you should be sure to check your

HP-UX patch level.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值