mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
qbittorrent - build process - incorrect linking to boost includes #11469
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#11469
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 (Dec 23, 2020).
Please provide the following information
qBittorrent version and Operating System
4.3.1 linux debian based amd64
If on linux, libtorrent-rasterbar and Qt version
libtorrent 1.2.11 (github) and qt via apt or built from github
Introduction
This issue is twofold but the build process is required to understand the problem.
First, the scripted build process linked below demonstrates a streamlined build process where using boost 1.75, as documented for libtorrent, allows you to skip compiling boost dependencies. I believe that when this is properly appreciated and understood the documented process can be adjusted to match.
What is the problem
The bug itself is in how qbittorrent looks for and loads
boost_systemand the includes under these circumstances when using the refined build method.Bug: qbittorrent will not honor defined include paths and instead use a system installed boost include when using the boost flags.
The short version is, I can make sure these vars are defined (config.log) but qbittorrent will still ignore these vars and load the first system instance of
include/boostit findsExample of correctly defined variables taken from the
config.logon a build that linked to the wrong instance of boost 1.71 instead of 1.75.It can be solved by using this combination
Specifically
CFLAGS="-I${BOOST_ROOT}"But some things spring to mind as this is not correct.
1: These variables are correctly set but ignored and this defeats the purpose, forcing me to use
CFLAGS="-I${BOOST_ROOT}"If I have boost 1.69 or 1.72 installed via apt these will be used and my settings ignored. Even though the configure was successful based on my definitions.
2: You hardcode
/includeinto the--with-boost="${BOOST_ROOT}"path.This needs to be changed or more flexible as the installation method above needs to use
boost_1_75_0/boostas this is the location in the source. I could symlink but there should be no need to workaround something that should not be hardcoded.3: This would / should be the correctly defined variables in this example.
4: even if improperly configured but just enough to pass the
boost_systemtests, I can be successful by having no apt version of boost installed to get the desired outcome. This is not ideal but shows it was possible.5: libtorrent builds the
libboost_system.aand this works fine.Examples via docker and a script.
I have made a script demonstrate the build process and bug - https://git.io/JLX0n
Note: the script installs these
libboost-devlibboost-system-devvia apt to demonstrate the issue and bypassTo use it with docker please use these command.
bug - boost 1.71 linked
No bug - boost 1.75 successfully linked
Use this command to run
qbittorrent-noxfrom inside the docker upon build completion.@userdocs commented on GitHub (Dec 23, 2020):
What I want to happen?
I want to use just this:
Have these vars defined
And have qbittorrent linked against the correct version of boost.
@luzpaz commented on GitHub (Jun 28, 2023):
Is this ticket still relevant ?