Thread: PostgreSQL 7.1b5 + OpenSSL 0.9.4 Name Conflict under Solaris 7

PostgreSQL 7.1b5 + OpenSSL 0.9.4 Name Conflict under Solaris 7

From
Matt Prazak
Date:
PostgreSQL 7.1beta5 did not compile on my machine without a workaround
after configuring with the "--with-ssl" switch.  Here is some of the
output from the uname command:

  SunOS 5.7 sun4m sparc

The problem was a name conflict between function declarations in
/usr/include/crypt.h and
<OpenSSL_0.9.4_basedir>/include/openssl/des.h.  The workaround was to
comment out the inclusion of crypt.h in

  <PostgresSQL_basedir>/src/backend/libpq/crypt.c
  <PostgresSQL_basedir>/src/backend/libpq/password.c
  <PostgresSQL_basedir>/src/interfaces/libpq/fe-auth.c
  <PostgresSQL_basedir>/src/interfaces/libpq/fe-connect.c

so that the OpenSSL declarations were favored.  After compilation, the
regression tests (gmake check) all passed (after creating and su-ing
to the postgres user).  I have done some work with the installed
instance of PostgreSQL with no issues so far, but I'm not sure that I
have exercised the code that relied on crypt.h/des.h, yet.

I have not tried to compile PostgreSQL before, so I cannot say whether
this problem is new; however, crypt.h appears to be part of the
standard set of header files in /usr/include (it is part of the
SUNWhea package).

--
Matthew W. Prazak, Systems Engineer
Logicon Information Systems and Services
5300 International Boulevard, Suite 105
North Charleston, SC  29418

Telephone: (843) 760-3212
E-Mail...: prazak@scra.org
Fax......: (843) 760-3780


Re: PostgreSQL 7.1b5 + OpenSSL 0.9.4 Name Conflict under Solaris 7

From
Peter Eisentraut
Date:
Matt Prazak writes:

> The problem was a name conflict between function declarations in
> /usr/include/crypt.h and
> <OpenSSL_0.9.4_basedir>/include/openssl/des.h.  The workaround was to
> comment out the inclusion of crypt.h in

This is believed to be the fault of OpenSSL, and I think they were
informed of it.  This failure seems to happen on a few platforms.  There's
nothing we can really do for you until OpenSSL gets fixed.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/