Postgis 1.4RC1 compile error

View: New views
4 Messages — Rating Filter:   Alert me  

Postgis 1.4RC1 compile error

by Stefano Bonnin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can't compile postgis 1.4rc1, when I try to compile it I receve an error.

OS: FreeBSD 5.3
Postgresql: 8.4
GEOS: 3.1.1

My compilation command is:

./configure --with-pgconfig=/usr/local/postgresql/8.4/bin/pg_config
--with-geosconfig=/usr/local/bin/geos-config  --with-projdir=/usr/local
gmake
gmake install


Configure result is:

  PostGIS is now configured for i386-unknown-freebsd5.3

 -------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  C++ compiler:         g++ -g -O2

 -------------- Dependencies --------------
  GEOS config:          /usr/local/bin/geos-config
  GEOS version:         3.1
  PostgreSQL config:    /usr/local/postgresql/8.4/bin/pg_config
  PostgreSQL version:   8.4
  PROJ4 version:        46
  PostGIS debug level:  0

 -------- Documentation Generation --------
  xsltproc:             /usr/local/bin/xsltproc
  xsl style sheets:
  dblatex:
  convert:


The error is ....

---------------------------------------------------------------
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o lwgeom_geojson.o
lwgeom_geojson.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o lwgeom_triggers.o
lwgeom_triggers.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o lwgeom_dump.o
lwgeom_dump.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o
lwgeom_functions_lrs.o lwgeom_functions_lrs.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o long_xact.o long_xact.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o lwgeom_sqlmm.o
lwgeom_sqlmm.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -I/usr/local/include -I/usr/local/include
-I../liblwgeom -I. -I/usr/local/postgresql/8.4/include/server
-I/usr/local/postgresql/8.4/include/internal   -c -o lwgeom_rtree.o
lwgeom_rtree.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -fPIC -DPIC -shared  lwgeom_pg.o lwgeom_debug.o lwgeom_accum.o
lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o
lwgeom_inout.o lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o
lwgeom_btree.o lwgeom_transform.o lwgeom_box.o lwgeom_box3d.o
lwgeom_box2dfloat4.o lwgeom_chip.o lwgeom_geos.o lwgeom_geos_prepared.o
lwgeom_svg.o lwgeom_gml.o lwgeom_kml.o lwgeom_geojson.o
lwgeom_triggers.o lwgeom_dump.o lwgeom_functions_lrs.o long_xact.o
lwgeom_sqlmm.o lwgeom_rtree.o  -L/usr/local/lib -L/usr/local/lib
-L/usr/local/postgresql/8.4/lib -lgeos_c -lproj ../liblwgeom/liblwgeom.a
-Wl,-R'/usr/local/postgresql/8.4/lib' -o postgis-1.4.so
gmake[1]: Leaving directory `/usr/src/smit/postgis-1.4.0rc1/postgis'
gmake -C loader
gmake[1]: Entering directory `/usr/src/smit/postgis-1.4.0rc1/loader'
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes   -c -o shpopen.o
shpopen.c
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes   -c -o dbfopen.o
dbfopen.c
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes   -c -o getopt.o
getopt.c
getopt.c:618: warning: no previous prototype for 'pgis_getopt'
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes   -c -o shp2pgsql.o
shp2pgsql.c
shp2pgsql.c: In function `ParseCmdline':
shp2pgsql.c:1366: warning: implicit declaration of function `pgis_getopt'
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes shpopen.o dbfopen.o
getopt.o shp2pgsql.o ../liblwgeom/liblwgeom.a  -lm -o shp2pgsql
../liblwgeom/liblwgeom.a(vsprintf.o)(.text+0x1c): In function
`lw_vasprintf':
/usr/src/smit/postgis-1.4.0rc1/liblwgeom/vsprintf.c:150: undefined
reference to `__va_copy'
gmake[1]: *** [shp2pgsql] Error 1
gmake[1]: Leaving directory `/usr/src/smit/postgis-1.4.0rc1/loader'
gmake: *** [loaderdumper] Error 2
gmake -C liblwgeom
gmake[1]: Entering directory `/usr/src/smit/postgis-1.4.0rc1/liblwgeom'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/src/smit/postgis-1.4.0rc1/liblwgeom'
gmake -C postgis
gmake[1]: Entering directory `/usr/src/smit/postgis-1.4.0rc1/postgis'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/src/smit/postgis-1.4.0rc1/postgis'
gmake -C loader
gmake[1]: Entering directory `/usr/src/smit/postgis-1.4.0rc1/loader'
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes shpopen.o dbfopen.o
getopt.o shp2pgsql.o ../liblwgeom/liblwgeom.a  -lm -o shp2pgsql
../liblwgeom/liblwgeom.a(vsprintf.o)(.text+0x1c): In function
`lw_vasprintf':
/usr/src/smit/postgis-1.4.0rc1/liblwgeom/vsprintf.c:150: undefined
reference to `__va_copy'
gmake[1]: *** [shp2pgsql] Error 1
gmake[1]: Leaving directory `/usr/src/smit/postgis-1.4.0rc1/loader'
gmake: *** [loaderdumper] Error 2
----------------------------------------------------------------------------

Thanks in advance.

--
Stefano Bonnin
Comai Torino S.r.l
Via Livorno 60, 10144 TORINO
Italia

http://www.comai.to

_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel

Re: Postgis 1.4RC1 compile error

by Mark Cave-Ayland-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stefano Bonnin wrote:

> I can't compile postgis 1.4rc1, when I try to compile it I receve an error.
>
> OS: FreeBSD 5.3
> Postgresql: 8.4
> GEOS: 3.1.1
>
> My compilation command is:
>
> ./configure --with-pgconfig=/usr/local/postgresql/8.4/bin/pg_config
> --with-geosconfig=/usr/local/bin/geos-config  --with-projdir=/usr/local
> gmake
> gmake install
(lots cut)

Thanks for the bug report. It looks as if __va_copy() is not necessarily
present on non-GNU systems. Can you test with the following patch?


Many thanks,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Index: liblwgeom/vsprintf.c
===================================================================
--- liblwgeom/vsprintf.c (revision 4256)
+++ liblwgeom/vsprintf.c (working copy)
@@ -36,6 +36,14 @@
 int global_total_width;
 #endif
 
+/* Make sure we have a va_copy that will work on all platforms */
+#ifndef va_copy
+# ifdef __va_copy
+#  define va_copy(d, s)         __va_copy((d), (s))
+# else
+#  define va_copy(d, s)         memcpy(&(d), &(s), sizeof(va_list))
+# endif
+#endif
 
 int lw_vasprintf (char **result, const char *format, va_list args);
 int lw_asprintf
@@ -146,8 +154,7 @@
 {
  va_list temp;
 
- /* Use va_copy for compatibility with both 32 and 64 bit args */
- __va_copy(temp, args);
+ va_copy(temp, args);
 
  return int_vasprintf (result, format, &temp);
 }

_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel

Re: Postgis 1.4RC1 compile error

by stefano bonnin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

thnks for the patch .. it works!

2009/7/3 Mark Cave-Ayland <mark.cave-ayland@...>
Stefano Bonnin wrote:

I can't compile postgis 1.4rc1, when I try to compile it I receve an error.

OS: FreeBSD 5.3
Postgresql: 8.4
GEOS: 3.1.1

My compilation command is:

./configure --with-pgconfig=/usr/local/postgresql/8.4/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config  --with-projdir=/usr/local
gmake
gmake install

(lots cut)

Thanks for the bug report. It looks as if __va_copy() is not necessarily present on non-GNU systems. Can you test with the following patch?


Many thanks,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel



_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel

Re: Postgis 1.4RC1 compile error

by Mark Cave-Ayland-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

stefano bonnin wrote:

> thnks for the patch .. it works!

Excellent. Can we have a Mac/Windows/Solaris on 1.4RC1 with this patch
applied to make sure it doesn't break any of these platforms?


Many thanks,

M-D.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
_______________________________________________
postgis-devel mailing list
postgis-devel@...
http://postgis.refractions.net/mailman/listinfo/postgis-devel