[postgis-tickets] [PostGIS] #4606: libproj gets linked from /usr/lib when /usr/local/lib install exists

PostGIS trac at osgeo.org
Wed Dec 18 05:38:29 PST 2019


#4606: libproj gets linked from /usr/lib when /usr/local/lib install exists
-----------------------------------+---------------------------
 Reporter:  strk                   |      Owner:  strk
     Type:  defect                 |     Status:  new
 Priority:  medium                 |  Milestone:  PostGIS 3.0.1
Component:  build/upgrade/install  |    Version:  master
 Keywords:                         |
-----------------------------------+---------------------------
 I've been chasing this today and found out the culprit being an LDFLAGS
 variable set by the Makefile.global file (as included by pgxs.mk) to
 contain a {{{ -L }}} switch pointing to a system directory.

 GCC scans directories in the expected order /usr/local/lib first, then
 /usr/lib unless an explicit -L is given to point to /usr/lib.

 This is what is happening: PostgreSQL PGXS machinery is forcing the system
 lib first.

 This misbehavior can affect any other library for which you have multiple
 installs with the same library filename.

 Luckly it can be fixed by re-defining LDFLAGS, which in this case is
 *missing* in postgis/Makefile.in

 Setting LDFLAGS ourselves fixes this issue.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4606>
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