Search the MySQL manual:

2.6.6.2 HP-UX Version 10.20 Notes

There are a couple of small problems when compiling MySQL on HP-UX. We recommend that you use gcc instead of the HP-UX native compiler, because gcc produces better code!

We recommend using gcc 2.95 on HP-UX. Don't use high optimisation flags (like -O6) as this 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

Posted by verkouter on Tuesday January 29 2002, @8:30am[Delete] [Edit]

LS,

When tried to compile the mysql/client part on
HPUX-10.20 w. gcc 2.95 I ran into problems. Lots
of errors including <stdio.h> (and some more
standard include files) about 'fpos_t' and 'int64'
stuff.

Used the setup they mention in here: didn't make a
difference. Suspected it had to do with large-file
support.

Did a ./configure, with one of the options being
'--disable-large-file'. Again no success.

Went into 'include/my_config.h'. It appeared that
the typical #define's for large-file support were
still in there.

Did a #undef on the following variables:
_FILE_OFFSET_BITS
_LARGEFILE_SOURCE
_LARGE_FILES

and *she-bang*! Compiles and runs like a charm!

Add your own comment.