[GRASSLIST:2155] Re: Fwd: 5.7 and postgres on Mac OSX

Radim Blazek blazek at itc.it
Thu Jan 8 04:58:39 EST 2004


On Tuesday 06 January 2004 11:54, David Orme wrote:
> Hi all,
>
> I'd noticed the missing -L/usr/local/pgsql/lib but didn't know how to
> deal with it. I've tried both the makefile edits that Glynn suggested
> and either solves the problem for creating libgrass_vect.dylib. The
> same problem then happens for libgrass_sites.dylib. The sites Makefile
> contains:
>
> EXTRA_LIBS=$(GISLIB) $(DBMILIB) $(VECTLIB)
>
> If I add $(PQLIBPATH) $(PQLIB) then that creates but then
> libgrass_interpfl.dylib fails...
>
> My pgsql libraries are in /usr/local/pgsql/lib, which seems to be the
> default for PostgreSQL - do I need to chase through the makefiles or am
> I missing something simpler - I've tried linking libpq2.2.so into
> /usr/local/lib and that doesn't help.
>
> Any suggestions?

If compiled with postgres, PQLIB is required in all vector modules, 
so correct would be probably 
VECT_LDFLAGS = $(PQLIBPATH) in Grass.make.in
and 
EXTRA_LDFLAGS = $(VECT_LDFLAGS) in all vector Makefiles 
but for now, I have added $(PQLIBPATH) to LDFLAGS in Grass.make.in

Radim


> Thanks,
> David
>
> On Monday, January 5, 2004, at 10:41  pm, Glynn Clements wrote:
> > David Orme wrote:
> >> I'm trying again to build grass 5.7 (from 2004_01_03 snapshots) on mac
> >> 10.2.8: make bails out when trying to create libgrass_vect.dylib
> >> because it can't locate -lpq. I've got the postgres libs and includes
> >> in my configure arguments and I can't work out where I'm going wrong.
> >> I've put the steps below - can anyone suggest what's going on?
> >
> > The build system is ignoring your --with-postgres-libs= setting in
> > this instance (no -L/usr/local/pgsql/lib switch).
> >
> > I'm not particularly familiar with the 5.7 build system, but
> > lib/vector/Vlib/Makefile should probably have:
> >
> > 	EXTRA_LIBDIRS = $(PQLIBPATH)
> >
> > Either that, or EXTRA_LIBS should have:
> >
> > 	EXTRA_LIBS = ... $(PQLIBPATH) $(PQLIB)
> >
> > rather than just $(PQLIB).
> >
> > --
> > Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list