[GRASS5] 57 with postgres on OSX

Here is a compile error that I occurs when trying to build 57 (latest snapshot) with postgresql on OSX (the build finished with no errors if I simply remove the lines:
    --with-postgres-includes=/sw/include/postgresql \
    --with-postgres-libs=/sw/lib \

and add the line:
    --without-postgres \

to the config script.

I would very much like to be able to post 57 binaries with postgres support, but I could use some feedback from more experienced builders as to how to resolve this issue. In an earlier email Markus wrote:
"Your problem looks like a configure issue.

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

Markus"

Markus, Can you (or anyone else) expand on this idea? I just don't follow.

gcc -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include -I/usr/X11R6/include -I/sw/include -g -O2 -Wall -Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/sw/include -I/sw/include/postgresql -I/sw/include -I/sw/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include \
         -o OBJ.powerpc-apple-darwin7.0.0/main.o -c main.c
gcc -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include -I/usr/X11R6/include -I/sw/include -g -O2 -Wall -Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/sw/include -I/sw/include/postgresql -I/sw/include -I/sw/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include \
         -o OBJ.powerpc-apple-darwin7.0.0/parse.o -c parse.c
gcc -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include -I/usr/X11R6/include -I/sw/include -g -O2 -Wall -Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/sw/include -I/sw/include/postgresql -I/sw/include -I/sw/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/include -I/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/include \
         -o OBJ.powerpc-apple-darwin7.0.0/select.o -c select.c
gcc -g -L/sw/lib -L/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/lib -o /Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/driver/db/pg OBJ.powerpc-apple-darwin7.0.0/cursor.o OBJ.powerpc-apple-darwin7.0.0/db.o OBJ.powerpc-apple-darwin7.0.0/describe.o OBJ.powerpc-apple-darwin7.0.0/driver.o OBJ.powerpc-apple-darwin7.0.0/error.o OBJ.powerpc-apple-darwin7.0.0/execute.o OBJ.powerpc-apple-darwin7.0.0/fetch.o OBJ.powerpc-apple-darwin7.0.0/listdb.o OBJ.powerpc-apple-darwin7.0.0/listtab.o OBJ.powerpc-apple-darwin7.0.0/main.o OBJ.powerpc-apple-darwin7.0.0/parse.o OBJ.powerpc-apple-darwin7.0.0/select.o -L/sw/lib -lgrass_dbmidriver -lgrass_dbmibase -lgrass_sqlp -lgrass_dbstubs -lgrass_dbdialog -lgrass_gis -lgrass_datetime -lintl -lgrass_datetime -lpq -lcrypt -L/sw/lib/tcl8.4 -ltk -ltcl \
          -lz
ld: can't locate file for: -lcrypt
make[3]: *** [/Users/kirkw/grass/grass57_exp_2003_12_13/dist.powerpc-apple-darwin7.0.0/driver/db/pg] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------

Kirk R. Wythers wrote:

Here is a compile error that I occurs when trying to build 57 (latest
snapshot) with postgresql on OSX (the build finished with no errors if
I simply remove the lines:
    --with-postgres-includes=/sw/include/postgresql \
    --with-postgres-libs=/sw/lib \

and add the line:
    --without-postgres \

to the config script.

I would very much like to be able to post 57 binaries with postgres
support, but I could use some feedback from more experienced builders
as to how to resolve this issue. In an earlier email Markus wrote:
"Your problem looks like a configure issue.

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

Markus"

Markus, Can you (or anyone else) expand on this idea? I just don't
follow.

Just remove that line, or change it to an empty definition, i.e.:

  CRYPTLIB =

If you get any "undefined symbol" errors as a result, tell us what
they are.

--
Glynn Clements <glynn.clements@virgin.net>

On Dec 15, 2003, at 2:19 PM, Glynn Clements wrote:

In ./db/drivers/postgres/Makefile
CRYPTLIB = -lcrypt
is hardcoded. Maybe this should go elsewhere into Platform.make
?

Just remove that line, or change it to an empty definition, i.e.:

  CRYPTLIB =

If you get any "undefined symbol" errors as a result, tell us what
they are.

That did the trick Glynn. I set CRYPTLIB to empty and it built without a hitch. Should I be on the lookout for any particular runtime issues from that change?

--
Glynn Clements <glynn.clements@virgin.net>

------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------

Kirk R. Wythers wrote:

>> In ./db/drivers/postgres/Makefile
>> CRYPTLIB = -lcrypt
>> is hardcoded. Maybe this should go elsewhere into Platform.make
>> ?
>>
> Just remove that line, or change it to an empty definition, i.e.:
>
> CRYPTLIB =
>
> If you get any "undefined symbol" errors as a result, tell us what
> they are.

That did the trick Glynn. I set CRYPTLIB to empty and it built without
a hitch. Should I be on the lookout for any particular runtime issues
from that change?

Unlikely; any problems would be expected to occur at compile time.
However, just to be sure, you could try accessing a password-protected
database.

PostgreSQL uses the crypt() function to encode password (at least,
typical Linux versions do).

GNU libc relegates this function to a separate library (libcrypt);
primarly to mitigate against regulations concerning the export of
cryptographic code (servers in countries with restrictive laws can
just omit that particular library). On other Unices, crypt() is
typically in libc.

--
Glynn Clements <glynn.clements@virgin.net>

On Mon, Dec 15, 2003 at 08:19:38PM +0000, Glynn Clements wrote:

Kirk R. Wythers wrote:

> Here is a compile error that I occurs when trying to build 57 (latest
> snapshot) with postgresql on OSX (the build finished with no errors if
> I simply remove the lines:
> --with-postgres-includes=/sw/include/postgresql \
> --with-postgres-libs=/sw/lib \
>
> and add the line:
> --without-postgres \
>
> to the config script.
>
> I would very much like to be able to post 57 binaries with postgres
> support, but I could use some feedback from more experienced builders
> as to how to resolve this issue. In an earlier email Markus wrote:
> "Your problem looks like a configure issue.
>
> In ./db/drivers/postgres/Makefile
> CRYPTLIB = -lcrypt
> is hardcoded. Maybe this should go elsewhere into Platform.make
> ?
>
> Markus"
>
> Markus, Can you (or anyone else) expand on this idea? I just don't
> follow.

Just remove that line, or change it to an empty definition, i.e.:

  CRYPTLIB =

If you get any "undefined symbol" errors as a result, tell us what
they are.

./db/drivers/postgres/Makefile
is updated in CVS now.

Markus