Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 629546

Summary: Dependency problem in dev-libs/cyrus-sasl with PostgreSQL support
Product: Gentoo Linux Reporter: Alvaro Aguayo <alvaroag>
Component: Current packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED DUPLICATE    
Severity: normal CC: titanofold
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alvaro Aguayo 2017-09-01 15:25:38 UTC
When building

dev-libs/cyrus-sasl-2.1.26-r9:2::gentoo  USE="berkdb gdbm pam postgres ssl -authdaemond -java -kerberos -ldapdb -mysql -openldap -sample (-selinux) -sqlite -srp -static-libs -urandom"

With dev-db/postgresql-9.6.3-r1:9.6::gentoo already installed.

cyrus-sasl builds & installs correctly, but I get error "SQL engine 'pgsql' not supported" when using it.

When building verbosely, I get the following:

configure: WARNING: PostgreSQL Library not found

Which is because the cyrus-sasl configure script searches libpq.a only on the following locations(considering --prefix=/usr)

/usr/lib/pgsql/libpq.a
/usr/local/lib/pgsql/libpq.a
/usr/lib/pgsql/libpq.a
/usr/lib/libpq.a
/usr/local/lib/libpq.a
/usr/lib/libpq.a
/usr/pgsql/lib/libpq.a
/usr/local/pgsql/lib/libpq.a
/usr/pgsql/lib/libpq.a

However, libpq.a is located under /usr/lib/postgresql-9.4/lib64/libpq.a , and it's a link to libpq.so in the same directory. On /usr/lib, there's no symlink to libpq.so named libpq.a.

I think the configure script should be changed so "libpq.so" is used instead of "libpq.a". Also, if the --with-pgsql ("postgres" USE flag) argument is given, it should fail immediatelly, instead of building without PostgreSQL support.

Other solution would be for the dev-db/postgresql or app-eselect/eselect-postgresql to add such symlink, in order to ease de compilation of apps which require libpq.a

My current solution was to "ln -s /usr/lib/libpq.so /usr/lib/libpq.a".
Comment 1 Aaron W. Swenson gentoo-dev 2017-09-02 03:08:57 UTC
(In reply to Alvaro Aguayo from comment #0)
> ....
> However, libpq.a is located under /usr/lib/postgresql-9.4/lib64/libpq.a ,
> and it's a link to libpq.so in the same directory. On /usr/lib, there's no
> symlink to libpq.so named libpq.a.
> 
> I think the configure script should be changed so "libpq.so" is used instead
> of "libpq.a". Also, if the --with-pgsql ("postgres" USE flag) argument is
> given, it should fail immediatelly, instead of building without PostgreSQL
> support.
> 
> Other solution would be for the dev-db/postgresql or
> app-eselect/eselect-postgresql to add such symlink, in order to ease de
> compilation of apps which require libpq.a
> 
> My current solution was to "ln -s /usr/lib/libpq.so /usr/lib/libpq.a".

The problem is with the dev-libs/cyrus-sasl. If it needs *.a files, then it need to depend on dev-db/postgresql[static-libs].

Further, the configure script should use one of the correct tools: pkg-config or pg_config. But, just passing the right path to it as part of the argument to econf (or whatever) will do the trick.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-11-10 22:04:25 UTC

*** This bug has been marked as a duplicate of bug 538042 ***