[1.7] problems with compiling geos

kiorky kiorky@cryptelium.net
Wed Dec 9 11:51:00 GMT 2009


Always on my cygwin trip, i'm trying now to compile geos ([1]) on cygwin.
The compilation pass flawlessly but i can't execute anything using the produced dll.

I have other C++ based dependencies that are not known to have problems, so i
think that it is not a compiler or environment problem.

I am not an expert in C++ but it seems it can't even reach the main function.
It stops during loading the 'cyggeos-3-2-0.dll'.

The first gdb shot gave me that:
$ libtool --mode=execute gdb ./geos_unit.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...

(gdb)
(gdb) run
Starting program:
/cygdrive/e/minitage2/django/cchb-win/geos-3.2.0rc3/tests/unit/.libs/geos_unit
[New thread 3712.0xd68]
[New thread 3712.0x7b4]
[New thread 3712.0xd90]
[New thread 3712.0xd50]
[New thread 3712.0xee0]

Program received signal SIGSEGV, Segmentation fault.
0x6c4e8010 in ?? ()
(gdb) bt
#0  0x6c4e8010 in ?? ()
#1  0x7119a9b7 in GeometryFactory (this=0x712b0248) at GeometryFactory.cpp:74
#2  0x7119aa4b in geos::geom::GeometryFactory::getDefaultInstance () at
GeometryFactory.cpp:694
#3  0x71194223 in __static_initialization_and_destruction_0 (__initialize_p=1,
__priority=65535) at Geometry.cpp:106
#4  0x71194287 in global constructors keyed to _ZN4geos4geom11geosversionEv ()
at Geometry.cpp:834
#5  0x610203c3 in per_module::run_ctors () from /usr/bin/cygwin1.dll
#6  0x01c70553 in ?? ()
#7  0x610204b0 in dll::init () from /usr/bin/cygwin1.dll
#8  0x00000000 in ?? ()
(gdb)


And running step by step, i found the segfault here :
(gdb)
0x004d87ee in cygstdc++-6!__cxa_guard_acquire () from /usr/bin/cygstdc++-6.dll
(gdb)
0x6bb5bf10 in _fu1288___ZSt4cout () at GeometryFactory.cpp:695
695             static GeometryFactory defInstance;
(gdb)
0x6bb5bf12      695             static GeometryFactory defInstance;
(gdb)
0x6bb5bf14      695             static GeometryFactory defInstance;
(gdb)
0x6bb5bf1b      695             static GeometryFactory defInstance;
(gdb)
GeometryFactory (this=0x6bc32258) at GeometryFactory.cpp:70
70      GeometryFactory::GeometryFactory()
(gdb)
0x6bb5bbf1      70      GeometryFactory::GeometryFactory()
(gdb)
0x6bb5bbf3      70      GeometryFactory::GeometryFactory()
(gdb)
0x6bb5bbf4      70      GeometryFactory::GeometryFactory()
(gdb)
0x6bb5bbf5      70      GeometryFactory::GeometryFactory()
(gdb)
0x6bb5bbf6      70      GeometryFactory::GeometryFactory()
(gdb)
74              coordinateListFactory(CoordinateArraySequenceFactory::instance())
(gdb)
0x6bb5bbff      74
coordinateListFactory(CoordinateArraySequenceFactory::instance())
(gdb)
0x6bb5bc05      74
coordinateListFactory(CoordinateArraySequenceFactory::instance())
(gdb)
0x6bb5bc0c      74
coordinateListFactory(CoordinateArraySequenceFactory::instance())
(gdb)
0x6bbd6f78 in __wrap__Znwj () from
/cygdrive/e/minitage2/django/cchb-win/geos-trunk/tests/bigtest/cyggeos-3-2-0.dll
(gdb)
0x6106be70 in __wrap__Znwj () from /usr/bin/cygwin1.dll
(gdb)
0x6106be75 in __wrap__Znwj () from /usr/bin/cygwin1.dll
(gdb)
0x6106be77 in __wrap__Znwj () from /usr/bin/cygwin1.dll
(gdb)
0x6c4e8010 in ?? ()
(gdb)
0x6c4e8012 in ?? ()
(gdb)
0x6c4e8013 in ?? ()
(gdb)
0x6c4e8014 in ?? ()
(gdb)
0x6c4e8016 in ?? ()
(gdb)

Program received signal SIGSEGV, Segmentation fault.








What is this "__wrap__Znwj" and how can it mess the environment leading to a
segfault ?

Sources for geos can be read online here:
http://trac.osgeo.org/geos/browser/trunk/

My program seems to encouter the bug here:
http://trac.osgeo.org/geos/browser/trunk/source/geom/GeometryFactory.cpp#L106


[1] - http://trac.osgeo.org/geos/
-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091209/84c1025e/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091209/84c1025e/attachment.sig>


More information about the Cygwin mailing list