When postgresql is installed with default flags pg_config --libs output shows that it is installed with pgport and pgcommand libraries available: gawriloff@albatros2 ~/google-code/barzog-gentoo-overlay/net-dns/dnsperf $ pg_config --libs -lpgport -lpgcommon -lpam -lssl -lcrypto -lz -lreadline -lcrypt -ldl -lm But those only available when postgresql is installed with 'static-libs' use flags and any software that depends on pgxs fails, because it cannot find those. Reproducible: Always
Can you please provide some more information? Which version did you test this on? Is it from the official tree or an overlay? Please also provide your emerge --info dev-db/postgresql.
I tried version 9.3.10-r1 from official overlay. gawriloff@falcon-cl1 ~ $ pg_config --libs -lpgport -lpgcommon -lpam -lssl -lcrypto -lz -lreadline -lcrypt -ldl -lm gawriloff@falcon-cl1 ~ $ emerge --info dev-db/postgresql Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.21-r1, 3.14.58 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.14.58-x86_64-Intel-R-_Xeon-R-_CPU_E5-2630_v2_@_2.60GHz-with-gentoo-2.2 KiB Mem: 65901032 total, 437956 free KiB Swap: 4016240 total, 4012352 free Timestamp of repository gentoo: Sun, 10 Jan 2016 22:30:01 +0000 sh bash 4.3_p42-r1 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 distcc 3.2rc1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.9 [enabled] app-shells/bash: 4.3_p42-r1::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10-r1::gentoo dev-util/ccache: 3.1.9-r4::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.18.4::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://falcon-cl4.telecom.by/gentoo-portage priority: -1000 swegener location: /var/lib/layman/swegener masters: gentoo priority: 0 barzog-overlay location: /var/lib/layman/barzog-overlay masters: gentoo priority: 1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=core2" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-j2 --load-average=4" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://falcon-cl4.telecom.by:8080/admin/gentoo/" LANG="ru_RU.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv mmx mmxext modules multilib ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= dev-db/postgresql-9.3.10-r1::gentoo was built with the following: USE="nls pam readline ssl zlib -doc -kerberos -ldap (-libressl) -perl -pg_legacytimestamp -python (-selinux) -server -static-libs -tcl -threads -uuid -xml" ABI_X86="64" LINGUAS="en ru -af -cs -de -es -fa -fr -hr -hu -it -ko -nb -pl -pt_BR -ro -sk -sl -sv -tr -zh_CN -zh_TW" PYTHON_SINGLE_TARGET="python2_7 -python3_4" PYTHON_TARGETS="python2_7 -python3_4"
Which programs are failing to build/start?
For example pg_statinfo http://pgfoundry.org/projects/pgstatsinfo (which is available from barzog-overlay). But I assume that any program that use PGXS will fail.
This issue is still existent through all postgresql versions
In addition, the pgxs Makefile.global contains: ``` # This macro is for use by client executables (not libraries) that use libpq. # We force clients to pull symbols from the non-shared libraries libpgport # and libpgcommon rather than pulling some libpgport symbols from libpq just # because libpq uses those functions too. This makes applications less # dependent on changes in libpq's usage of pgport. To do this we link to # pgport before libpq. This does cause duplicate -lpgport's to appear # on client link lines. ifdef PGXS libpq_pgport = -L$(libdir) -lpgcommon -lpgport $(libpq) else libpq_pgport = -L$(top_builddir)/src/common -lpgcommon -L$(top_builddir)/src/port -lpgport $(libpq) endif # Cygwin seems to need ldap libraries to be mentioned here, too ifeq ($(PORTNAME),cygwin) libpq_pgport += $(LDAP_LIBS_FE) endif ``` Either, the libpgcommon.a and libpgport.a files should not be removed if the package is build without static-libs OR there should be a more detailed description for this useflag in the metadata.xml
Sorry it took so long to get around to this. We could change `find "${ED}" -name '*.a' -delete` to: find "${ED}" -name '*.a' ! -name 'libpgport.a' ! -name 'libpgcommon.a' -delete Will that work?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edcac752028d3a882dbc2f64e37e1e95dff21276 commit edcac752028d3a882dbc2f64e37e1e95dff21276 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2019-06-03 10:23:37 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2019-06-03 10:25:01 +0000 dev-db/postgresql: Multiple Fixes/Improvements Bump to EAPI 7. Use ver-cut instead of versionator. Preserve libpg{port,common}.a as they're needed by some PGXS builds. Add Python 3.7 support. Thanks to Jeff Kowalczyk for verifying. Allow ICU collations via icu USE flag. Add debug use flag to allow debugging of extensions. Bug: https://bugs.gentoo.org/671114 Bug: https://bugs.gentoo.org/571046 Bug: https://bugs.gentoo.org/685536 Package-Manager: Portage-2.3.62, Repoman-2.3.11 Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org> dev-db/postgresql/postgresql-10.8-r1.ebuild | 466 ++++++++++++++++++++++ dev-db/postgresql/postgresql-11.3-r1.ebuild | 468 ++++++++++++++++++++++ dev-db/postgresql/postgresql-12_beta1-r1.ebuild | 468 ++++++++++++++++++++++ dev-db/postgresql/postgresql-9.4.22-r1.ebuild | 480 +++++++++++++++++++++++ dev-db/postgresql/postgresql-9.5.17-r1.ebuild | 486 +++++++++++++++++++++++ dev-db/postgresql/postgresql-9.6.13-r1.ebuild | 491 ++++++++++++++++++++++++ dev-db/postgresql/postgresql-9999.ebuild | 20 +- 7 files changed, 2873 insertions(+), 6 deletions(-)