Opened 12 years ago

Closed 11 years ago

#2151 closed defect (wontfix)

LDFLAGS from rpm spec file is overwritten when creating the postgis-2.0.so

Reported by: xchinu Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.4
Component: postgis Version: 2.0.x
Keywords: Cc: xchinu@…

Description

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.

Change History (1)

comment:1 by pramsey, 11 years ago

Resolution: wontfix
Status: newclosed

I'm not seeing this as a postgis problem.

Note: See TracTickets for help on using tickets.