Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of Firebird 3.0.3 on SLES 12 SP3 fails with ''Could not find acceptable ICU library" [CORE5764] #6027

Closed
firebird-automations opened this issue Feb 28, 2018 · 16 comments

Comments

@firebird-automations
Copy link
Collaborator

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: 4df4360 63f4e45

@firebird-automations
Copy link
Collaborator Author

Modified by: Miroslav Vacek (mvacek)

description: 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) Install libtommath1 on target system (it is not part of default SLES distribution packages).\

$ zypper install libtommath1

2) Create symlink "libtommath.so.0" for "/usr/lib64/libtommath.so.1".

$ ln -sf /usr/lib64/libtommath.so.1 /usr/lib64/libtommath.so.0

3) 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.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.

=>

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) Install libtommath1 on target system (it is not part of default SLES distribution packages).\

$ zypper install libtommath1

2) Create symlink "libtommath.so.0" for "/usr/lib64/libtommath.so.1".

$ ln -sf /usr/lib64/libtommath.so.1 /usr/lib64/libtommath.so.0

3) 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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Miroslav Vacek (mvacek)

description: 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) Install libtommath1 on target system (it is not part of default SLES distribution packages).\

$ zypper install libtommath1

2) Create symlink "libtommath.so.0" for "/usr/lib64/libtommath.so.1".

$ ln -sf /usr/lib64/libtommath.so.1 /usr/lib64/libtommath.so.0

3) 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.

=>

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.

@firebird-automations
Copy link
Collaborator Author

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

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).

@firebird-automations
Copy link
Collaborator Author

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.

@firebird-automations
Copy link
Collaborator Author

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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @mkubecek

Attachment: unicode-handle-the-ICU-version-hack-from-SuSE.patch [ 13221 ]

@firebird-automations
Copy link
Collaborator Author

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

@firebird-automations
Copy link
Collaborator Author

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.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

great - thank you!

@firebird-automations
Copy link
Collaborator Author

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.

@firebird-automations
Copy link
Collaborator Author

Commented by: @mkubecek

Current B3_0_Release branch with commits 63f4e45 and 885f2e4 cherry-picked on top of it works also on SLE11 SP4 (ICU 4.0, using "40" for soname).

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

According to users' reports re applied fix resolve an issue.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

Fix Version: 3.0.4 [ 10863 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

hvlad added a commit that referenced this issue Aug 5, 2021
…2 SP3 fails with ''Could not find acceptable ICU library".

On Linux, try to resolve symlink (such as libicuuc.so) to full file name (such as /usr/lib64/libicuuc.so.suse65.1) and extract ICU version number using filename suffix (65.1 in this case).
It allows to avoid a lot of attempts to find unknown installed ICU version and to successfully load ICU libraries with non-standard names (like SLES and OnenSUSE uses).
Tested on Ubuntu 2004 and OpenSUSE 15.3. Also tested on Windows. Needs testing on Darwin and Android.
hvlad added a commit that referenced this issue Aug 9, 2021
….3 on SLES 12 SP3 fails with ''Could not find acceptable ICU library".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment