Postgresql 9.3.0 installs a library /usr/local/lib/libpgcommon.a, however this library is not installed by the relevant FreeBSD port. This library is needed and expected when building extensions which are not built as part of the core, ie using pg_config. FreeBSD ports split postgresql into 3 ports (server, client, contrib), each building and installing a subset of postgresql. libpgcommon.a should be installed in the system by either the -server or -client port. (I don't think -contrib is the right dependency for building external modules. Based on the naming conventions of other installed pgsql libraries, my preference is for postgresql93-client) Fix: To add to postgresql93-client: 1) Add "src/common" to the BUILD_DIRS in postgresql93-client/Makefile 2) Add "lib/libpgcommon.a" to postgresql93-server/pkg-plist-client To add to postgresql93-server: 1) Add "src/common" to the BUILD_DIRS. Note that postgresql93-server/Makefile simply includes this from postgresql92-server/Makefile (I don't know if 9.2 also has the src/common folder, so it might need to be added explicitly) 2) Add "lib/libpgcommon.a" to postgresql93-server/pkg-plist-server How-To-Repeat: Install postgresql93-server, postgresql93-client, and postgresql93-server, and gmake. Create a Makefile: ----------- PGFILEDESC = "test" PROGRAM = test OBJS = test.o PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) ----------- "touch test.c" run "gmake". result: /usr/bin/ld: cannot find -lpgcommon (Expected is of course: rt1.c:(.text+0x9d): undefined reference to `main', which is what you would get if libpgcommon.a existed) (This is the boilerplate for a postgresql extension)
Responsible Changed From-To: freebsd-ports-bugs->pgsql Over to maintainer (via the GNATS Auto Assign Tool)
Author: girgen Date: Wed Sep 18 08:56:50 2013 New Revision: 327537 URL: http://svnweb.freebsd.org/changeset/ports/327537 Log: Install libpgcommon.a, required by extensions. PR: ports/182190 Modified: head/databases/postgresql93-client/Makefile head/databases/postgresql93-server/Makefile head/databases/postgresql93-server/pkg-plist-server Modified: head/databases/postgresql93-client/Makefile ============================================================================== --- head/databases/postgresql93-client/Makefile Wed Sep 18 08:44:21 2013 (r327536) +++ head/databases/postgresql93-client/Makefile Wed Sep 18 08:56:50 2013 (r327537) @@ -5,6 +5,7 @@ # See Mk/bsd.databases.mk for more info PORTNAME= postgresql +PORTREVISION= 0 PKGNAMESUFFIX= -client COMMENT= PostgreSQL database (client) Modified: head/databases/postgresql93-server/Makefile ============================================================================== --- head/databases/postgresql93-server/Makefile Wed Sep 18 08:44:21 2013 (r327536) +++ head/databases/postgresql93-server/Makefile Wed Sep 18 08:56:50 2013 (r327537) @@ -6,7 +6,7 @@ # DISTVERSION?= 9.3.0 -PORTREVISION?= 0 +PORTREVISION?= 1 PKGNAMESUFFIX?= -server MAINTAINER?= pgsql@FreeBSD.org @@ -25,4 +25,11 @@ MAN7= ALTER_COLLATION.7 ALTER_EVENT_TRI .endif +INSTALL_DIRS?= src/common src/timezone src/backend \ + src/backend/utils/mb/conversion_procs \ + src/backend/snowball src/backend/replication/libpqwalreceiver \ + src/bin/initdb src/bin/pg_ctl \ + src/bin/pg_controldata src/bin/pg_resetxlog src/pl \ + src/bin/pg_basebackup + .include "${.CURDIR}/../postgresql92-server/Makefile" Modified: head/databases/postgresql93-server/pkg-plist-server ============================================================================== --- head/databases/postgresql93-server/pkg-plist-server Wed Sep 18 08:44:21 2013 (r327536) +++ head/databases/postgresql93-server/pkg-plist-server Wed Sep 18 08:56:50 2013 (r327537) @@ -37,6 +37,7 @@ lib/postgresql/utf8_and_sjis.so lib/postgresql/utf8_and_sjis2004.so lib/postgresql/utf8_and_uhc.so lib/postgresql/utf8_and_win.so +lib/libpgcommon.a %%DOCSDIR%%/README-server @dirrmtry %%DOCSDIR%% share/postgresql/conversion_create.sql _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Commtited. Thanks!