[GRASSLIST:2159] Re: Fwd: 5.7 and postgres on Mac OSX
David Orme
d.orme at imperial.ac.uk
Thu Jan 8 09:18:54 EST 2004
Thanks Radim, that did the trick - though the first time I edited the
Makefile after configure rather than before and wondered why it
wouldn't work.
I've now run into a problem with compiling r.in.gdal:
> gcc
> -L/usr/local/src/grass57_exp_2004_01_03/dist.powerpc-apple-darwin6.8/
> lib -L/usr/local/pgsql/lib/ -o
> /usr/local/src/grass57_exp_2004_01_03/dist.powerpc-apple-darwin6.8/
> etc/bin/cmd/r.in.gdal OBJ.powerpc-apple-darwin6.8/gbgetsymbol.o
> OBJ.powerpc-apple-darwin6.8/gdalbridge.o
> OBJ.powerpc-apple-darwin6.8/main.o -lgrass_gproj -lproj
> -L/usr/local/lib -lgdal.1.1 -lgrass_gis -lgrass_datetime -lintl
> -lgrass_I -lgrass_vask -lncurses -L/usr/local/lib -lgdal.1.1 -ldl > -lz
> ld: warning can't open dynamic library: libtiff.dylib (checking for
> undefined symbols may be affected) (No such file or directory, errno =
> 2)
> ld: warning can't open dynamic library: libpng.3.dylib (checking for
> undefined symbols may be affected) (No such file or directory, errno =
> 2)
I've configured grass with --with-gdal and the configure script finds
gdal-config in /usr/local/bin. I suspect this is a gdal build issue but
I'm not sure. The r.in.gdal build links to libgdal.1.1.dylib, which in
turn should link libtiff and libpng. These _are_ in /usr/local/lib, so
I don't get why they aren't found.
> rwxr-xr-x 1 dorme staff 220932 Sep 29 2002
> /usr/local/lib/libpng.3.1.2.1.dylib
> lrwxr-xr-x 1 root wheel 20 Jan 6 10:31
> /usr/local/lib/libpng.3.dylib -> libpng.3.1.2.1.dylib
> -r-xr-xr-x 1 root wheel 664668 Nov 18 15:04
> /usr/local/lib/libtiff.3.6.0.dylib
> lrwxr-xr-x 1 root wheel 19 Jan 6 10:31
> /usr/local/lib/libtiff.dylib -> libtiff.3.6.0.dylib
The shared libraries listings for libgdal is as follows - should the
libtiff and libpng have a relative or absolute path?:
> bash-2.05a$ otool -L /usr/local/lib/libgdal.1.1.dylib
> /usr/local/lib/libgdal.1.1.dylib:
> ./libgdal.1.1.dylib (compatibility version 0.0.0, current
> version 0.0.0)
> libtiff.dylib (compatibility version 0.0.0, current version
> 0.0.0)
> libpng.3.dylib (compatibility version 0.0.0, current version
> 0.0.0)
> /usr/lib/libz.1.1.3.dylib (compatibility version 1.0.0,
> current version 1.1.3)
> /usr/local/lib/libdl.1.dylib (compatibility version 1.0.0,
> current version 1.0.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 63.0.0)
Any hints gratefully received.
David
On Thursday, January 8, 2004, at 09:58 am, Radim Blazek wrote:
> 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