qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.92k stars 3.88k forks source link

3.3.5, linux, gcc 5.4 #5391

Closed yuhas closed 8 years ago

yuhas commented 8 years ago

Don't build(compiling) with librorren-rastebar 1.1.0 !!!!

compiling moc_cookiesdialog.cpp
linking qbittorrent
session.o: In function `BitTorrent::Session::getPendingAlerts(std::vector<libtorrent::alert*, std::allocator<libtorrent::alert*> >&, unsigned long)':
/files/yuha/qbittorrent-3.3.5/src/base/bittorrent/session.cpp:2347: undefined reference to `libtorrent::session_handle::wait_for_alert(std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >)'
yuhas commented 8 years ago

with librorren-rastebar 1.0.9 - no problem)

zeule commented 8 years ago

Please take a look at #5265.

sledgehammer999 commented 8 years ago

Short story: Libtorrent is being built without c++11 and uses boost::chrono while qbittorrent is being built as c++11 and sees the c++11 version of the libtorrent functions in the libtorrent headers which use std::chrono (aka a different signature). So the linker can't find the c++11 function in the libtorrent lib which contains the non-c++11 ones. So just rebuild 1.1.0 and enable c++11 too.

movalex commented 7 years ago

I'm trying to build qbittorrent-nox (with --disable-gui option) on Mac, currently with no success. Would you please explain what should I change to enable c++11 for libtorrent? The error is following:

linking qbittorrent-nox.app/Contents/MacOS/qbittorrent-nox
Undefined symbols for architecture x86_64: 
"libtorrent::session_handle::wait_for_alert(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >)", referenced from:
BitTorrent::Session::saveResumeData() in session.o
BitTorrent::Session::getPendingAlerts(std::__1::vector<libtorrent::alert*,
std::__1::allocator<libtorrent::alert*> >&, unsigned long) in session.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [qbittorrent-nox.app/Contents/MacOS/qbittorrent-nox] Error 1
make: *** [sub-src-make_first] Error 2