Page 1 of 1

make error v3.1.10

Posted: Sun Oct 19, 2014 10:02 am
by Phil-T
Hi,

I'm trying to build Qbittorrent (v3.1.10) in scratchbox (qemu) to run on a Nokia N810 internet tablet (Maemo Diablo) This is based on Debian/Gnome.

I have built the boost libraries (v1.42.0) libtorrent-rasterbar (v0.15.5) and qt (v4.8.4)

Configure runs without error but when I run make I get the following:

g++ -c -pipe -Wformat -Wformat-security -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG_OUTPUT -DVERSION=\"v3.1.10\" -DVERSION_MAJOR=3 -DVERSION_MINOR=1 -DVERSION_BUGFIX=10 -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DBOOST_FILESYSTEM_VERSION=2 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/DIABLO_ARMEL/usr/share/qt4/mkspecs/linux-g++ -I. -I/targets/DIABLO_ARMEL/usr/include/qt4/QtCore -I/targets/DIABLO_ARMEL/usr/include/qt4/QtNetwork -I/targets/DIABLO_ARMEL/usr/include/qt4/QtGui -I/targets/DIABLO_ARMEL/usr/include/qt4/QtXml -I/targets/DIABLO_ARMEL/usr/include/qt4/QtDBus -I/targets/DIABLO_ARMEL/usr/include/qt4 -I/targets/DIABLO_ARMEL/usr/include/libtorrent -I/targets/DIABLO_ARMEL/usr/include -Iqtnotify -I. -Iqtsingleapp -Iqtlibtorrent -Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I. -I. -o torrentcreatordlg.o torrentcreator/torrentcreatordlg.cpp
torrentcreator/torrentcreatordlg.cpp: In member function `void TorrentCreatorDlg::updateOptimalPieceSize()':
torrentcreator/torrentcreatordlg.cpp:234: warning: converting to `qulonglong' from `double'
g++ -c -pipe -Wformat -Wformat-security -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG_OUTPUT -DVERSION=\"v3.1.10\" -DVERSION_MAJOR=3 -DVERSION_MINOR=1 -DVERSION_BUGFIX=10 -DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DBOOST_FILESYSTEM_VERSION=2 -DQT_NO_DEBUG -DQT_DBUS_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/DIABLO_ARMEL/usr/share/qt4/mkspecs/linux-g++ -I. -I/targets/DIABLO_ARMEL/usr/include/qt4/QtCore -I/targets/DIABLO_ARMEL/usr/include/qt4/QtNetwork -I/targets/DIABLO_ARMEL/usr/include/qt4/QtGui -I/targets/DIABLO_ARMEL/usr/include/qt4/QtXml -I/targets/DIABLO_ARMEL/usr/include/qt4/QtDBus -I/targets/DIABLO_ARMEL/usr/include/qt4 -I/targets/DIABLO_ARMEL/usr/include/libtorrent -I/targets/DIABLO_ARMEL/usr/include -Iqtnotify -I. -Iqtsingleapp -Iqtlibtorrent -Iwebui -Iwebui/qjson -Itracker -Ipreferences -Ilineedit/src -Iproperties -Isearchengine -Irss -Itorrentcreator -Igeoip -Ipowermanagement -I. -I. -o torrentcreatorthread.o torrentcreator/torrentcreatorthread.cpp
torrentcreator/torrentcreatorthread.cpp: In member function `virtual void TorrentCreatorThread::run()':
torrentcreator/torrentcreatorthread.cpp:133: error: call of overloaded `bind(void (*)(int, int, TorrentCreatorThread*), boost::arg<1> (&)(), int, TorrentCreatorThread* const)' is ambiguous
/usr/include/boost/bind/bind.hpp:1323: note: candidates are: boost::_bi::bind_t<R, F, typename boost::_bi::list_av_3<A1, A2, A3>::type> boost::bind(F, A1, A2, A3) [with R = void, F = void (*)(int, int, TorrentCreatorThread*), A1 = boost::arg<1> (*)(), A2 = int, A3 = TorrentCreatorThread*]
/usr/include/boost/bind/bind_cc.hpp:47: note:                boost::_bi::bind_t<R, R (*)(B1, B2, B3), typename boost::_bi::list_av_3<A1, A2, A3>::type> boost::bind(R (*)(B1, B2, B3), A1, A2, A3) [with R = void, B1 = int, B2 = int, B3 = TorrentCreatorThread*, A1 = boost::arg<1> (*)(), A2 = int, A3 = TorrentCreatorThread*]
make[1]: *** [torrentcreatorthread.o] Error 1
make[1]: Leaving directory `/home/phil/source_extracted/qbittorrent-3.1.10/src'
make: *** [sub-src-make_default] Error 2

Hope somebody can help :)

Re: make error v3.1.10

Posted: Sun Oct 19, 2014 1:41 pm
by sledgehammer_999
Can you try with a more recent boost version?

Re: make error v3.1.10

Posted: Sun Oct 19, 2014 8:48 pm
by Phil-T
Hi,

Thankyou for your time.

I have just built boost 1_56 and tried to build qbittorrent again, now I get this make error:

In file included from /usr/include/boost/filesystem/path.hpp:24,
                from /usr/include/libtorrent/torrent_info.hpp:45,
                from ./misc.h:35,
                from ./filesystemwatcher.h:25,
                from qtlibtorrent/qbtsession.cpp:40:
/usr/include/boost/filesystem/config.hpp:16:5: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
In file included from /usr/include/libtorrent/torrent_info.hpp:61,
                from ./misc.h:35,
                from ./filesystemwatcher.h:25,
                from qtlibtorrent/qbtsession.cpp:40:
/usr/include/libtorrent/file_storage.hpp:110: error: `void libtorrent::file_storage::add_file(const boost::filesystem::wpath&, libtorrent::size_type, int, time_t, const boost::filesystem::path&)' and `void libtorrent::file_storage::add_file(const boost::filesystem::path&, libtorrent::size_type, int, time_t, const boost::filesystem::path&)' cannot be overloaded
In file included from ./misc.h:35,
                from ./filesystemwatcher.h:25,
                from qtlibtorrent/qbtsession.cpp:40:
/usr/include/libtorrent/torrent_info.hpp:195: error: `libtorrent::torrent_info::torrent_info(const boost::filesystem::wpath&)' and `libtorrent::torrent_info::torrent_info(const boost::filesystem::path&)' cannot be overloaded
/usr/include/libtorrent/torrent_info.hpp:204: error: `libtorrent::torrent_info::torrent_info(const boost::filesystem::wpath&, boost::system::error_code&)' and `libtorrent::torrent_info::torrent_info(const boost::filesystem::path&, boost::system::error_code&)' cannot be overloaded
In file included from ./misc.h:36,
                from ./filesystemwatcher.h:25,
                from qtlibtorrent/qbtsession.cpp:40:
/usr/include/libtorrent/torrent_handle.hpp:581: error: `void libtorrent::torrent_handle::move_storage(const boost::filesystem::wpath&) const' and `void libtorrent::torrent_handle::move_storage(const boost::filesystem::path&) const' cannot be overloaded
/usr/include/libtorrent/torrent_handle.hpp:582: error: `void libtorrent::torrent_handle::rename_file(int, const boost::filesystem::wpath&) const' and `void libtorrent::torrent_handle::rename_file(int, const boost::filesystem::path&) const' cannot be overloaded
qtlibtorrent/qbtsession.cpp: In constructor `QBtSession::QBtSession()':
qtlibtorrent/qbtsession.cpp:126: error: `default_name_check' is not a member of `boost::filesystem::path'
qtlibtorrent/qbtsession.cpp:126: error: `no_check' is not a member of `boost::filesystem'
qtlibtorrent/qbtsession.cpp: In member function `void QBtSession::setProxySettings(libtorrent::proxy_settings)':
qtlibtorrent/qbtsession.cpp:2190: warning: `set_tracker_proxy' is deprecated (declared at /usr/include/libtorrent/session.hpp:412)
qtlibtorrent/qbtsession.cpp:2194: warning: `set_peer_proxy' is deprecated (declared at /usr/include/libtorrent/session.hpp:408)
qtlibtorrent/qbtsession.cpp:2195: warning: `set_web_seed_proxy' is deprecated (declared at /usr/include/libtorrent/session.hpp:410)
qtlibtorrent/qbtsession.cpp:2196: warning: `set_dht_proxy' is deprecated (declared at /usr/include/libtorrent/session.hpp:423)
/usr/include/boost/exception/detail/clone_current_exception.hpp: At global scope:
/usr/include/boost/exception/detail/clone_current_exception.hpp:43: warning: unused parameter 'cloned'
make[1]: *** [qbtsession.o] Error 1
make[1]: Leaving directory `/home/phil/source_extracted/qbittorrent-3.1.10/src'
make: *** [sub-src-make_default] Error 2

