AW: [postgis-users] Building Postgres under FreeBSD 4.7

Benjamin Thelen benjamin.thelen at ccgis.de
Mon Mar 24 09:50:35 PST 2003


Hi Paul,

Thanks for your advice!
I thought I've read somewhere that if you use make under FreeBSD it'll
automatically uses the gmake version. But it obviously does not, as the
output of the attempt to compile postgis with gmake shows below. It is
quite different to the make output.

bsd# gmake
gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic
-DPIC -g 
-I/usr/local/include -I. -I../../src/include  -DFRONTEND
-DSYSCONFDIR='"/usr/lo
cal/pgsql/etc"' -DUSE_PROJ -DUSE_VERSION=72  -c -o postgis_debug.o
postgis_debu
g.c
postgis_debug.c: In function `decode_wkb_collection':
postgis_debug.c:212: `BYTE_ORDER' undeclared (first use in this
function)
postgis_debug.c:212: (Each undeclared identifier is reported only once
postgis_debug.c:212: for each function it appears in.)
postgis_debug.c:212: `LITTLE_ENDIAN' undeclared (first use in this
function)
postgis_debug.c: In function `decode_wkb':
postgis_debug.c:281: `BYTE_ORDER' undeclared (first use in this
function)
postgis_debug.c:281: `LITTLE_ENDIAN' undeclared (first use in this
function)
gmake: *** [postgis_debug.o] Error 1


I've found entries of LITTLE_ENDIAN and BYTE_ORDER. But I don't know
what to do with this.
So I definitely took the wrong make utility, but it still does not
succeed.


I found a posting in the mailing list:
http://postgis.refractions.net/pipermail/postgis-users/2002-March/000817
.html

I found that I have to declare the following at the top of postgis.h

#define                 BIG_ENDIAN              4321
#define                 LITTLE_ENDIAN   1234

I did so and got the following messages of gmake below. Why are those
numbers 4321 and 1234? That seems to be a little strange. What are those
entries and why are they missing in the default source code?
Well just one Error left, the guy who wrote this posting was happy just
to have one error.
Is the installation of postgis now done? How can I check it?

Bsd# gmake
gcc -pipe -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic
-DPIC -g -I/usr/local/include -I. -I../../src/include  -DFRONTEND
-DSYSCONFDIR='"/usr/local/pgsql/etc"' -DUSE_PROJ -DUSE_VERSION=72  -c -o
postgis_debug.o postgis_debug.c
postgis_debug.c: In function `decode_wkb_collection':
postgis_debug.c:212: `BYTE_ORDER' undeclared (first use in this
function)
postgis_debug.c:212: (Each undeclared identifier is reported only once
postgis_debug.c:212: for each function it appears in.)
postgis_debug.c: In function `decode_wkb':
postgis_debug.c:281: `BYTE_ORDER' undeclared (first use in this
function)
gmake: *** [postgis_debug.o] Error 1


 

Just to have all necessary information available:

Pkg_info shows the following
gmake-3.79.1_3      GNU version of 'make' utility


And "gmake --version" shows the following
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-portbld-freebsd4.7
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make at gnu.org


Thanks again,
Benjamin




-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] Im Auftrag von
Paul Ramsey
Gesendet: Montag, 24. März 2003 16:41
An: PostGIS Users Discussion
Betreff: Re: [postgis-users] Building Postgres under FreeBSD 4.7

It sounds like your version of make does not like our makefile for some 
reason.  Try 'gmake' first and see what happens.
Paul

On Sunday, March 23, 2003, at 10:09 AM, Benjamin Thelen wrote:

> Hi,
>
> I am quite new to Unix and started with FreeBSD 4.7. I've installed
> postgresql 7.2.2 via the ports collection and it is running.
> Additionally I downloaded the postgresql source tree, built it
> (/.configure, make) and added the postgis source code into
> postgresql/contrib./postgis After that I compiled the proj4 library
> without problems. Then I tried to compile postgis 0.7.2, but the 
> process
> stops with an error message like you find below. I then deleted the
> 0.7.2 Code and took 0.7.4. The message between 0.7.2 and 0.7.4 differs

> a
> little but both are telling something about missing dependency
operator
> and so on.
>
>
> bsd# cd /root/tmp/postgresql-7.2.2/postgresql-7.2.2/contrib/postgis/
> bsd# make
>
"/root/tmp/postgresql-7.2.2/postgresql-7.2.2/contrib/postgis/Makefile",
> line 25:
>  Missing dependency operator
>
"/root/tmp/postgresql-7.2.2/postgresql-7.2.2/contrib/postgis/Makefile",
> line 29:
>  Need an operator
>
"/root/tmp/postgresql-7.2.2/postgresql-7.2.2/contrib/postgis/Makefile",
> line 33:
>  Need an operator
> Error expanding embedded variable.
>
>
>
>
> I read a thread in the postgis mailing list about FreeBSD and postgis
> but it doesn't help very much, because there is just one thing 
> mentioned
> what must be changed (add "include "machine/endian.h"" to
> postgis_debug.c), but the rest of the necessary changes are not
> mentioned at all. He also says it is difficult for a novice to compile
> postgis.
>
>
>
> Here are the first lines of the postgis 0.7.4 Makefile, where I've
> changed the USE_PROJ to 1.
>
> Configuration Directives
>
> #---------------------------------------------------------------
> # Set USE_PROJ to 1 for Proj4 reprojection support
> #
> USE_PROJ=1
> PROJ_DIR=/usr/local
>
> #---------------------------------------------------------------
> # Set USE_STATS to 1 for new GiST statistics collection support
> # Note that this support requires additional columns in
> # GEOMETRY_COLUMNS, so see the list archives for info or
> # install a fresh database using postgis.sql
> #
> USE_STATS=0
>
> #---------------------------------------------------------------
> subdir=contrib/postgis
>
>
> What can I do to have it running? I would think it is something what
> must be changed in the Makefile, but I guess I am wrong. I don't know
> where to start my error search. Is it easier to take Linux?
>
>
> Thanks in advance,
> Benjamin
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632


_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list