Page 1 of 1

Qbittorrent and ICU libraries

Posted: Sat Sep 26, 2020 10:49 pm
by userdocs

When i build qbittorrent i have chosen to include ICU as the dependencies seemed to prefer this (boost and i think libtorrent). I say preferred because we can consider this example when building.

Using Debian Buster I already have libc6-dev installed (iconv-dev) and if i build my partially static build i will get this result for functional qbittorrent-nox binary

Code: Select all (0x00007ffcc855f000) => /lib/x86_64-linux-gnu/ (0x00007fd78831e000) => /lib/x86_64-linux-gnu/ (0x00007fd788319000) => /lib/x86_64-linux-gnu/ (0x00007fd788195000) => /lib/x86_64-linux-gnu/ (0x00007fd788012000) => /lib/x86_64-linux-gnu/ (0x00007fd787ff8000) => /lib/x86_64-linux-gnu/ (0x00007fd787e37000)
/lib64/ (0x00007fd7896e5000)
This is what i expect to see even when include ICU statically built but since i am deliberately skipping that part it is not present.

If i now install libicu-dev the dependencies will prefer this when configuring and compiling, with no specific instructions given to do so, and will include links to this in the compiled qbittorrent-nox giving me this outcome instead.

Code: Select all (0x00007ffc2888a000) => /lib/x86_64-linux-gnu/ (0x00007f7335992000) => /lib/x86_64-linux-gnu/ (0x00007f73356b7000) => /lib/x86_64-linux-gnu/ (0x00007f73354e8000) => /lib/x86_64-linux-gnu/ (0x00007f7333af8000) => /lib/x86_64-linux-gnu/ (0x00007f7333af3000) => /lib/x86_64-linux-gnu/ (0x00007f733396f000) => /lib/x86_64-linux-gnu/ (0x00007f73337ea000) => /lib/x86_64-linux-gnu/ (0x00007f73337d0000) => /lib/x86_64-linux-gnu/ (0x00007f733360f000)
/lib64/ (0x00007f7336ce2000)
Conclusion and question:

When IO build the fully static built the above issue is relevant as that is when the file size will differ. Either 20Mb (no ICU) or 50Mb (with ICU), Due to the apparent preference of the dependencies to use ICU i would assume the end result is better for this but i am unsure from a technical point of view and need some input.

A considerable difference. So the questions are:

What is the relevance of this to the final compiled binary of ICU?

Is it better to have ICU or does it make little difference to not include get a significantly smaller ting a smaller file size?

Re: Qbittorrent and ICU libraries

Posted: Sun Sep 27, 2020 4:20 pm
by FranciscoPombal
Good question. I grepped and found nothing directly referencing libicu in both qBittorrent or libtorrent. So this probably has to do with boost?

You could try asking in the libtorrent or qBittorrent issue trackers, it is possible glassez, Chocobo1 or arvidn or someone else knows the answer.

Normally one should not post support questions to the issue tracker, but this is clearly a development question, and you can easily frame the post in a non-interrogative way as "Discrepancy in the built binary when libicu is installed", for example.

Re: Qbittorrent and ICU libraries

Posted: Sun Sep 27, 2020 5:04 pm
by userdocs
Ok, Thanks.

I will test a few more things to try and narrow it down to the specific dependency. I believe it is boost but it's curious as at no point to i specify the inclusion of this in the build process.

Currently i know boost checks for this but was not aware it preferred over iconv with no input to do so, as iconv appears to me to offer the same functionality as ICU.