Re: make error v3.1.10

Posted: Sun Oct 19, 2014 10:08 pm
by sledgehammer_999
boost.filesystem is needed by libtorrent 0.15.x (0.16.x and later doesn't need it). However Boost.Filesystem had a major restrucure that wasn't compatible with the previous version(2) and was named version 3. For a while boost.filesystem supported both versions. But version 2 was removed after boost 1.49. So you should either rebuilt using boost 1.49 or use libtorrent 0.16.
The version used is controled by a define named `BOOST_FILESYSTEM_VERSION` which is set by qbt to '2'. Thus newer boost.filesystem report an error if it isn't defined to '3'.

Re: make error v3.1.10

Posted: Sun Oct 19, 2014 10:17 pm
by Phil-T
ahh, that explains a few things  :)

I'll dig out libtorrent 0.16.0 and try again. If that fails then I'll grab a copy of boost 1.49.0

Thanks for your help.

Re: make error v3.1.10

Posted: Sun Oct 19, 2014 10:43 pm
by Phil-T
:( I am now back to the error in my first post, this is with boost 1_56 and libtorrent 0.16.0

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 12:14 am
by sledgehammer_999
Can you post the error on pastebin so it keeps its format?
Also from first glace, I can't see something obviously wrong with that line of code.
Btw, this code builds fine under Windows(msvc2010, gcc 4.8, gcc 4.9) and linux (various versions of gcc), mac os x. I don't know why your system chokes on it. That particular line hasn't changed for ages now.

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 7:26 pm
by Phil-T
pastebin.com/VrvwttiN

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 8:25 pm
by sledgehammer_999
In src/torrentcreator/torrentcreatorthread.cpp line 133
try replacing

Code: Select all

set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this));
with

Code: Select all

set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind<void>(sendProgressUpdateSignal, _1, t.num_pieces(), this));
If that fails try:

Code: Select all

set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind(boost::type<void>(), &sendProgressUpdateSignal, _1, t.num_pieces(), this));
Also what is the version of gcc you are using?

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 8:36 pm
by sledgehammer_999
According to the boost.bind docs the following should be the recommended way to call/use bind. Can you try it too, regardless of the above?

Code: Select all

set_piece_hashes(t, parent_path.toUtf8().constData(), boost::bind(sendProgressUpdateSignal, _1, t.num_pieces(), this));

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 10:31 pm
by Phil-T
Success! :D

The fist edit didn't work, but the second and third edits both allowed for a successful build

bash-2.05b$ gcc --version
sbox-arm-linux-gcc (GCC) 3.4.4 (release) (CodeSourcery ARM 2005q3-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Many thanks for your help.

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 10:34 pm
by sledgehammer_999
I am pretty sure that the problem stemmed from that old version of gcc.
I am going to replace the bind() with the third edit for future releases.
I am glad that you were able to compile successfully.

Re: make error v3.1.10

Posted: Mon Oct 20, 2014 10:39 pm
by Phil-T
I think you're probably right, unfortunately I don't think I am able to upgrade it. Nokia abandoned it a long time ago :(