HP Unix 11.00 Compiler error.

Started by Chris Bowlbyover 24 years ago3 messages
#1Chris Bowlby
excalibur@hub.org

I have a friend of mine who sent me this... (I'm acting as a relay
here...).

I am trying to compile PostgreSQL 7.1.1 under HP-UX 11.00
(HP-UX dwhp2 B.11.00 U 9000/800 1195951537 unlimited-user license)
with the C++ library and OpenSSL but having little success.
I've tried both the HP-UX aCC++ and GCC 2.95 compilers.
Each different attempt brings out its own set of errors and
weirdness.

Here's where I stand:

Cannot compile PostgreSQL, C++ library (--with-CXX), and
OpenSSL (--with-openssl=/opt/openssl) with HP's aCC
(latest version). Configure hangs when testing for SSL library.
The configure command line looks like this.

./configure
--with-includes="/opt/zlib/include:/opt/openssl/include/openssl"
\
--with-libraries="/opt/zlib/lib" \
--with-openssl=/opt/openssl \
--with-CXX
The /opt/openssl/include/openssl line is needed because the
HP-UX porting archive's layout of OpenSSL puts the .h files
in /opt/openssl/include/openssl/, so specifying
--with-openssl=/opt/openssl by itself isn't sufficient to
get all the paths. The configure script errors out looking
for _eprintf(), which apparently is a now deprecated GCC
attempt at a compatibility layer. This tells me I really
can't use the binary build made by the HP-UX porting archive
folks.

Compile PostgreSQL and C++ library (--with-CXX) with HP's
aCC (latest version). Works fine (but still doesn't get me
to OpenSSL).

Tried also the HP developer program support desk's version
of GCC which installs in /usr/local. Configure runs fine
but HP's ld breaks on OpenSSL's libssl .
/usr/ccs/bin/ld: DP relative code in file
/opt/openssl/lib/libssl.a(s23_meth.o) - shared library
must be position independent. Use +z or +Z to recompile.
This tells me I still need to recompile OpenSSL from source
because the archive centre's packaging job isn't quite all
there yet (or there's a compiler conflict).

Cannot build OpenSSL from source because Perl-5.6.1 (guess
from where) is also broken (it can't understand "use strict"
because the library is missing the strict.pm module, among
others.

Cannot compile PostgreSQL and C++ library (--with-CXX) with GCC.
Can't find <string> class in STL. Suspect packaging
job done by HP-UX porting archive: it moves GCC from
/usr/local to /opt, and a few things didn't make the
trip smoothly. The other version

Compile PostgreSQL by itself with GCC. Works fine.

I know that the problem is not strictly an issue with PostgreSQL,
but any expertise you can bring to the problem is welcome.
If you need to actually get on the system, we'll get you a
NDA and an ssh login.

Any ideas?

Chris Bowlby,
-----------------------------------------------------
Web Developer @ Hub.org.
excalibur@hub.org
www.hub.org
1-902-542-3657
-----------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris Bowlby (#1)
Re: [HACKERS] HP Unix 11.00 Compiler error.

Chris Bowlby <excalibur@hub.org> writes:

The configure script errors out looking
for _eprintf(), which apparently is a now deprecated GCC
attempt at a compatibility layer. This tells me I really
can't use the binary build made by the HP-UX porting archive
folks.

FWIW, I've seen eprintf link failures on HPUX 10.20 as well. I think
the key to avoiding it is that you have to build all the components with
the same compiler (all gcc, or all HP's). If you want to link against a
precompiled ssl library then that will determine your choice of compiler.

Cannot compile PostgreSQL and C++ library (--with-CXX) with GCC.
Can't find <string> class in STL. Suspect packaging
job done by HP-UX porting archive: it moves GCC from
/usr/local to /opt, and a few things didn't make the
trip smoothly.

I agree. I don't have any trouble building the C++ library here,
using either hand-built gcc or HP's cc. I let gcc install itself
in the usual place, ie, /usr/local.

The Porting Archive guys do good work, but their stuff gives headaches
if you want to mix and match it with stuff you build yourself. They're
way too eager to mess around with install locations.

I'd recommend rebuilding gcc in a vanilla configuration, using the
porting archive gcc just for bootstrap purposes.

regards, tom lane

#3Chris Bowlby
excalibur@hub.org
In reply to: Tom Lane (#2)
Re: [HACKERS] HP Unix 11.00 Compiler error.

On Thu, 24 May 2001, Tom Lane wrote:

Great, I'll pass this on thanks.

Chris Bowlby <excalibur@hub.org> writes:

The configure script errors out looking
for _eprintf(), which apparently is a now deprecated GCC
attempt at a compatibility layer. This tells me I really
can't use the binary build made by the HP-UX porting archive
folks.

FWIW, I've seen eprintf link failures on HPUX 10.20 as well. I think
the key to avoiding it is that you have to build all the components with
the same compiler (all gcc, or all HP's). If you want to link against a
precompiled ssl library then that will determine your choice of compiler.

Cannot compile PostgreSQL and C++ library (--with-CXX) with GCC.
Can't find <string> class in STL. Suspect packaging
job done by HP-UX porting archive: it moves GCC from
/usr/local to /opt, and a few things didn't make the
trip smoothly.

I agree. I don't have any trouble building the C++ library here,
using either hand-built gcc or HP's cc. I let gcc install itself
in the usual place, ie, /usr/local.

The Porting Archive guys do good work, but their stuff gives headaches
if you want to mix and match it with stuff you build yourself. They're
way too eager to mess around with install locations.

I'd recommend rebuilding gcc in a vanilla configuration, using the
porting archive gcc just for bootstrap purposes.

regards, tom lane

Chris Bowlby,
-----------------------------------------------------
Web Developer @ Hub.org.
excalibur@hub.org
www.hub.org
1-902-542-3657
-----------------------------------------------------