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

Benjamin Thelen benjamin.thelen at ccgis.de
Fri Apr 4 07:38:58 PST 2003


Well, sorry for that late response, but our company has moved to another
place and I had a lot of other things to do.

Two questions still remain:
1. I don't know which entries I have to add to postgis_debug.c, both or just
LITTLE_ENDIAN because your code replied LITTLE_ENDIAN?
2. I was able to compile postgis on another machine (without adding
edian-etries! Why is that?), it seems without essential errors. There is
acutally no message like "Installation ended successfully". The last line
just sais "gmake [1] Leaving directory '/.../contrib/postgis/loader'. Does
that mean success? I added the whole compiling output below.


Thanks in advance for your help!
Benjamin


qwertzuiop# ls
CHANGES                         postgis_gist_71.c
COPYING                         postgis_gist_72.c
CREDITS                         postgis_inout.c
Makefile                        postgis_ops.c
README.postgis                  postgis_proj.c
TODO                            postgis_sql_71_end.sql.in
create_undef.pl                 postgis_sql_71_start.sql.in
doc                             postgis_sql_72_end.sql.in
examples                        postgis_sql_72_start.sql.in
jdbc                            postgis_sql_73_end.sql.in
loader                          postgis_sql_73_start.sql.in
postgis.h                       postgis_sql_common.sql.in
postgis_chip.c                  postgis_transform.c
postgis_debug.c                 regress
postgis_estimate.c              spatial_ref_sys.sql
postgis_fn.c
qwertzuiop# gmake
gcc -pipe -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=73  -c -o postgis_debug.o
postgis_debug.c
gcc -pipe -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=73  -c -o postgis_ops.o
postgis_ops.c
gcc -pipe -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=73  -c -o postgis_fn.o
postgis_fn.c
gcc -pipe -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=73  -c -o postgis_inout.o
postgis_inout.c
gcc -pipe -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=73  -c -o postgis_proj.o
postgis_proj.c
gcc -pipe -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=73  -c -o postgis_chip.o
postgis_chip.c
gcc -pipe -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=73  -c -o postgis_transform.o
postgis_transform.c
gcc -pipe -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=73  -c -o postgis_gist_72.o
postgis_gist_72.c
gcc -pipe -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=73  -c -o postgis_estimate.o
postgis_estimate.c
ar cr libpostgis.a `lorder postgis_debug.o postgis_ops.o postgis_fn.o
postgis_inout.o postgis_proj.o postgis_chip.o postgis_transform.o
postgis_gist_72.o postgis_estimate.o | tsort`
ranlib libpostgis.a
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPIC -sha
red -Wl,-x,-soname,libpostgis.so.0 postgis_debug.o postgis_ops.o
postgis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o
postgis_transform.o postgis_gist_72.o
postgis_estimate.o   -L/usr/local/lib -lproj -R/usr/local/pgsql/lib -o
libpostgis.so.0
rm -f libpostgis.so
ln -s libpostgis.so.0 libpostgis.so
cat postgis_sql_73_start.sql.in postgis_sql_common.sql.in
postgis_sql_73_end.sql.in | sed -e
's:@MODULE_FILENAME@:$libdir/libpostgis.so.0:g;s:@POSTGIS_VERSION@:0.7:g'  >
postgis.sql
perl create_undef.pl postgis.sql 73 > postgis_undef.sql
gmake -C loader
gmake[1]: Entering directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I../../../s
rc/interfaces/libpq -I../../../src/include  -DFRONTEND -DSYSCONFDIR='"/usr/l
ocal/pgsql/etc"'  -c -o shpopen.o shpopen.c
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I../../../s
rc/interfaces/libpq -I../../../src/include  -DFRONTEND -DSYSCONFDIR='"/usr/l
ocal/pgsql/etc"'  -c -o dbfopen.o dbfopen.c
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I../../../s
rc/interfaces/libpq -I../../../src/include  -DFRONTEND -DSYSCONFDIR='"/usr/l
ocal/pgsql/etc"'  -c -o getopt.o getopt.c
getopt.c:602: warning: no previous prototype for `getopt'
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I../../../s
rc/interfaces/libpq -I../../../src/include  -DFRONTEND -DSYSCONFDIR='"/usr/l
ocal/pgsql/etc"'  -c -o shp2pgsql.o shp2pgsql.c
shp2pgsql.c: In function `main':
shp2pgsql.c:453: warning: implicit declaration of function `getopt'
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations shpopen.o
dbfopen.o getopt.o
hp2pgsql.o -L../../../src/interfaces/libpq -lpq  -R/usr/local/pgsql/lib/cont
rib -lz -lreadline -lcrypt -lcompat -lm -lutil  -o shp2pgsql
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -I. -I../../../s
rc/interfaces/libpq -I../../../src/include  -DFRONTEND -DSYSCONFDIR='"/usr/l
ocal/pgsql/etc"'  -c -o pgsql2shp.o pgsql2shp.c
pgsql2shp.c: In function `main':
pgsql2shp.c:84: warning: implicit declaration of function `getopt'
gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations shpopen.o
dbfopen.o getopt.o
gsql2shp.o -L../../../src/interfaces/libpq -lpq  -R/usr/local/pgsql/lib/cont
rib -lz -lreadline -lcrypt -lcompat -lm -lutil  -o pgsql2shp
gmake[1]: Leaving directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'
qwertzuiop# gmake install
gmake -C loader
gmake[1]: Entering directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'
mkdir /usr/local/pgsql/doc
mkdir /usr/local/pgsql/doc/contrib
mkdir /usr/local/pgsql/share
mkdir /usr/local/pgsql/share/contrib
mkdir /usr/local/pgsql/lib
/bin/sh ../../config/install-sh -c -m 644  libpostgis.a
/usr/local/pgsql/lib/libpostgis.a
/bin/sh ../../config/install-sh -c -m 755  libpostgis.so.0
/usr/local/pgsql/lib/libpostgis.so.0
cd /usr/local/pgsql/lib && \
rm -f libpostgis.so && \
ln -s libpostgis.so.0 libpostgis.so
/bin/sh ../../config/install-sh -c -m 644 ./README.postgis
/usr/local/pgsql/doc/contrib
/bin/sh ../../config/install-sh -c -m 644 postgis.sql
/usr/local/pgsql/share/contrib
/bin/sh ../../config/install-sh -c -m 644 postgis_undef.sql
/usr/local/pgsql/share/contrib
/bin/sh ../../config/install-sh -c -m 644 spatial_ref_sys.sql
/usr/local/pgsql/share/contrib
/bin/sh ../../config/install-sh -c -m 644 README.postgis
/usr/local/pgsql/share/contrib
gmake -C loader install
gmake[1]: Entering directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'
/bin/sh ../../../config/install-sh -c  pgsql2shp
/usr/local/pgsql/bin/pgsql2shp
/bin/sh ../../../config/install-sh -c  shp2pgsql
/usr/local/pgsql/bin/shp2pgsql
gmake[1]: Leaving directory
`/root/postgresql/postgresql-7.3.2/contrib/postgis-0.7.4/loader'







-----Ursprüngliche Nachricht-----
Von: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]Im Auftrag von
Norman Vine
Gesendet: Montag, 24. März 2003 19:29
An: nhv at cape.com; PostGIS Users Discussion
Betreff: RE: [postgis-users] Building Postgres under FreeBSD 4.7




> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
> Norman Vine
> Sent: Monday, March 24, 2003 1:07 PM
> To: PostGIS Users Discussion
> Subject: RE: [postgis-users] Building Postgres under FreeBSD 4.7
>
>
> Benjamin Thelen
> >
> > 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?
>
> see
> http://www.cs.umass.edu/~verts/cs32/endian.html
>
> The following code will test your machine if the above is not sufficient
>
> HTH
>
> Norman

Lets try that again :-)

=== cut ====

#include <stdio.h>

int main(int argc, char **argv) {
    static const int _EndianTest = 1;
#define IsLittleEndian (*((char *) &_EndianTest ) != 0)
#define IsBigEndian    (*((char *) &_EndianTest ) == 0)

    if( IsLittleEndian )
        printf("LITTLE_ENDIAN\n");
    else if( IsBigEndian )
        printf("BIG_ENDIAN\n");
    else
        printf("Something is wrong\n");
}


_______________________________________________
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