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 don't 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.
User Comments
I installed the 11.0 binaries from the HP-UX Porting and ARchive web page at hpux.cs.utah.edu. When I first tried to run mysql I got "/usr/lib/dld.sl: Can't find path for shared library: libstdc++.sl". I don't know where that shared library is supposed to come from but I found I had a copy in /opt/Acrobat5/Reader/hppahpux/lib. I sym linked it to /usr/local/lib and mysql ran OK.
If you compile the source with CC=gcc CXX=gcc ./configure ... that problem with libdc... will disappear !
Add your own comment.