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.
There are a couple of small problems when compiling MySQL on HP-UX. Use gcc instead of the HP-UX native compiler, because gcc produces better code.
Use gcc 2.95 on HP-UX. Do not use high
optimization flags (such as -O6
) because they
may not be safe on HP-UX.
The following configure line should work with gcc 2.95:
CFLAGS="-I/opt/dce/include -fpic" \ CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \ -fno-rtti" \ CXX=gcc \ ./configure --with-pthread \ --with-named-thread-libs='-ldce' \ --prefix=/usr/local/mysql --disable-shared
The following configure line should work with gcc 3.1:
CFLAGS="-DHPUX -I/opt/dce/include -O3 -fPIC" CXX=gcc \ CXXFLAGS="-DHPUX -I/opt/dce/include -felide-constructors \ -fno-exceptions -fno-rtti -O3 -fPIC" \ ./configure --prefix=/usr/local/mysql \ --with-extra-charsets=complex --enable-thread-safe-client \ --enable-local-infile --with-pthread \ --with-named-thread-libs=-ldce --with-lib-ccflags=-fPIC --disable-shared
User Comments
I have compiled MySQL 4.0.17 on HP-UX 10.20 with the HP compiler version B.10.20.09 configuring with the option --with-mit-thread.
I failed install Mysql-3.23.58 and Mysql-4.0.18 source distribution on HP-UNIX 10.20 . It prompts "../include/global.h:94: pthread.h: No such file or directory" when run make.
CFLAGS="-I/opt/dce/include -fpic" \
CXXFLAGS="-I/opt/dce/include -felide-constructors -fno-exceptions \
-fno-rtti" \
CXX=gcc \
./configure \
--with-named-thread-libs='-ldce' \
--prefix=/opt/mysql --disable-shared \
--with-mit-threads \
--disable-largefile
Add your own comment.