On 01/19/18 14:03, Roman Simakov wrote:
2018-01-19 12:54 GMT+03:00 Vlad Khorsun via Firebird-devel
<firebird-devel@lists.sourceforge.net>:
19.01.2018 11:41, Adriano dos Santos Fernandes wrote:
On 19/01/2018 07:14, Roman Simakov wrote:
it search for ICU library using versions numbers such as 5.19 ... 5.0, 4.19
... 4.0 etc.
But, IIRC, current ICU versions is 51.x, 52.x, 60.x etc. I.e. they changed
version
numbering from N.xy to Nx.y. Is it correct ?
Also take a look into formatFilename (unicode_util.cpp:346)
static void formatFilename(PathName& filename, const char* templateName,
int majorVersion, int minorVersion)
{
string s;
if (majorVersion >= ICU_NEW_VERSION_MEANING)
s.printf("%d", majorVersion);
else
s.printf("%d%d", majorVersion, minorVersion);
filename.printf(templateName, s.c_str());
}
I see two ways to fix:
1) enumerate additional suffix as well
2) implement direct mapping both module and function names via config
and every Linux packages could provide its own specific format. Maybe
even implement template with variables in config. Something like this:
For Suse: libicuuc = " libicuuc.so.${Major}{$Minor}.{$Release}"
For Ubuntu: libicuuc = " libicuuc.so.${Major}{$Minor}"
Some other: libicuuc = " libicuuc.so.${Major}.{$Minor}"
For functions can do the same.
I loading code we will try Majoir in {5,4,3,6,0}, Minor in {1..20},
Release in {1..3} on like that.
This is almost funny case. The most traditional schema of versioning
linux dynamic libraries is use of $Major in soname and ignoring $Minor
(i.e. no API/ABI changes are expected in minor releases, only bugfixes).
But ICU used to generate different sort keys in different minor releases
(for us that would be a kind of incompatible between for example 3.0.2 /
3.0.3 db structure). Therefore $Minor became major-ilke part of ICU
version. People even stopped to separate them with '.', i.e. instead ICU
with major==5 and minor==3 we do have ICU with major==53. Well - in
addition to minors $Release was invented. Now people try to add it to
already big major too :)
Well, it's really hard to predict how will develop ICU versioning. I'll
be not surprised if _subrelease_ will arrive. Worse is that we can not
limit ourself with loading ICU using libicuuc.so symlink - sometimes we
need old versions to support old databases. It starts to seem to me that
(at least for posix) it will be better to try to load all libraries
having libicuuc.so.* names appending what we find after dot to functio
names. Will try with it next week.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel