mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Question: Discrepancy in the built binary when libicu-dev is installed along with libc6-dev #10955
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#10955
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @userdocs on GitHub (Sep 27, 2020).
Please provide the following information
qBittorrent version and Operating System
4.2.5 Debian based amd64
If on linux, libtorrent-rasterbar and Qt version
1.2.10
What is the problem
This is not a bug but an issue with qbittorrent as such but after exploring other support avenues it does appear to be related to development/compilation of the program and needs some insight from a dev perhaps?
When i am building qbittorrent-nox on a Linux (Debain based or Alpine) i am noticing a considerable size difference between the final static binary when
libicu-devis installed and certain dependencies are compiled locally. When statically built the filesize is 20M withlibc6-devvs 50M withlibicu-dev.In this example below I am using my partially static builds to demonstrate the issue. In this case files sizes are not relevant as the offending dependency is dynamically linked in qbittorrent but it does evidence the issue. Here is the build order for the locally compiled dependencies.
With just
libc6-devinstalled the result ofldd qbittorrent-build/completed/qbittorrent-noxis:After
libicu-devis installed the result ofldd qbittorrent-build/completed/qbittorrent-noxis:As you can see, the icu libraries are dynamically linked into the binary.
What is the point of this issue?
Ok, so the reason this is a problem or a poorly understood compilation issue is that at no point am I actually specifying a preference to include or use
libicu-devin my compilation. One or more of the dependencies are doing this via their configuration profiles and therefore choosing to uselibicu-devas a preference over iconv automatically if thelibicu-devpackage is installed.For example when looking at the
/include/QtCore/5.15.1/QtCore/private/qtcore-config_p.h(abbreviated to the relevant lines)Without
libicu-devThe configuration log:
With
libicu-devThe configuration log:
In this particular case I believe both boost 1.74 and qtbase appear to prefer and use ICU if the
libcu-devis present. With possibly boost being the core offender of the size change but I am not 100% sure yet if it is one or both to blameHow can this resolved?
By understanding if there is a real value to including ICU as a dependency when two of the major dependencies will automatically prefer to use it if it is present and since it becomes linked to the qbittorrent binary itself. I would like the file size to be reduced but i cannot answer the question of whether it is better to include this dependency in the build chain or if it is peculiar coincidence with no change on the outcome, from a user/performance point of view. Hopefully someone can shed some light on the issue.
Examples:
Here are the build binaries for anyone who cares to to examine. Built Ubuntu 20.04
noicu-qbittorrent-nox.zip
withicu-qbittorrent-nox.zip