[postgis-tickets] [PostGIS] #2151: LDFLAGS from rpm spec file is overwritten when creating the postgis-2.0.so

PostGIS trac at osgeo.org
Fri Dec 14 11:38:26 PST 2012


#2151: LDFLAGS from rpm spec file is overwritten when creating the postgis-2.0.so
---------------------+------------------------------------------------------
 Reporter:  xchinu   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.3
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 Issue:
 I have postgresql-devel-9.2.2 package installed before I try to create an
 RPM package for the postgis-2.0.2; I updated the postgis-2.0.2 rpm spec
 file with an LDFLAGS that has -Wl,-rpath set to libgoes_c.so.1 and
 libjosn.so.0 amongst few others. But the postgis-2.0.so created does not
 have the RPATH.

 Analysis:
 During the rpm build process the postgis/Makefile is including:
 /lib/pgsql/pgxs/src/makefiles/pgxs.mk which in turn includes:

 /lib/pgsql/pgxs/src/Makefile.global and
 /lib/pgsql/pgxs/src/Makefile.shlib and
 /lib/pgsql/pgxs/src/Makefile.port


 lib/pgsql/pgxs/src/Makefile.global is the one which is overriding LDFLAGS
 with the following snippets:

 225 ifdef PGXS
 226   LDFLAGS = -L$(libdir)
 227 else
 228   LDFLAGS = -L$(top_builddir)/src/port
 229 endif
 230 LDFLAGS += -L... # all library locations required for postgresql build
 and it DOES NOT include geos or json.
 ….
 351 rpathdir = $(libdir)
 352
 353 ifeq ($(enable_rpath), yes)
 354 LDFLAGS += $(rpath)
 355 endif

 Probably the postgresql-9.2.2 needs a patch to fix not overriding LDFLAGS.
 But postgresql build process appends the LDFLAGS present in the postgresql
 spec file and works fine.

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