LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-30-2016, 03:29 PM   #1
ljb643
Member
 
Registered: Nov 2003
Posts: 432

Rep: Reputation: Disabled
LibreOffice Base and PostgreSQL driver - unexpected dependency


I just found out that the PostgreSQL driver in LibreOffice Base requires that you have the Kerberos (krb5) libraries installed. If you don't have Kerberos, connect tests fail with the unhelpful message "The connection could not be established". I hope to save somebody some pain trying to figure out why connections don't work out-of-the-box.

This applies if you use the package from www.libreoffice.org (or via slackbuilds.org, which also uses those). The LibreOffice people apparently built their PostgreSQL library with this dependency.

I am using Slackware 14.1, PostgreSQL-9.5.2, and LibreOffice-5.1.3.

I'm pretty sure this used to work without Kerberos. Perhaps it was a change in LibreOffice-5.0 or -5.1, but it doesn't seem to be documented.
 
Old 05-31-2016, 05:14 AM   #2
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 591

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
Originally Posted by ljb643 View Post
I just found out that the PostgreSQL driver in LibreOffice Base requires that you have the Kerberos (krb5) libraries installed. If you don't have Kerberos, connect tests fail with the unhelpful message "The connection could not be established". I hope to save somebody some pain trying to figure out why connections don't work out-of-the-box.

This applies if you use the package from www.libreoffice.org (or via slackbuilds.org, which also uses those). The LibreOffice people apparently built their PostgreSQL library with this dependency.

I am using Slackware 14.1, PostgreSQL-9.5.2, and LibreOffice-5.1.3.

I'm pretty sure this used to work without Kerberos. Perhaps it was a change in LibreOffice-5.0 or -5.1, but it doesn't seem to be documented.
Can you determine whether the lack of Kerboros is a problem with any postgres connection, or just the database you happen to be connecting to? If it's not the database itself insisting on a "kerberos connection" but (as you're suggesting) because the binaries from libreoffice.org just happen to have been built with kerboros libraries, then you might consider building from source. In the current SBo master, there's a "build from source" SlackBuild named LibreOffice (as opposed to libreoffice, which repackages the libreoffice.org binaries). The "build from source" SlackBuild generates at least two postgres related shared objects (libpostgresql-sdbc-impllo.so and libpostgresql-sdbclo.so), neither of which have any dependency of their own on krb5. Its hard to say how easily that SlackBuild would work on 14.1 but it should at least be a good starting point.
 
Old 05-31-2016, 01:30 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,179

Rep: Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922Reputation: 3922
Quote:
Originally Posted by ljb643 View Post
I'm pretty sure this used to work without Kerberos. Perhaps it was a change in LibreOffice-5.0 or -5.1, but it doesn't seem to be documented.
To continue on with chris.willing's thoughts, you could try Eric's LibreOffice for 14.1. He has a pre-compiled 5.0.3 version, to see if the issue still occurs with a 5.0.x build definitely not compiled against kerberos. Might take less time than compiling your own version... especially if it confirms Chris's suspicions.

http://www.slackware.com/~alien/slac...ce/pkg64/14.1/ -- 64bit link
http://www.slackware.com/~alien/slac...fice/pkg/14.1/ -- 32bit link
 
1 members found this post helpful.
Old 05-31-2016, 06:21 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 432

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chris.willing View Post
Can you determine whether the lack of Kerboros is a problem with any postgres connection, or just the database you happen to be connecting to?...
It will fail with any connection. The LibreOffice Base driver for PostgreSQL is implemented as 2 shared libraries: libpostgresql-sdbclo.so and libpostgresql-sdbc-impllo.so. The second of these (which I believe includes the PostgreSQL library libpq within) has a dependency on libkrb5* and libgssapi*. So the driver will always fail to load, well before it can try to connect to a database, if you don't have Kerberos.

I'm sure you are correct, building LibreOffice from source would allow you the option to exclude this feature. Actually, I think PostgreSQL defaults to auto-detecting Kerberos when built, so perhaps LibreOffice will too, so wouldn't need to do anything. For me, though, building Kerberos is much quicker than LibreOffice, not to mention to time to download the source.
 
Old 05-31-2016, 06:46 PM   #5
ljb643
Member
 
Registered: Nov 2003
Posts: 432

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ljb643 View Post
...Actually, I think PostgreSQL defaults to auto-detecting Kerberos when built...
My mistake - I checked and you must ask for GSSAPI (Kerberos) when building PostgreSQL or it won't be included, even if you have it installed. Which is good.

Quote:
To continue on with chris.willing's thoughts, you could try Eric's LibreOffice for 14.1. He has a pre-compiled 5.0.3 version, to see if the issue still occurs with a 5.0.x build definitely not compiled against kerberos. Might take less time than compiling your own version... especially if it confirms Chris's suspicions.
Thanks, I'll see if I can give that a try.
 
Old 06-01-2016, 07:09 AM   #6
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
A little off-topic for the problem at-hand, but on ( Current + Multilib + postgresql 9.5.3 ), Alien Eric's LibreOffice 5.1.3 does NOT require kerberos to connect to a local DB.

-- kjh

Code:
# ver libreoffice postgresql
-rw-r--r-- 1 root root  861974 May 17 19:40 /var/log/packages/libreoffice-5.1.3-x86_64-1alien
-rw-r--r-- 1 root root    8416 May 17 19:40 /var/log/packages/libreoffice-dict-en-5.1.3-x86_64-1alien
-rw-r--r-- 1 root root    1084 May 17 19:40 /var/log/packages/libreoffice-kde-integration-5.1.3-x86_64-1alien
-rw-r--r-- 1 root root 2031480 May 17 19:40 /var/log/packages/libreoffice-sdkdoc-5.1.3-noarch-1alien
-rw-r--r-- 1 root root  128877 May 28 08:22 /var/log/packages/postgresql-9.5.3-x86_64-2_SBo
 
Old 06-01-2016, 07:28 PM   #7
ljb643
Member
 
Registered: Nov 2003
Posts: 432

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kjhambrick View Post
A little off-topic for the problem at-hand, but on ( Current + Multilib + postgresql 9.5.3 ), Alien Eric's LibreOffice 5.1.3 does NOT require kerberos to connect to a local DB.
Correct, and not off-topic. As I found at the links bassmadrigal posted, the build script that 'alien' uses to build LibreOffice 5.0.x from source has --without-gssapi --without-krb5 so his versions won't have this dependency. I assume he uses similar scripts for 5.1.x.

I also found that the 'official' builds at libreoffice.org of the previous version libreoffice-5.0.6 do also have the Kerberos dependency. So I guess it's been a while since I tried and successfully used Base with PostgreSQL and no Kerberos.
 
Old 06-01-2016, 07:30 PM   #8
ljb643
Member
 
Registered: Nov 2003
Posts: 432

Original Poster
Rep: Reputation: Disabled
Marking this as SOLVED because we have a few fixes that work: Build and install Kerberos, or use alien's packages, or build Libreoffice from source and exclude gssapi/krb5.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] libreoffice base and writer rmknox Linux - Software 0 09-07-2014 06:45 PM
Deleting libreoffice-base Adler Linux - Software 2 08-06-2014 01:25 PM
Connect LibreOffice Base w/ PostgreSQL carlosinfl Programming 3 10-14-2013 07:26 PM
How can i connect LibreOffice Base to a mysql database remotely baronobeefdip Linux - Networking 1 07-17-2012 07:11 PM
LXer: Perfect Setup Of Snort + Base + PostgreSQL On Ubuntu 6.06 LTS LXer Syndicated Linux News 0 04-27-2007 08:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration