[postgis-devel] Problem compiling with MinGW from SVN
nicklas.aven at jordogskog.no
nicklas.aven at jordogskog.no
Sun Jul 5 03:35:25 PDT 2009
Hallo
I tried to compile from SVN wich has worked great before. I think the problem is strtok_r() used in lwgeom_geos, that is supposed to be found in string.h as I understand it. In my version in MinGW there is no strtok_r() in string.h, but strtok(). Is it a problem of versions or?
the error message is as follows when running make, starting with a warning.
lwgeom_geos.c: In function `buffer':
lwgeom_geos.c:891: warning: implicit declaration of function `strtok_r'
lwgeom_geos.c:891: warning: assignment makes pointer from integer without a cast
lwgeom_geos.c:895: warning: assignment makes pointer from integer without a cast
lwgeom_geos.c:900: warning: assignment makes pointer from integer without a cast
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_geos_prepared.o lwgeom_geos_prepared.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_svg.o lwgeom_svg.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_gml.o lwgeom_gml.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_kml.o lwgeom_kml.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_geojson.o lwgeom_geojson.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_triggers.o lwgeom_triggers.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_dump.o lwgeom_dump.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -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 -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o long_xact.o long_xact.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_sqlmm.o lwgeom_sqlmm.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I/c/pg84/include -I/c/proj/include -I../liblwgeom -I. -Ic:/pg84/include/POSTGR~1/server -Ic:/pg84/include/POSTGR~1/internal -I./src/include/port/win32 -DEXEC_BACKEND "-Ic:/pg84/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../src/include/port/win32" -Ic:/pg84/include/POSTGR~1/server/port/win32 -c -o lwgeom_rtree.o lwgeom_rtree.c
dlltool --export-all --output-def libpostgis-1.5dll.def 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
dllwrap -o postgis-1.5.dll --dllname postgis-1.5.dll --def libpostgis-1.5dll.def 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 -Lc:/pg84/lib -lpostgres -L/c/pg84/lib -L/c/proj/lib -Lc:/pg84/lib -lgeos_c -lproj ../liblwgeom/liblwgeom.a
lwgeom_geos.o:lwgeom_geos.c:(.text+0x3624): undefined reference to `strtok_r'
lwgeom_geos.o:lwgeom_geos.c:(.text+0x3644): undefined reference to `strtok_r'
lwgeom_geos.o:lwgeom_geos.c:(.text+0x3667): undefined reference to `strtok_r'
collect2: ld returned 1 exit status
c:\mingw\bin\dllwrap.exe: c:\mingw\bin\gcc exited with status 1
make[1]: *** [postgis-1.5.dll] Error 1
make[1]: Leaving directory `/c/thesrc/pg15/postgis'
make: *** [postgis] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090705/8b9b0c0e/attachment.html>
More information about the postgis-devel
mailing list