[postgis-tickets] [PostGIS] #2393: segmentation fault during regress tests on Solaris 10 x64
PostGIS
trac at osgeo.org
Wed Nov 6 12:15:37 PST 2013
#2393: segmentation fault during regress tests on Solaris 10 x64
--------------------------------------+-------------------------------------
Reporter: edechaux | Owner: pramsey
Type: defect | Status: new
Priority: critical | Milestone: PostGIS 2.0.5
Component: postgis | Version: 2.0.x
Keywords: solaris segfault regress |
--------------------------------------+-------------------------------------
Comment(by edechaux):
With some help from [http://www.oslandia.com/ oslandia] we were able to
identify the root cause and build a working postgis 2.1 on solaris 11 x64.
It is a stack unwinding issue. On solaris, two incompatible mecanism
exists, one in libgcc_s, the other one in libc. More info
[https://forums.oracle.com/thread/2193106 here]
When building on solaris with gcc, precaution must be taken to ensure
libgcc_s is dynamically loaded before libc. This was simply achieved by
specifing '''-lgcc_s''' at the begining of the '''LDFLAG''' parameter :
{{{
configure: using LDFLAGS=-m64 -lgcc_s -I/usr/include/kerberosv5
-I/usr/jdk/latest/include -I/usr/jdk/latest/include/solaris
-I/usr/include/ncurses -I/usr/include/pcre
-Wl,-rpath,'$$ORIGIN'/../lib:'$$ORIGIN'/../../lib:${LIBDIR}
}}}
The result is, for instance :
{{{
edechaux at s11postgis:/opt/stig/idicsi_2.0/lib/postgresql$ ldd
postgis-2.1.so
libgcc_s.so.1 => /usr/lib/64/libgcc_s.so.1
libgeos_c.so.1 =>
/opt/stig/idicsi_2.0/lib/postgresql/../../lib/libgeos_c.so.1
libproj.so.0 =>
/opt/stig/idicsi_2.0/lib/postgresql/../../lib/libproj.so.0
libjson.so.0 => /usr/lib/64/libjson.so.0
libxml2.so.2 => /lib/64/libxml2.so.2
libc.so.1 => /lib/64/libc.so.1
libgeos-3.4.2.so => /opt/stig/idicsi_2.0/lib/libgeos-3.4.2.so
libstdc++.so.6 => /usr/lib/64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
libpthread.so.1 => /lib/64/libpthread.so.1
libz.so.1 => /lib/64/libz.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1
libcryptoutil.so.1 => /lib/64/libcryptoutil.so.1
}}}
It is also important the software stack (postgres, proj, geos and gdal) is
also built with the same parameter.
I am in the process in documenting everything as it there is other lesser
complex thing to fix.
PS: We have switched from Solaris 10 to Solaris 11, so I cannot say it
also works for it.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2393#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list