Closed firebird-automations closed 6 years ago
Commented by: @mkubecek
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
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).
Commented by: @AlexPeshkoff
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.
Commented by: @mkubecek
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.
Commented by: @AlexPeshkoff
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
Commented by: Miroslav Vacek (mvacek)
@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. =============================================
Commented by: @AlexPeshkoff
great - thank you!
Commented by: @mkubecek
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.
Commented by: @mkubecek
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).
Commented by: @AlexPeshkoff
According to users' reports re applied fix resolve an issue.
Submitted by: Miroslav Vacek (mvacek)
Attachments: unicode-handle-the-ICU-version-hack-from-SuSE.patch
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 "http://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.
Commits: FirebirdSQL/firebird@4df43606a293ff3a9a6883a638b4559375449055 FirebirdSQL/firebird@63f4e450eb6eedc8430b800bae5e0c92cfb7b068