Issue Details (XML | Word | Printable)

Key: CORE-5764
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Miroslav Vacek
Votes: 0
Watchers: 5
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Installation of Firebird 3.0.3 on SLES 12 SP3 fails with ''Could not find acceptable ICU library"

Created: 28/Feb/18 04:09 PM   Updated: 17/Jun/18 05:28 AM
Component/s: Installation
Affects Version/s: 3.0.3
Fix Version/s: 3.0.4, 4.0 Beta 1

File Attachments: 1. Text File unicode-handle-the-ICU-version-hack-from-SuSE.patch (3 kB)

Environment:
SUSE Linux Enterprise Server 12 SP3, 64-bit
Firebird-3.0.3, 64-bit (installation package: Firebird-3.0.3.32900-0.amd64.tar.gz)
No other Firebird Server version are present (or were present) on target system. Firebird 3.0.3 should have been first and only Firebird instance.

QA Status: Cannot be tested


 Description  « Hide
If I try to install Firebird 3.0.3 on SLES 12 SP3 I get following error message:
"Could not find acceptable ICU library"

Pre-requisities:
1) Clean install of SLES 12 SP3.
2) Install libtommath1 on target system (it is not part of default SLES distribution packages).\
=============================================
$ zypper install libtommath1
=============================================
3) Create symlink "libtommath.so.0" for "/usr/lib64/libtommath.so.1".
=============================================
$ ln -sf /usr/lib64/libtommath.so.1 /usr/lib64/libtommath.so.0
=============================================
4) Check presence of default libicu library. Version 52.1 should be present.
=============================================
$ rpm -ql libicu52_1

# /usr/lib64/libicudata.so.52.1
# /usr/lib64/libicudata.so.52_1
# /usr/lib64/libicui18n.so.52.1
# /usr/lib64/libicui18n.so.52_1
# /usr/lib64/libicuio.so.52.1
# /usr/lib64/libicuio.so.52_1
# /usr/lib64/libicule.so.52.1
# /usr/lib64/libicule.so.52_1
# /usr/lib64/libiculx.so.52.1
# /usr/lib64/libiculx.so.52_1
# /usr/lib64/libicutest.so.52.1
# /usr/lib64/libicutest.so.52_1
# /usr/lib64/libicutu.so.52.1
# /usr/lib64/libicutu.so.52_1
# /usr/lib64/libicuuc.so.52.1
# /usr/lib64/libicuuc.so.52_1
=============================================


Steps to reproduce problem:
1) Download Firebird 3.0.3 installation package for 64-bit Linux.
2) Extract installation package on target system.
3) Run "install.sh" script from extracted archive.

=============================================
$ ./install.sh

Firebird 3.0.3.32900-0.amd64 Installation

Press Enter to start installation or ^C to abort
...
/opt/firebird/security3.fdb
/opt/firebird/intl/
/opt/firebird/intl/fbintl.conf
/opt/firebird/intl/fbintl
/opt/firebird/WhatsNew
/opt/firebird/firebird.log
Done.
Deleting...
Done.
Extracting install data
Updated /etc/services
Please enter new password for SYSDBA user: masterkey
unable to open database
Could not find acceptable ICU library
=============================================

Firebird.log:
=============================================
$ cat /opt/firebird/firebird.log

mvacek Wed Feb 28 16:24:34 2018
  /opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/firebird

mvacek Wed Feb 28 16:24:34 2018
  Database: /opt/firebird/security3.fdb
  Could not find acceptable ICU library

mvacek Wed Feb 28 16:24:34 2018
  ConfigStorage: mutex mutexLock error, status = 22

mvacek Wed Feb 28 16:24:34 2018
  /opt/firebird/bin/fbguard: /opt/firebird/bin/firebird terminated abnormally (-1)
=============================================

/var/log/messages:
=============================================
$ cat /var/log/messages:

2018-02-28T16:24:34.287293+01:00 mvacek systemd-coredump[11441]: Process 11438 (firebird) of user 84 dumped core.
2018-02-28T16:24:34.646380+01:00 mvacek firebird: Security database error
2018-02-28T16:24:34.647002+01:00 mvacek firebird: ConfigStorage: mutex mutexLock error, status = 22
=============================================


Workaround:
- Build libicu 52.1 from sources and install it as system wide default.
- Re-run Firebird installation. It now completes without "Could not find acceptable ICU library" error.


Expected behavior:
- Firebird correctly detects pre-installed ICU library version shipped with SLES 12 SP3.
- Manual build of libicu 52.1 is not needed.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michal Kubeček added a comment - 03/Mar/18 06:50 PM
The primary problem here is that ICU upstream tends to change library ABI in incompatible way without changing its soname. To prevent mysterious issues manifesting in other packages, openSUSE (and SLE) patches ICU packages to include also minor version in soname. Therefore Firebird code which expects soname to be constructed in the upstream way doesn't work correctly on openSUSE and SLE.

The openSUSE packages are patched to work also with the openSUSE soname scheme. In particular, the 3.0.3 package in server:database OBS project has such patch (I'm going to submit it to Factory/Tumbleweed and 15.0 next week unless there is a problem. You can even download ready to use packages for SLE12 SP3 from OBS.

If you want to build Firebird on SLE12 SP3 on your own, the patch you need is

  https://build.opensuse.org/source/server:database/firebird/unicode-handle-the-ICU-version-hack-from-SuSE.patch?rev=6dc573e0e61109d32073fb388eb7bf28

It's a bit hackish, that's why I didn't submit it to Firebird upstream, but so is the whole code trying to cope with the mess ICU caused by changing versioning scheme randomly (and breaking ABI compatibility without adjusting soname).

Alexander Peshkov added a comment - 04/Mar/18 01:10 PM
Provided link fails for me with the following error:

anonymous_user(Anonymous user is not allowed here - please login)

If you can send me that patch it will be interesting to take a look at it.


Michal Kubeček added a comment - 04/Mar/18 02:25 PM
This is the patch. The problem is that e.g. for ICU 52.1, openSUSE packages use soname "52_1" rather than "52". This was done in response to upstream ICU changing ABI without updating soname, e.g. between 51.1 and 51.2. Actually, as the patch was originally meant as a quick band-aid for openSUSE and SLE packages, I probably never checked if it works with the upstream ICU libraries.

Alexander Peshkov added a comment - 22/Mar/18 10:42 AM
Michal (and others watching this item)!

Please try current trunk snapshot (http://web.firebirdsql.org/download/snapshot_builds/linux/fbtrunk/) - will it find your favorite ICU or not.
There were serious changes in how we choose a file to load as ICU module so please try with old ICUs too. Specially interesting is ICU 4.9 with sonames looking like bla-la-la.49

Miroslav Vacek added a comment - 05/Apr/18 01:21 PM
@Alex

I can confirm that your trunk snapshot successfully recognized ICU bundled with SLES 12 SP3 (ICU 52.1).
Installation completed without any error and Firebird seems to be working correctly.


Installation summary:
=============================================
$ ./install.sh

Firebird 4.0.0.947-Alpha1.amd64 Installation

Press Enter to start installation or ^C to abort
Extracting install data
Updated /etc/services
Please enter new password for SYSDBA user: masterkey
Install completed
=============================================


Firebird.log is now also error free:
=============================================
$ cat /opt/firebird/firebird.log

mvacek Thu Apr 5 14:40:20 2018
        /opt/firebird/bin/fbguard: guardian starting /opt/firebird/bin/firebird

=============================================


/var/log/messages also suggest that Firebird is up and running
=============================================
$ tail -n 3 /var/log/messages

2018-04-05T14:40:20.906727+02:00 mvacek systemd[1]: Starting Firebird Database Server...
2018-04-05T14:40:20.947412+02:00 mvacek systemd[1]: firebird.service: Supervising process 31049 which is not our child. We'll most likely not notice when it exits.
2018-04-05T14:40:21.026793+02:00 mvacek systemd[1]: Started Firebird Database Server.
=============================================

Alexander Peshkov added a comment - 05/Apr/18 01:31 PM
great - thank you!

Michal Kubeček added a comment - 08/Apr/18 08:32 PM
Checked openSUSE Factory (ICU 60.2), openSUSE 42.3 (ICU 52.1) and openSUSE 13.1 (ICU 51.2) and they all seem to work fine. I would like to test also some older version before SUSE started to use its soname format but it's a bit tricky as the only natural candidate, SLE11 SP4, has gcc 4.3 which is known to have problems with some C++ constructs used in Firebird code (I have worked around this to make FB3 build but never did (or planned to do) so for FB4 code). I'll have to check if it's still possible to build against e.g. openSUSE 12.3 in OBS. Anyway, as far as current openSUSE and SLE versions go (except SLE11 SP4 which has its own problems with toolchain), the code in master works well.

Michal Kubeček added a comment - 09/Apr/18 06:40 AM
Current B3_0_Release branch with commits 63f4e450eb6e and 885f2e445736 cherry-picked on top of it works also on SLE11 SP4 (ICU 4.0, using "40" for soname).

Alexander Peshkov added a comment - 15/Jun/18 10:00 AM
According to users' reports re applied fix resolve an issue.