Bug 389844 - Kexi starts with an empty error dialog on OpenBSD
Summary: Kexi starts with an empty error dialog on OpenBSD
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: General (show other bugs)
Version: 3.0.2
Platform: Other OpenBSD
: LO normal
Target Milestone: 3.1
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-03 20:00 UTC by Rafael Sadowski
Modified: 2018-02-22 01:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.1.0


Attachments
Corrected message (15.66 KB, image/png)
2018-02-05 00:31 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Sadowski 2018-02-03 20:00:28 UTC
When I start kexi an empty error dialog pops up. There is only an okay button and a red error icon. The dialog headline says: "Error - Kexi" Thats's all. After clicking on OK kexi exit with return code 1.
Comment 1 Jarosław Staniek 2018-02-04 23:47:45 UTC
Hi Rafael, thanks for the report, is this version compiled by you or a port?

Also, do you have installed at least one driver (sqlite, mysql, postgresql) for KDb?

Description at https://phabricator.kde.org/file/data/kjnkyg7lc6fuue3hs3hf/PHID-FILE-67r7l5rs7szrkqjgjmym/README-PACKAGERS.md
Comment 2 Jarosław Staniek 2018-02-04 23:57:53 UTC
Such dialog can appear if no KEXI is unable to find at least one own plugin (kexi_tableplugin.so, kexi_formplugin.so, etc). This is a hint for you, maybe you have not installed them or have paths not set (I do not know details of the OS you use). 

Of course the blank dialog is a bug so we're going to fix it ASAP.
Comment 3 Jarosław Staniek 2018-02-05 00:31:19 UTC
Created attachment 110342 [details]
Corrected message
Comment 4 Jarosław Staniek 2018-02-05 23:36:54 UTC
Git commit 5e502d3a68a78e4352a26e5ed6fe976ac128ecfc by Jaroslaw Staniek.
Committed on 05/02/2018 at 23:36.
Pushed by staniek into branch '3.1'.

Do not display empty message when starting without plugins, inform users about the status

Translators: new string approved during string freeze

M  +7    -0    src/core/kexipartmanager.cpp

https://commits.kde.org/kexi/5e502d3a68a78e4352a26e5ed6fe976ac128ecfc
Comment 5 Rafael Sadowski 2018-02-06 19:20:14 UTC
Hi Jarosław,

first of all thank you, Commit 5e502d3a68a78e4352a26e5ed6fe976ac128ecfc fixes
the empty error dialog. Your error message now appears but of course it doesn't
solve my main problem.

I'm the OpenBSD calligra maintainer and I try to port the current kexi version
to OpenBSD by user request. I hope it also depends on your interest to support
as many OS as possible.

kdb found all driver, please see bewlow the cmake configure output:

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Found SQLite version 3.21.0
-- Found support for extensions loading in SQLite.
-- Found Sqlite: /usr/local/include (Required is at least version "3.6.16")
-- Found ICU header files in /usr/local/include
-- Found ICU libraries: /usr/local/lib/libicuuc.so.13.0
-- Found MySQL: /usr/local/lib/mysql/libmysqlclient.so.27.0
-- Found PostgreSQL: /usr/local/lib/libpq.so.6.10 (found version "10.1")
-- The following features have been enabled:

What can I do to analyse the problem?
Comment 6 Jarosław Staniek 2018-02-06 19:54:44 UTC
You apparently miss runtime configuration for the custom prefix. Custom because it is not /usr.
Does the OS use /usr/local prefix for official/globally installed apps and not /usr? Maybe if you built KEXI with cmake's -DCMAKE_INSTALL_PREFIX=/usr option, it would work out of the box.
What's the command used to configure KEXI build? It should be the same as you use for any other cmake-based BSys.

As said above KEXI is unable to find at least one own plugin. These plugins for 2.1 are files like (your {PREFIX} is /usr/local):

{PREFIX}/lib/plugins/kexi/3.1/kexi_*plugin.so

Do you have QT_PLUGIN_PATH set for the custom location you use? That is:

export QT_PLUGIN_PATH={PREFIX}/lib/plugins:$QT_PLUGIN_PATH

Most probably you will also miss XDG_DATA_DIRS and XDG_CONFIG_DIRS settings if your 'share' dir is /usr/local.
Sorry for confusion if the OS that I do not know well user /usr/local for officially installed apps that are not 'system' software.
Comment 7 Jarosław Staniek 2018-02-06 19:55:49 UTC
typo: (for 3.1. not 2.1)
Comment 8 Rafael Sadowski 2018-02-07 07:28:31 UTC
yes, in OpenBSD all 3rdparty Software for/from packages is installed to /usr/local/.  With your QT_PLUGIN_PATH hint kexi starts and works fine. Thanks!

Now, I'm looking for an approach with which we can make it easy for the OpenBSD package user to start kexi without env tweaks. Is there any way I can modify in code to search explicit in /usr/local//lib/plugins or maybe with a camke option? CMAKE_INSTALL_PREFIX does not work.
Comment 9 Jarosław Staniek 2018-02-08 10:30:04 UTC
Great to hear it moves forward! Please look if all plugins work OK with the QT_PLUGIN_PATH setting (try start creating table/query etc.) and also insert widgets onto a form design. Then we will find solution probably in KEXI itself.

In addition can I ask you build tests too (usual cmake config but with -DBUILD_TESTING=1) and please run 'ctest' in your execution environment to see if GlobalSearchTest runs. GlobalSearchTest is an noninteractive app in BUILDDIR/bin/.
Comment 10 Rafael Sadowski 2018-02-11 11:16:57 UTC
With QT_PLUGIN_PATH kexi  Mysql and postgresql plugins work fine.

Of course I build the test but I run into:

"The file /usr/ports/pobj/kexi-3.0.2/kexi-3.0.2/src/main/autotests/data/GlobalSearchTest.kexi is not recognized as being supported by Kexi."

"Could not find plugin supporting for this file type. 
Detected MIME type is “application/x-sqlite3” (SQLite3 database)."
Comment 11 Rafael Sadowski 2018-02-11 11:32:32 UTC
How do you interpret/read QT_PLUGIN_PATH in kexi or do you use something from KDE frameworks? Maybe the bug is in our  KDE frameworks on OpenBSD. I would like to work out a solution where our OpenBSD users don't have to set QT_PLUGIN_PATH by hand.
Comment 12 Jarosław Staniek 2018-02-21 10:59:54 UTC
Update: Because of this bug we've stopped the Final 3.1 release and will only release RC1 on Feb 23rd. So there's time to find a solution.
Comment 13 Jarosław Staniek 2018-02-21 11:33:32 UTC
Asked on a KDE freebsd mailing list: https://mail.kde.org/pipermail/kde-freebsd/2018-February/027445.html

I was unable to find anything specifically for openBSD.
In worst case we would have appropriate default plugin path set in main(), so do not worry.

There's also page https://www.freebsd.org/doc/en/books/porters-handbook/using-qt.html, no idea if it helps in any way.
Comment 14 Jarosław Staniek 2018-02-21 19:13:23 UTC
Rafael, you may want to look at the above mail.kde.org thread for hints that just have appeared there (-DKDE_INSTALL_USE_QT_SYS_PATHS=ON).
Comment 15 Rafael Sadowski 2018-02-21 21:28:12 UTC
Issue fixed by setting -DKDE_INSTALL_QTPLUGINDIR. Thank you for your support thus the way is clear for kexi in OpenBSD.
Comment 16 Jarosław Staniek 2018-02-22 01:23:10 UTC
Happy to hear! Looking forward to also hear from KEXI/OpenBSD users :)