[postgis-tickets] [PostGIS] #3281: Avoid exporting symbols in the postgresql module
PostGIS
trac at osgeo.org
Wed Sep 23 00:33:57 PDT 2015
#3281: Avoid exporting symbols in the postgresql module
------------------------------------+---------------------------
Reporter: strk | Owner: strk
Type: enhancement | Status: closed
Priority: medium | Milestone: PostGIS 2.2.0
Component: build/upgrade/install | Version: trunk
Resolution: fixed | Keywords:
------------------------------------+---------------------------
Comment (by strk):
For the record, I went deep to find the actual problem and here's the
result:
{{{
[lwin_wkb.c:lwpoint_from_wkb_state:418] calling lwpoint_construct
lwpoint_construct from PostGIS 1.5 here
}}}
Basically a "lwpoint_from_wkb_state" function from liblwgeom-2.2.0
(dynamically linked) ends up calling "lwpoint_construct" not from itself,
but from the liblwgeom version statically linked in the PostGIS-1.5 module
loaded by the same PostgreSQL backend process loading the module which
dynalinks to liblwgeom-2.2.0.
This is probably due to the fact that the "lwpoint_construct" symbol was
resolved before the dynalinking module was even loaded, so it was found in
the process at the time of lookup.
In turn, this explains why _omitting_ to export the statically-linked
symbols from PostGIS-1.5 fixes the issue.
Statically linking liblwgeom in the new module also fixes the issue
because there's no runtime linking involved in calling all those functions
(I think).
These findings may be of interest for @darkblue_b
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3281#comment:6>
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