Re: BUG #4731: compile with -fast fails on ld: duplicate symbol _PGP_S2K_TYPE in pgp.o and pgp-mpi-openssl.o

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ceriel Jacobs" <cerieljacobs(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, Marko Kreen <markokr(at)gmail(dot)com>
Subject: Re: BUG #4731: compile with -fast fails on ld: duplicate symbol _PGP_S2K_TYPE in pgp.o and pgp-mpi-openssl.o
Date: 2009-03-25 13:58:24
Message-ID: 23058.1237989504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Ceriel Jacobs" <cerieljacobs(at)gmail(dot)com> writes:
> ld: duplicate symbol _PGP_S2K_TYPE in pgp.o and pgp-mpi-openssl.o

I think at bottom that's a compiler/linker bug which you should mention
to Apple. However, I see what is causing it: pgp.h contains

enum
{
PGP_S2K_SIMPLE = 0,
PGP_S2K_SALTED = 1,
PGP_S2K_ISALTED = 3
} PGP_S2K_TYPE;

I think what was meant was

enum PGP_S2K_TYPE
{
PGP_S2K_SIMPLE = 0,
PGP_S2K_SALTED = 1,
PGP_S2K_ISALTED = 3
};

because what the first one is doing is defining a global variable
that is of an anonymous enum type.

Marko, am I right that this is just a syntax mistake, and not
intentional creation of a variable? There are several occurrences
of the pattern in pgp.h.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marko Kreen 2009-03-25 14:12:23 Re: BUG #4731: compile with -fast fails on ld: duplicate symbol _PGP_S2K_TYPE in pgp.o and pgp-mpi-openssl.o
Previous Message Guillaume Smet 2009-03-25 08:57:28 Re: BUG #4728: segfault with window function partition involving subquery