From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 17 15:40:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D22EA1CC for ; Tue, 17 Sep 2013 15:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B238D2D11 for ; Tue, 17 Sep 2013 15:40:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HFe08x015579 for ; Tue, 17 Sep 2013 15:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8HFe01s015578; Tue, 17 Sep 2013 15:40:00 GMT (envelope-from gnats) Resent-Date: Tue, 17 Sep 2013 15:40:00 GMT Resent-Message-Id: <201309171540.r8HFe01s015578@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dennis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D2722FAA for ; Tue, 17 Sep 2013 15:34:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5C222CCA for ; Tue, 17 Sep 2013 15:34:36 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8HFYZfB059250 for ; Tue, 17 Sep 2013 15:34:35 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8HFYZbh059244; Tue, 17 Sep 2013 15:34:35 GMT (envelope-from nobody) Message-Id: <201309171534.r8HFYZbh059244@oldred.freebsd.org> Date: Tue, 17 Sep 2013 15:34:35 GMT From: Dennis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/182190: postgresql93-client not installing library needed for extensions X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 15:40:01 -0000 >Number: 182190 >Category: ports >Synopsis: postgresql93-client not installing library needed for extensions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 17 15:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Dennis >Release: 9.2-RC3 >Organization: >Environment: FreeBSD [redacted] 9.2-RC3-p1 FreeBSD 9.2-RC3-p1 #0: Mon Sep 9 19:37:31 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: 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) >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) >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 >Release-Note: >Audit-Trail: >Unformatted: