can't build 4.0.3 and 4.0.4, error in use of libtorrent::session::wait_for_alert #6877

Closed
opened 2026-02-21 18:39:49 -05:00 by deekerman · 7 comments
Owner

Originally created by @yurytch on GitHub (Feb 13, 2018).

qBittorrent version and Operating System

4.0.3 ; kernel 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 AMD FX(tm)-4300 Quad-Core Processor AuthenticAMD GNU/Linux

If on linux, libtorrent and Qt version

libtorrent-rasterbar-1.1.6 qt5-5.7.1 boost-1.59.0

What is the problem

Can't build qbittorrent, am getting this:
...
compiling base/bittorrent/session.cpp
base/bittorrent/session.cpp: In member function ‘void BitTorrent::Session::getPendingAlerts(std::vectorlibtorrent::alert*&, ulong)’:
base/bittorrent/session.cpp:3858:45: error: no matching function for call to ‘libtorrent::session::wait_for_alert(ulong&)’
m_nativeSession->wait_for_alert(time);
^
In file included from /usr/local/include/libtorrent/session.hpp:53:0,
from base/bittorrent/session.cpp:67:
/usr/local/include/libtorrent/session_handle.hpp:974:10: note: candidate: libtorrent::alert* libtorrent::session_handle::wait_for_alert(libtorrent::time_duration)
alert* wait_for_alert(time_duration max_wait);
^
/usr/local/include/libtorrent/session_handle.hpp:974:10: note: no known conversion for argument 1 from ‘ulong {aka long unsigned int}’ to ‘libtorrent::time_duration {aka std::chrono::duration<long int, std::ratio<1l, 1000000000l> >}’
Makefile:2899: recipe for target 'session.o' failed

What is the expected behavior

Completion of build

Steps to reproduce

./configure --prefix=/usr --libdir=/usr/lib64
make

Originally created by @yurytch on GitHub (Feb 13, 2018). ### qBittorrent version and Operating System 4.0.3 ; kernel 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 AMD FX(tm)-4300 Quad-Core Processor AuthenticAMD GNU/Linux ### If on linux, libtorrent and Qt version libtorrent-rasterbar-1.1.6 qt5-5.7.1 boost-1.59.0 ### What is the problem Can't build qbittorrent, am getting this: ... compiling base/bittorrent/session.cpp base/bittorrent/session.cpp: In member function ‘void BitTorrent::Session::getPendingAlerts(std::vector<libtorrent::alert*>&, ulong)’: base/bittorrent/session.cpp:3858:45: error: no matching function for call to ‘libtorrent::session::wait_for_alert(ulong&)’ m_nativeSession->wait_for_alert(time); ^ In file included from /usr/local/include/libtorrent/session.hpp:53:0, from base/bittorrent/session.cpp:67: /usr/local/include/libtorrent/session_handle.hpp:974:10: note: candidate: libtorrent::alert* libtorrent::session_handle::wait_for_alert(libtorrent::time_duration) alert* wait_for_alert(time_duration max_wait); ^ /usr/local/include/libtorrent/session_handle.hpp:974:10: note: no known conversion for argument 1 from ‘ulong {aka long unsigned int}’ to ‘libtorrent::time_duration {aka std::chrono::duration<long int, std::ratio<1l, 1000000000l> >}’ Makefile:2899: recipe for target 'session.o' failed ### What is the expected behavior Completion of build ### Steps to reproduce ./configure --prefix=/usr --libdir=/usr/lib64 make
deekerman 2026-02-21 18:39:49 -05:00
Author
Owner

@yurytch commented on GitHub (Feb 19, 2018):

Same issue with 4.0.4:
4.0.4 ; kernel 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 AMD FX(tm)-4300 Quad-Core Processor AuthenticAMD GNU/Linux:

linking qbittorrent
session.o: In function BitTorrent::Session::getPendingAlerts(std::vector<libtorrent::alert*, std::allocator<libtorrent::alert*> >&, unsigned long)': /home/ty/c/+inet.torr/qbittorrent-4.0.4/src/base/bittorrent/session.cpp:3854: undefined reference to libtorrent::session_handle::wait_for_alert(std::chrono::duration<long, std::ratio<1l, 1000000000l> >)'

@yurytch commented on GitHub (Feb 19, 2018): Same issue with 4.0.4: 4.0.4 ; kernel 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 AMD FX(tm)-4300 Quad-Core Processor AuthenticAMD GNU/Linux: linking qbittorrent session.o: In function `BitTorrent::Session::getPendingAlerts(std::vector<libtorrent::alert*, std::allocator<libtorrent::alert*> >&, unsigned long)': /home/ty/c/+inet.torr/qbittorrent-4.0.4/src/base/bittorrent/session.cpp:3854: undefined reference to `libtorrent::session_handle::wait_for_alert(std::chrono::duration<long, std::ratio<1l, 1000000000l> >)'
Author
Owner

@liuhaijian commented on GitHub (Mar 8, 2018):

@yurytch Have you got problem solved? I ran into the same issue with 4.0.4 too.
Operating System:
Linux VM_0_6_centos 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@liuhaijian commented on GitHub (Mar 8, 2018): @yurytch Have you got problem solved? I ran into the same issue with 4.0.4 too. Operating System: Linux VM_0_6_centos 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Author
Owner

@yurytch commented on GitHub (Mar 8, 2018):

Nope...

@yurytch commented on GitHub (Mar 8, 2018): Nope...
Author
Owner

@liuhaijian commented on GitHub (Mar 16, 2018):

@yurytch i have found this article that provides a solution. As it says, you should add CXXFLAGS=-std=c++11 when install libtorrent-rasterbaer:
./configure --prefix=/usr --disable-gui CPPFLAGS=-I/usr/include/qt5 --with-libgeoip=system CXXFLAGS=-std=c++11
But on my machine the same error still came out with libtorrent 1.1.6. So i installed the 1.1.5 version instead, then i was able to install qbittorrent successfully.

@liuhaijian commented on GitHub (Mar 16, 2018): @yurytch i have found [this article](http://blog.csdn.net/lizerui30/article/details/72902722) that provides a solution. As it says, you should add CXXFLAGS=-std=c++11 when install libtorrent-rasterbaer: `./configure --prefix=/usr --disable-gui CPPFLAGS=-I/usr/include/qt5 --with-libgeoip=system CXXFLAGS=-std=c++11` But on my machine the same error still came out with libtorrent 1.1.6. So i installed the 1.1.5 version instead, then i was able to install qbittorrent successfully.
Author
Owner

@yurytch commented on GitHub (Mar 16, 2018):

As easy as that, eh? The CXXFLAGS didn't help me either, but rolling back to 1.1.5 did.
Capital, thank you very much.

@yurytch commented on GitHub (Mar 16, 2018): As easy as that, eh? The CXXFLAGS didn't help me either, but rolling back to 1.1.5 did. Capital, thank you very much.
Author
Owner

@trivialfis commented on GitHub (Apr 6, 2018):

I tried using libtorrent-rasterbar 1.1.5, but no luck.

@trivialfis commented on GitHub (Apr 6, 2018): I tried using libtorrent-rasterbar 1.1.5, but no luck.
Author
Owner

@FranciscoPombal commented on GitHub (Feb 19, 2020):

Cannot reproduce, problem is on your end.

@FranciscoPombal commented on GitHub (Feb 19, 2020): Cannot reproduce, problem is on your end.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#6877
No description provided.