Thread: 7.2.2 on Mac OS 10.2.1 (Darwin 6.0)

7.2.2 on Mac OS 10.2.1 (Darwin 6.0)

From
Jeshua Lacock
Date:
Greetings,

While attempting to build Postgres 7.2.2 here on Mac OS 10.2.1, I am
running into a bit of difficulty.

Note that with the introduction of Jaguar (Mac OS 10.2), Apple has
started including sem.h, so I needed to remove the following code from
ipc.c, pg_proc.c and spin.c:

#if defined(__darwin__)
#include "port/darwin/sem.h"
#endif

Otherwise, I get a few "previous declaration" and "redefinition" errors.

However, where I am really running into trouble is, regardless of
building with or without SSL support, is while attempting to build the
"src/interfaces/ecpg/lib" directory I get the following:

gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes
-Wmissing-declarations  -flat_namespace -bundle -undefined suppress
execute.o typename.o descriptor.o data.o error.o prepare.o memory.o
connect.o misc.o -L/usr/local/ssl -L../../../../src/interfaces/libpq
-lpq  -o libecpg.so.3.3.0
ld: Undefined symbols:
_crypt referenced from libpq expected to be defined in libcrypto
make[4]: *** [libecpg.so.3.3.0] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

I have built all dependent libraries with Mac OS 10.2 (gcc 3.1),
including OpenSSL 0.9.6g.

The build statement has the incorrect flags for using SSL on my system,
so I tried adding:
    -L/usr/local/ssl/lib -lssl -lcrypto

However,  it still fails with the same error.

Alas, I have Greped and Googled to no avail.

Any ideas or suggestions would be greatly appreciated; in fact I would
be willing to hire someone to ssh in to take a look, if required.


Thanks,

Jeshua Lacock __________________________
Programmer/Owner            Phone:   760.935.4736
http://OpenOSX.com           Fax:        760.935.4845
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_


Re: 7.2.2 on Mac OS 10.2.1 (Darwin 6.0)

From
Benjamin Reed
Date:
On Monday, September 30, 2002, at 07:46 PM, Jeshua Lacock wrote:

> Otherwise, I get a few "previous declaration" and "redefinition"
> errors.

Yeah, the sem stuff changed.

> However, where I am really running into trouble is, regardless of
> building with or without SSL support, is while attempting to build the
> "src/interfaces/ecpg/lib" directory I get the following:
>
> gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes
> -Wmissing-declarations  -flat_namespace -bundle -undefined suppress
> execute.o typename.o descriptor.o data.o error.o prepare.o memory.o
> connect.o misc.o -L/usr/local/ssl -L../../../../src/interfaces/libpq
> -lpq  -o libecpg.so.3.3.0
> ld: Undefined symbols:
> _crypt referenced from libpq expected to be defined in libcrypto

I'm not sure what could be causing this, but if you want a shortcut, we
have a PostgreSQL package in fink that builds OK.  You may at the very
least want to take a look at the patch file and see if any of the
things we're doing fix your issues (It's been a while since I looked at
the patch, I don't recall specifically what was changed).

You can view the patch in CVS here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/fink/dists/10.2/
unstable/crypto/finkinfo/postgresql-ssl-7.2.2-2.patch?rev=1.1&content-
type=text/vnd.viewcvs-markup


Re: 7.2.2 on Mac OS 10.2.1 (Darwin 6.0)

From
Tom Lane
Date:
Jeshua Lacock <jeshua@OpenOSX.com> writes:
> While attempting to build Postgres 7.2.2 here on Mac OS 10.2.1, I am
> running into a bit of difficulty.
> ...
> "src/interfaces/ecpg/lib" directory I get the following:

> gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes
> -Wmissing-declarations  -flat_namespace -bundle -undefined suppress
> execute.o typename.o descriptor.o data.o error.o prepare.o memory.o
> connect.o misc.o -L/usr/local/ssl -L../../../../src/interfaces/libpq
> -lpq  -o libecpg.so.3.3.0
> ld: Undefined symbols:
> _crypt referenced from libpq expected to be defined in libcrypto
> make[4]: *** [libecpg.so.3.3.0] Error 1

FWIW, I see no comparable failure on OSX 10.1 using current Postgres CVS
(7.3beta2+).  The link line for libecpg has
    -L/usr/local/ssl/lib
and no specific mention of -lssl or -lcrypto.  I suspect the -L isn't
really needed either, and that it works correctly because
    -L/usr/local/ssl/lib -lssl -lcrypto
are used in building libpq.so in src/interfaces/libpq/.  What command
gets used there for you?

            regards, tom lane