Compilation error for v3.1.11 (on debian) #2016

Closed
opened 2026-02-21 15:58:55 -05:00 by deekerman · 13 comments
Owner

Originally created by @ramislebob on GitHub (Jan 10, 2015).

Hi guys,
as I have issues with my old version, I tried to compile the latest release and I'm getting a compilation error.
Anybody got this?

bob@micro:/Downloads/qbittorrent-3.1.11$ make
cd src/ && make -f Makefile
make[1]: Entering directory /home/bossboss/Downloads/qbittorrent-3.1.11/src' g++ -c -pipe -Wformat -Wformat-security -O2 -D_REENTRANT -Wall -W -DQT_WEBKIT -DQT_NO_DEBUG_OUTPUT -DVERSION=\"v3.1.11\" -DVERSION_MAJOR=3 -DVERSION_MINOR=1 -DVERSION_BUGFIX=11 -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DBOOST_FILESYSTEM_VERSION=2 -DTORRENT_USE_OPENSSL -DWITH_SHIPPED_GEOIP_H -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -DTORRENT_LINKING_SHARED -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -I/usr/local/include -I/usr/local/include/libtorrent -I/usr/include -Iqtnotify -I. -Iqtsingleapp -Iqtlibtorrent -Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I. -I. -o qbtsession.o qtlibtorrent/qbtsession.cpp In file included from ./filesystemwatcher.h:25:0, from qtlibtorrent/qbtsession.cpp:40: ./misc.h: In function ‘QString misc::toQString(const libtorrent::sha1_hash&)’: ./misc.h:74:67: error: ‘to_hex’ was not declared in this scope ./misc.h:74:67: note: suggested alternative: In file included from /usr/local/include/libtorrent/sha1_hash.hpp:45:0, from /usr/local/include/libtorrent/peer_id.hpp:37, from /usr/local/include/libtorrent/torrent_info.hpp:53, from ./misc.h:35, from ./filesystemwatcher.h:25, from qtlibtorrent/qbtsession.cpp:40: /usr/local/include/libtorrent/escape_string.hpp:85:22: note: ‘libtorrent::to_hex’ In file included from qtlibtorrent/qbtsession.cpp:42:0: qtlibtorrent/qbtsession.h: At global scope: qtlibtorrent/qbtsession.h:284:3: error: ‘upnp’ in namespace ‘libtorrent’ does not name a type qtlibtorrent/qbtsession.h:285:3: error: ‘natpmp’ in namespace ‘libtorrent’ does not name a type qtlibtorrent/qbtsession.cpp: In constructor ‘QBtSession::QBtSession()’: qtlibtorrent/qbtsession.cpp:118:5: error: class ‘QBtSession’ does not have any field named ‘m_upnp’ qtlibtorrent/qbtsession.cpp:118:16: error: class ‘QBtSession’ does not have any field named ‘m_natpmp’ qtlibtorrent/qbtsession.cpp: In member function ‘QTorrentHandle QBtSession::addMagnetUri(QString, bool, bool, const QString&)’: qtlibtorrent/qbtsession.cpp:1030:71: warning: ‘libtorrent::torrent_handle libtorrent::add_magnet_uri(libtorrent::session&, const string&, libtorrent::add_torrent_params)’ is deprecated (declared at /usr/local/include/libtorrent/magnet_uri.hpp:67) [-Wdeprecated-declarations] qtlibtorrent/qbtsession.cpp: In member function ‘QTorrentHandle QBtSession::addTorrent(QString, bool, QString, bool, bool)’: qtlibtorrent/qbtsession.cpp:1184:24: error: no match for ‘operator=’ in ‘p.libtorrent::add_torrent_params::resume_data = & buf’ qtlibtorrent/qbtsession.cpp:1184:24: note: candidate is: In file included from /usr/include/c++/4.7/vector:70:0, from /usr/local/include/libtorrent/torrent_info.hpp:37, from ./misc.h:35, from ./filesystemwatcher.h:25, from qtlibtorrent/qbtsession.cpp:40: /usr/include/c++/4.7/bits/vector.tcc:161:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>] /usr/include/c++/4.7/bits/vector.tcc:161:5: note: no known conversion for argument 1 from ‘std::vector<char>*’ to ‘const std::vector<char>&’ qtlibtorrent/qbtsession.cpp: In member function ‘void QBtSession::enableUPnP(bool)’: qtlibtorrent/qbtsession.cpp:1556:10: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1559:7: error: ‘m_natpmp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1564:7: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1565:7: error: ‘m_natpmp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1568:9: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1573:7: error: ‘m_natpmp’ was not declared in this scope make[1]: *** [qbtsession.o] Error 1 make[1]: Leaving directory/home/bossboss/Downloads/qbittorrent-3.1.11/src'
make: *** [sub-src-make_default] Error 2
bob@micro:
/Downloads/qbittorrent-3.1.11$

I'm running debian 7 wheezy.
QT version is:
Package: libqt4-dev
State: installed
Automatically installed: no
Version: 4:4.8.2+dfsg-11

Originally created by @ramislebob on GitHub (Jan 10, 2015). Hi guys, as I have issues with my old version, I tried to compile the latest release and I'm getting a compilation error. Anybody got this? bob@micro:~/Downloads/qbittorrent-3.1.11$ make cd src/ && make -f Makefile make[1]: Entering directory `/home/bossboss/Downloads/qbittorrent-3.1.11/src' g++ -c -pipe -Wformat -Wformat-security -O2 -D_REENTRANT -Wall -W -DQT_WEBKIT -DQT_NO_DEBUG_OUTPUT -DVERSION=\"v3.1.11\" -DVERSION_MAJOR=3 -DVERSION_MINOR=1 -DVERSION_BUGFIX=11 -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DBOOST_FILESYSTEM_VERSION=2 -DTORRENT_USE_OPENSSL -DWITH_SHIPPED_GEOIP_H -DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -DBOOST_EXCEPTION_DISABLE -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_DYN_LINK -DTORRENT_LINKING_SHARED -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtDBus -I/usr/include/qt4 -I/usr/local/include -I/usr/local/include/libtorrent -I/usr/include -Iqtnotify -I. -Iqtsingleapp -Iqtlibtorrent -Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I. -I. -o qbtsession.o qtlibtorrent/qbtsession.cpp In file included from ./filesystemwatcher.h:25:0, from qtlibtorrent/qbtsession.cpp:40: ./misc.h: In function ‘QString misc::toQString(const libtorrent::sha1_hash&)’: ./misc.h:74:67: error: ‘to_hex’ was not declared in this scope ./misc.h:74:67: note: suggested alternative: In file included from /usr/local/include/libtorrent/sha1_hash.hpp:45:0, from /usr/local/include/libtorrent/peer_id.hpp:37, from /usr/local/include/libtorrent/torrent_info.hpp:53, from ./misc.h:35, from ./filesystemwatcher.h:25, from qtlibtorrent/qbtsession.cpp:40: /usr/local/include/libtorrent/escape_string.hpp:85:22: note: ‘libtorrent::to_hex’ In file included from qtlibtorrent/qbtsession.cpp:42:0: qtlibtorrent/qbtsession.h: At global scope: qtlibtorrent/qbtsession.h:284:3: error: ‘upnp’ in namespace ‘libtorrent’ does not name a type qtlibtorrent/qbtsession.h:285:3: error: ‘natpmp’ in namespace ‘libtorrent’ does not name a type qtlibtorrent/qbtsession.cpp: In constructor ‘QBtSession::QBtSession()’: qtlibtorrent/qbtsession.cpp:118:5: error: class ‘QBtSession’ does not have any field named ‘m_upnp’ qtlibtorrent/qbtsession.cpp:118:16: error: class ‘QBtSession’ does not have any field named ‘m_natpmp’ qtlibtorrent/qbtsession.cpp: In member function ‘QTorrentHandle QBtSession::addMagnetUri(QString, bool, bool, const QString&)’: qtlibtorrent/qbtsession.cpp:1030:71: warning: ‘libtorrent::torrent_handle libtorrent::add_magnet_uri(libtorrent::session&, const string&, libtorrent::add_torrent_params)’ is deprecated (declared at /usr/local/include/libtorrent/magnet_uri.hpp:67) [-Wdeprecated-declarations] qtlibtorrent/qbtsession.cpp: In member function ‘QTorrentHandle QBtSession::addTorrent(QString, bool, QString, bool, bool)’: qtlibtorrent/qbtsession.cpp:1184:24: error: no match for ‘operator=’ in ‘p.libtorrent::add_torrent_params::resume_data = & buf’ qtlibtorrent/qbtsession.cpp:1184:24: note: candidate is: In file included from /usr/include/c++/4.7/vector:70:0, from /usr/local/include/libtorrent/torrent_info.hpp:37, from ./misc.h:35, from ./filesystemwatcher.h:25, from qtlibtorrent/qbtsession.cpp:40: /usr/include/c++/4.7/bits/vector.tcc:161:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>] /usr/include/c++/4.7/bits/vector.tcc:161:5: note: no known conversion for argument 1 from ‘std::vector<char>*’ to ‘const std::vector<char>&’ qtlibtorrent/qbtsession.cpp: In member function ‘void QBtSession::enableUPnP(bool)’: qtlibtorrent/qbtsession.cpp:1556:10: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1559:7: error: ‘m_natpmp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1564:7: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1565:7: error: ‘m_natpmp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1568:9: error: ‘m_upnp’ was not declared in this scope qtlibtorrent/qbtsession.cpp:1573:7: error: ‘m_natpmp’ was not declared in this scope make[1]: *** [qbtsession.o] Error 1 make[1]: Leaving directory`/home/bossboss/Downloads/qbittorrent-3.1.11/src' make: **\* [sub-src-make_default] Error 2 bob@micro:~/Downloads/qbittorrent-3.1.11$ I'm running debian 7 wheezy. QT version is: Package: libqt4-dev State: installed Automatically installed: no Version: 4:4.8.2+dfsg-11
Author
Owner

@surfernsk commented on GitHub (Jan 10, 2015):

libtorrent version?

use https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software

or
use debuild (https://www.debian.org/doc/manuals/maint-guide/build.en.html)
files that you need:
https://launchpad.net/surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11-0ubuntu1trusty.debian.tar.gz
https://launchpad.net/surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11-0ubuntu1trusty.dsc
https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11.orig.tar.xz

@surfernsk commented on GitHub (Jan 10, 2015): libtorrent version? use https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software or use debuild (https://www.debian.org/doc/manuals/maint-guide/build.en.html) files that you need: https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11-0ubuntu1~trusty.debian.tar.gz https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11-0ubuntu1~trusty.dsc https://launchpad.net/~surfernsk/+archive/ubuntu/internet-software/+files/qbittorrent_3.1.11.orig.tar.xz
Author
Owner

@ramislebob commented on GitHub (Jan 10, 2015):

last version of libtorrent: libtorrent-rasterbar-1.0.3 from http://www.libtorrent.net
I'm on debian so I need a deb package. Probably ubuntu or debian testing would have some issues with some dependancy package. So I think best way would be to compile it myself.

@ramislebob commented on GitHub (Jan 10, 2015): last version of libtorrent: libtorrent-rasterbar-1.0.3 from http://www.libtorrent.net I'm on debian so I need a deb package. Probably ubuntu or debian testing would have some issues with some dependancy package. So I think best way would be to compile it myself.
Author
Owner

@sledgehammer999 commented on GitHub (Jan 10, 2015):

Those errors appear usually when you are compiling with libtorrent 1.0.x. The qbt v3.1.x series don't support that. Only libtorrent 0.16.x (and 0.15.x).
You can use qbt git master (v3.2.0 alpha) to build against libtorrent 1.0.x.

@sledgehammer999 commented on GitHub (Jan 10, 2015): Those errors appear usually when you are compiling with libtorrent 1.0.x. The qbt v3.1.x series don't support that. Only libtorrent 0.16.x (and 0.15.x). You can use qbt git master (v3.2.0 alpha) to build against libtorrent 1.0.x.
Author
Owner

@sledgehammer999 commented on GitHub (Jan 10, 2015):

Oh and if you are going to compile with 0.16.19 you should use the last 2 commit from the git v3_1_x branch. That version was released after v3.1.11.
(and maybe 0.16.18 has the same issue)

@sledgehammer999 commented on GitHub (Jan 10, 2015): Oh and if you are going to compile with 0.16.19 you should use the last 2 commit from the git v3_1_x branch. That version was released after v3.1.11. (and maybe 0.16.18 has the same issue)
Author
Owner

@pmzqla commented on GitHub (Jan 10, 2015):

@ramislebob You could download the debs manually from sid. Installing debs manually should not cause a dependecy hell, as long as you stick with few packages.
Download these from sid (i386, right?): libtorrent-rasterbar7, qbittorrent

Install them:
# dpkg -i qbittorrent_3.1.11-1_i386.deb libtorrent-rasterbar7_0.16.18-1_i386.deb
If dpkg complains, then there are some unsatisfied dependencies and you should take more from sid. In this case I think it's better for you to compile qBittorrent and libtorrent, unless you know how to deal with the dependencies. In any case, if dpkg fails, run
# apt-get -f install
which fixes broken the dependencies (here cause by dpkg).

Note: If you have other torrent clients using libtorrent-rasterbar, there might be some conflicts (e.g Deluge).

@pmzqla commented on GitHub (Jan 10, 2015): @ramislebob You could download the debs manually from sid. Installing debs manually should not cause a dependecy hell, as long as you stick with few packages. Download these from sid (i386, right?): <a href="https://packages.debian.org/sid/i386/libtorrent-rasterbar7/download">libtorrent-rasterbar7</a>, <a href="https://packages.debian.org/sid/i386/qbittorrent/download">qbittorrent</a> Install them: `# dpkg -i qbittorrent_3.1.11-1_i386.deb libtorrent-rasterbar7_0.16.18-1_i386.deb` If dpkg complains, then there are some unsatisfied dependencies and you should take more from sid. In this case I think it's better for you to compile qBittorrent and libtorrent, unless you know how to deal with the dependencies. In any case, if dpkg fails, run `# apt-get -f install` which fixes broken the dependencies (here cause by dpkg). Note: If you have other torrent clients using libtorrent-rasterbar, there might be some conflicts (e.g Deluge).
Author
Owner

@sledgehammer999 commented on GitHub (Jan 10, 2015):

Or to avoid taking too much from sid/testing you should download the debian source packages for qbittorrent and libtorrent-rasterbar7 and build them locally. -those are 3 files usually per package-.
Look at the right under "Download Source Package qbittorrent:" ->https://packages.debian.org/sid/qbittorrent

@sledgehammer999 commented on GitHub (Jan 10, 2015): Or to avoid taking too much from sid/testing you should download the debian source packages for qbittorrent and libtorrent-rasterbar7 and build them locally. -those are 3 files usually per package-. Look at the right under "Download Source Package qbittorrent:" ->https://packages.debian.org/sid/qbittorrent
Author
Owner

@sledgehammer999 commented on GitHub (Jan 10, 2015):

https://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html

@sledgehammer999 commented on GitHub (Jan 10, 2015): https://www.debian.org/doc/manuals/apt-howto/ch-sourcehandling.en.html
Author
Owner

@pmzqla commented on GitHub (Jan 10, 2015):

Oh, it might not be clear from my previous post, but apt-get -f install fixes the dependencies by restoring qbittorrent and libtorrent-rasterbar7 to Wheezy's version (unless you added sid repos to the sources.list, which I doubt you did). Then you can proceed as sledgehammer suggested and build the packages manually.

@pmzqla commented on GitHub (Jan 10, 2015): Oh, it might not be clear from my previous post, but `apt-get -f install` fixes the dependencies by restoring qbittorrent and libtorrent-rasterbar7 to Wheezy's version (unless you added sid repos to the sources.list, which I doubt you did). Then you can proceed as sledgehammer suggested and build the packages manually.
Author
Owner

@ramislebob commented on GitHub (Jan 10, 2015):

@sledgehammer999: thanks for this. I've uninstalled the latest version of libtorrent that I compiled and instead installed the one directly included in debian wheezy:
root@micro:/home/bossboss/Downloads/qbittorrent-3.1.11# aptitude show libtorrent-rasterbar-dev
Package: libtorrent-rasterbar-dev
State: installed
Automatically installed: no
Version: 0.15.10-1+b1

I've then recompiled qbt v3.1.11 and it builded fine. It seems also to work fine.
I prefer to use this version rather than an alpha as it is the laptop of a non geek friend so stable is better.

I think you should update the INSTALL file (https://github.com/qbittorrent/qBittorrent/blob/master/INSTALL) to state that the version shouldn't be the latest one...
It took me like 1h to compile the latest sources from the website indicated as I thought it would be better than the old version available in my distribution.

@pmzqla : there are a lot of dependency for qbt so I didn't want to check all of them and make sure the wheezy versions were ok.
Moreover I always find cleaner to just compile myself the softs I need that are not directly in my distro.

Thanks a lot guys for your quick replies, that's really great!
All good now :)

@ramislebob commented on GitHub (Jan 10, 2015): @sledgehammer999: thanks for this. I've uninstalled the latest version of libtorrent that I compiled and instead installed the one directly included in debian wheezy: root@micro:/home/bossboss/Downloads/qbittorrent-3.1.11# aptitude show libtorrent-rasterbar-dev Package: libtorrent-rasterbar-dev State: installed Automatically installed: no Version: 0.15.10-1+b1 I've then recompiled qbt v3.1.11 and it builded fine. It seems also to work fine. I prefer to use this version rather than an alpha as it is the laptop of a non geek friend so stable is better. I think you should update the INSTALL file (https://github.com/qbittorrent/qBittorrent/blob/master/INSTALL) to state that the version shouldn't be the latest one... It took me like 1h to compile the latest sources from the website indicated as I thought it would be better than the old version available in my distribution. @pmzqla : there are a lot of dependency for qbt so I didn't want to check all of them and make sure the wheezy versions were ok. Moreover I always find cleaner to just compile myself the softs I need that are not directly in my distro. Thanks a lot guys for your quick replies, that's really great! All good now :)
Author
Owner

@sledgehammer999 commented on GitHub (Jan 11, 2015):

@ramislebob the v3.1.x series have ended. I am not going to update that.
However, you should use 0.16.x instead. 0.15.x is very old and doesn't support μTP.
Moreover it has a bug that keeps crashing qbt at random when encryption is used.
So it is better to grab the debian source package for 0.16.18 and build it locally. Then rebuild qbt using 0.16.18's -dev package.
All other dependencies can be satisfied by what Wheezy has.
About the crashes see the #750 mega-thread.

@sledgehammer999 commented on GitHub (Jan 11, 2015): @ramislebob the v3.1.x series have ended. I am not going to update that. However, you should use 0.16.x instead. 0.15.x is very old and doesn't support μTP. Moreover it has a bug that keeps crashing qbt at random when encryption is used. So it is better to grab the debian source package for 0.16.18 and build it locally. Then rebuild qbt using 0.16.18's -dev package. All other dependencies can be satisfied by what Wheezy has. About the crashes see the #750 mega-thread.
Author
Owner

@ramislebob commented on GitHub (Jan 11, 2015):

alright I think I'll take libtorrent-rasterbar-0.16.19 from libtorrent website.
you mentioned I need to take the last commits on qbt 3.1.11.
I'm not familiar with git, how do I checkout 3.1.11? I first need to clone the repository?
Is it possible to just get a patch containing the last commits that are not included in the released version? (I'd be interested to know the commands if possible)
Thanks for your help :)

@ramislebob commented on GitHub (Jan 11, 2015): alright I think I'll take libtorrent-rasterbar-0.16.19 from libtorrent website. you mentioned I need to take the last commits on qbt 3.1.11. I'm not familiar with git, how do I checkout 3.1.11? I first need to clone the repository? Is it possible to just get a patch containing the last commits that are not included in the released version? (I'd be interested to know the commands if possible) Thanks for your help :)
Author
Owner

@sledgehammer999 commented on GitHub (Jan 11, 2015):

Click "Download ZIP" after you change to the v3_1_x branch on github. Or use this URL: https://github.com/qbittorrent/qBittorrent/archive/v3_1_x.zip
It will contain the code as is in the last commit.

@sledgehammer999 commented on GitHub (Jan 11, 2015): Click "Download ZIP" after you change to the v3_1_x branch on github. Or use this URL: https://github.com/qbittorrent/qBittorrent/archive/v3_1_x.zip It will contain the code as is in the last commit.
Author
Owner

@ramislebob commented on GitHub (Jan 11, 2015):

ok cheers, I took this one.

@ramislebob commented on GitHub (Jan 11, 2015): ok cheers, I took this one.
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#2016
No description provided.