jash-kothari-forks / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
0 stars 0 forks source link

Problem building with Boost 1.53 #417

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try building with boost 1.53

What is the expected output? What do you see instead?

msvc.link.dll 
bin\msvc-10.0\release\address-model-64\architecture-x86\encryption-openssl\geoip
-static\threading-multi\windows-version-vista\torrent.dll
   Creating library bin\msvc-10.0\release\address-model-64\architecture-x86\encryption-openssl\geoip-static\threading-multi\windows-version-vista\torrent.lib and object bin\msvc-10.0\release\address-model-64\architecture-x86\encryption-openssl\geoip-static\threading-multi\windows-version-vista\torrent.exp
connection_queue.obj : error LNK2001: unresolved external symbol "void * 
__cdecl boost::asio::asio_handler_allocate(unsigned __int64,...)" 
(?asio_handler_allocate@asio@boost@@YAPEAX_KZZ)
connection_queue.obj : error LNK2001: unresolved external symbol "void __cdecl 
boost::asio::asio_handler_deallocate(void *,unsigned __int64,...)" 
(?asio_handler_deallocate@asio@boost@@YAXPEAX_KZZ)
bin\msvc-10.0\release\address-model-64\architecture-x86\encryption-openssl\geoip
-static\threading-multi\windows-version-vista\torrent.dll : fatal error LNK1120:
 2 unresolved externals

What version of the product are you using? On what operating system?

libtorrent 0.16.7, Win7 x64 MSVC 2010, 64-bit build

Please provide any additional information below.

Probably introduced by https://svn.boost.org/trac/boost/ticket/7209

Original issue reported on code.google.com by Daymansm...@gmail.com on 4 Feb 2013 at 8:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
does this patch fix it?

Index: src/asio.cpp
===================================================================
--- src/asio.cpp        (revision 7982)
+++ src/asio.cpp        (working copy)
@@ -5,7 +5,7 @@
 #define BOOST_ASIO_SOURCE
 #endif

-#if _MSC_VER > 1310 && defined TORRENT_NO_BOOST_DATE_TIME
+#if 0 // _MSC_VER > 1310 && defined TORRENT_NO_BOOST_DATE_TIME

 // on windows; including timer_queue.hpp results in an
 // actual link-time dependency on boost.date_time, even

i.e. just remove the special case for msvc

Original comment by arvid.no...@gmail.com on 6 Feb 2013 at 6:05

GoogleCodeExporter commented 9 years ago
Yep. Builds fine. Also builds fine with 'boost-date-time=on' even when I don't 
have date_time built - no unresolved date_time symbols like before.

Original comment by Daymansm...@gmail.com on 6 Feb 2013 at 9:04

GoogleCodeExporter commented 9 years ago
thanks. fixed in [7984]

Original comment by arvid.no...@gmail.com on 6 Feb 2013 at 9:35

GoogleCodeExporter commented 9 years ago
Hi. This fix is a bit of an overreaction. The relevant change in boost 1.53 is 
this:

https://svn.boost.org/trac/boost/changeset/82265/trunk/boost/asio/impl

i.e. a new file included in the distributed src.hpp. IMHO, rather than 
replicating the content of src.hpp in libtorrent, it would be better if you 
simply do something like:

#define BOOST_ASIO_DETAIL_TIMER_QUEUE_PTIME_HPP
#include <boost/asio/impl/src.hpp>

to suppress the single boost.date_time-related header. Hope that helps.

Original comment by chris.ko...@gmail.com on 6 Feb 2013 at 10:33