#6860 closed enhancement (fixed)
libgdal.so exposes symbols from libshapefile
Reported by: | pnicolas | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.2.0 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
In our Linux application we use both gdal and shapelib, compiled as a shared library (.so).
Gdal internally uses shapelib as well and exposes the symbols. If we do not pay attention to the order of parameters in the linking phase, functions like SHPOpen will link to libgdal.so instead of libshp.so.
This can be solved by adding -fvisibility=hidden to CPPFLAGS in ogr/ogrsf_frmts/shape/GNUmakefile
without fsivility flag: global symbol
nm gdal.so | grep 'SHPOpen$' 0000000000bb82af T SHPOpen
with fsivility flag: local symbol
nm gdal.so | grep 'SHPOpen$' 0000000000bb3cd3 t SHPOpen
Change History (3)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 7 years ago
Milestone: | → 2.2.0 |
---|
Note:
See TracTickets
for help on using tickets.
In 37996: