mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
linking qbittorrent-nox fails #6024
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#6024
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 @jrvmedic on GitHub (Sep 6, 2017).
Please provide the following information
qBittorrent version and Operating System:
VER_MAJOR = 3
VER_MINOR = 4
VER_BUGFIX = 0
VER_BUILD = 0
uname -a: Linux 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
If on linux, libtorrent and Qt version:
LIBTORRENT: version 1.0.7 AND 1.1.4 (both)
QT: 5.6.1
What is the problem:
Refuses to link
linking qbittorrent-nox
session.o: In function
BitTorrent::Session::getPendingAlerts(std::vector<libtorrent::alert*, std::allocator<libtorrent::alert*> >&, unsigned long)': /home/jrv/usr/qBittorrent-master/src/base/bittorrent/session.cpp:3792: undefined reference tolibtorrent::session_handle::wait_for_alert(std::chrono::duration<long, std::ratio<1l, 1000000000l> >)'collect2: error: ld returned 1 exit status
make[1]: *** [qbittorrent-nox] Error 1
What is the expected behavior:
that 'make' according to the directions found at: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qbittorrent-nox-for-CentOS-from-source
runs to completion and creates an executable
Steps to reproduce:
Near virgin install of Centos 1611 with yum update
vanilla build environment per: https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qbittorrent-nox-for-CentOS-from-source
Extra info(if any):
@zeule commented on GitHub (Sep 6, 2017):
Please check what is the signature of the function in the libtorrent-rasterbar.so. For example, on my system:
@jrvmedic commented on GitHub (Sep 6, 2017):
$ nm -D /usr/lib/libtorrent-rasterbar.so | grep wait_for_alert | c++filt
0000000000191780 T libtorrent::session_handle::wait_for_alert(boost::chrono::duration<long, boost::ratio<1l, 1000000000l> >)
that's with libtorrent-rasterbar-1.0.7 - don't have 1.1.4 available at the moment
@zeule commented on GitHub (Sep 7, 2017):
Your libtorrent was compiled in C++03 mode, while qBittorrent requires C++11 mode enabled. That is why in your .so boost::chrono types are used, but when you compile qBt, it forces C++11 mode and included libtorrent headers switch to std::chrono. You need to built libtorrent with
-std=c++11(or later) compiler flag.@jrvmedic commented on GitHub (Sep 7, 2017):
I've never gotten bit by the C++03 vs. C++11 issue before, and it won't happen again. Thank you for the education.
For clarification, if following the wiki instructions for CentOS, then an updated command line for building libtorrent-rasterbar is:
./configure --prefix=/usr CPPFLAGS=-std=c++11
Today this works for both 1.0.7 in the original instructions and 1.1.4 from the current repository.
@comrade-meowski commented on GitHub (Oct 23, 2017):
Not sure whether to open a new bug for this or comment here as my issue is clearly related.
I'm following jrvmedic's slightly modified instructions here adapted from https://github.com/qbittorrent/qBittorrent/wiki/Compiling-qbittorrent-nox-for-CentOS-from-source.
Details:
RHEL 7.4 with kernels 4.13.9-1.el7.elrepo.x86_64 & 3.10.0-693.5.2.el7.x86_64.
LIBTORRENT: versions 1.0.7, 1.1.4 & 1.1.5 [via: (https://github.com/arvidn/libtorrent/releases)]
QBITTORRENT: 3.4.0 [via: git clone (https://github.com/qbittorrent/qBittorrent.git)]
QT: 5.6.2
TOOLCHAINS: gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) and related tools plus the more recent gcc version 6.3.1 20170216 (Red Hat 6.3.1-3) (GCC) + tools enabled from devtoolset-6
The target system is likewise a pretty much vanilla RHEL reference instance with all dependencies installed.
No matter which combination of tools and libtorrent versions used, I run into the same linker problem during the final stages of the qBittorrent make. I am passing the amended CPPFLAGS to libtorrent-rasterbar-* like so:
./configure --prefix=/usr CPPFLAGS=-std=c++11Which gives me:
libtorrent-rasterbar-* builds and installs fine but the qBittorrent build bombs out in the final stages:
Which looks a lot like the same error as jrvmedic was getting...
Checking "nm -D /usr/lib/libtorrent-rasterbar.so | grep wait_for_alert | c++filt":
Which is exactly the same error that passing
CPPFLAGS=-std=c++11should have fixed.Any ideas please? I can provide any logs and redo builds as requested.