Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538042 - dev-libs/cyrus-sasl-2.1.26-r11[postgres] fails to detect PostgreSQL library
Summary: dev-libs/cyrus-sasl-2.1.26-r11[postgres] fails to detect PostgreSQL library
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
: 629546 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-28 13:24 UTC by Guido Winkelmann
Modified: 2018-11-16 20:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for configure.in to build cyrus-sasl with pgsql module (cyrus-sasl-2.1.26-configure-pgsql.patch,926 bytes, patch)
2015-03-07 23:50 UTC, Anton J. Garnik
Details | Diff
Patch (cyrus-sasl.patch,1.17 KB, patch)
2018-11-10 22:51 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Winkelmann 2015-01-28 13:24:55 UTC
After upgrading cyrus-sasl to dev-libs/cyrus-sasl-2.1.26-r3, authentication against a postgresql database is broken. When attempting to do such an authentication, the following lines appear in the log:

Jan 28 13:38:05 blish imap[1872]: SQL engine 'pgsql' not supported

This bug looks superficially similar to https://bugs.gentoo.org/show_bug.cgi?id=519646 except for PostgreSQL, not MySQL.

Rebuilding postgresql with USE="static-libs", then rebuild cyrus-sasl works as a workaround.

# emerge --info "=dev-libs/cyrus-sasl-2.1.26-r9"
Portage 2.2.14 (python 2.7.9-final-0, default/linux/sparc/13.0, gcc-4.8.3, glibc-2.19-r1, 3.5.7-gentoo sparc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.5.7-gentoo-sparc64-sun4u-with-gentoo-2.2
KiB Mem:     4153824 total,   1740528 free
KiB Swap:    4194296 total,   4194296 free
Timestamp of tree: Wed, 28 Jan 2015 12:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="sparc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.tiscali.nl/pub/mirror/gentoo/ http://gentoo.tiscali.nl/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="acl apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype curl curlwrappers cxx ddate dlz dri fortran gcc64 gd gdbm git iconv imap iproute2 ipv6 json kolab ldap lzma modules ncurses nls nptl openmp pam pcre perl postgres python readline sasl session sieve sparc ssl subversion svnserve tcpd unicode xml zip zlib" 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" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga r128 radeon sunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-libs/cyrus-sasl-2.1.26-r9 was built with the following:
USE="berkdb gdbm pam postgres ssl -authdaemond (-java) -kerberos -ldapdb -mysql -openldap -sample -sqlite -srp -static-libs -urandom"
CFLAGS="-O2 -mcpu=ultrasparc -pipe -fno-strict-aliasing"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe -fno-strict-aliasing"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-28 13:51:08 UTC
How about the intermittent revisions -r4..8?
Comment 2 Guido Winkelmann 2015-01-28 20:05:23 UTC
(In reply to Jeroen Roovers from comment #1)
> How about the intermittent revisions -r4..8?

Didn't try them.
Comment 3 Anton J. Garnik 2015-03-07 23:50:22 UTC
Created attachment 398354 [details, diff]
patch for configure.in to build cyrus-sasl with pgsql module

in the original configure script, it tries to search in /usr/lib/pgsql, but newer ebuilds of postgresql (9.4.1 in my case) installs into /usr/lib/postgresql-{VER}, with a symlink /usr/lib/postgresql -> /usr/lib/postgresql-{VER}/lib{ARCH}
in additional, it tries to search libpq.a, even if we have no static postgres libs

this patch does 2 workarounds:
1. adds /usr/lib/postgresql to search paths
2. adds search for libpq.so in additional to libpq.a

It works for me, hope it would be helpful

P.S. It seems a same patch is needed for mysql module
Comment 4 Thomas Beutin 2016-01-25 10:39:16 UTC
i can confirm this bug, and...

(In reply to Guido Winkelmann from comment #0)
[...]
> 
> Jan 28 13:38:05 blish imap[1872]: SQL engine 'pgsql' not supported
> 
> This bug looks superficially similar to
> https://bugs.gentoo.org/show_bug.cgi?id=519646 except for PostgreSQL, not
> MySQL.
> 
> Rebuilding postgresql with USE="static-libs", then rebuild cyrus-sasl works
> as a workaround.

...this helped on my server.
Comment 5 Thomas Beutin 2016-05-30 13:56:04 UTC
=dev-libs/cyrus-sasl-2.1.26-r10::gentoo is affected too.
Comment 6 Karl Hakimian 2016-10-04 16:46:16 UTC
Any chance that this will get some attention? The provided patch does seem to fix the issue. It would be nice to see the fix added to the tree.
Comment 7 Sietze Post 2016-11-08 15:17:38 UTC
This issue is still present in dev-libs/cyrus-sasl-2.1.26-r11. The same patch mentioned above still works to fix the issue for me.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2018-11-10 22:04:25 UTC
*** Bug 629546 has been marked as a duplicate of this bug. ***
Comment 9 Arfrever Frehtes Taifersar Arahesis 2018-11-10 22:46:43 UTC
(In reply to Anton J. Garnik from comment #3)

I assume that this patch would work, but the simpler solution is to pass --with-pgsql=/usr/lib64/postgresql instead of --with-pgsql to configure.
This avoids any checking for libpq.a static library, and the resulting /usr/lib64/sasl2/libsql.so.3.0.0 is linked against libpq.so.5.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2018-11-10 22:51:36 UTC
Created attachment 554798 [details, diff]
Patch
Comment 11 Larry the Git Cow gentoo-dev 2018-11-16 20:25:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98aa2181b4af36fb55bd8ebaae23971e6ea4d38a

commit 98aa2181b4af36fb55bd8ebaae23971e6ea4d38a
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2018-11-10 22:49:58 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-11-16 20:24:40 +0000

    dev-libs/cyrus-sasl: dev-libs/cyrus-sasl: Fix detection of PostgreSQL library.
    
    Fixes: https://bugs.gentoo.org/538042
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 .../{cyrus-sasl-2.1.26-r11.ebuild => cyrus-sasl-2.1.26-r12.ebuild}    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)