Building from source on OSX

Support for Deluge on Apple Mac OS
Post Reply
jeremymelbourne
Member
Member
Posts: 12
Joined: Mon Dec 31, 2012 1:21 am

Building from source on OSX

Post by jeremymelbourne »

Hi Esteemed Deluge-people,

For the last couple days I've been trying to setup on OSX Deluge 1.3.5 + Flexget and am not having luck, here's what I've tried
  • Deluge.app - works obviously, but it appears as though I can't run this as a daemon - and flexget says it cannot find deluge.
  • Deluge via macports + flexget - can run the daemon, but flexget says it cannot find deluge
  • Deluge via source (what I'm looking for help with)
I visited this page and installed all the core dependencies http://dev.deluge-torrent.org/wiki/Installing/Source (some via easy_install, others via homebrew, others directly from source)

I can build libtorrent by itself, but when I run

Code: Select all

python setup.py clean -a
python setup.py build
The build terminates with

Code: Select all

building 'libtorrent' extension
gcc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I./libtorrent -I./libtorrent/include -I./libtorrent/include/libtorrent -I/usr/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I -I/opt/local/include/boost-1_35 -I/opt/local/include/boost-1_36 -I/sw/include/boost-1_35 -I/sw/include/boost -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ./libtorrent/src/alert.cpp -o build/temp.macosx-10.8-intel-2.7/./libtorrent/src/alert.o -D_FILE_OFFSET_BITS=64 -DNDEBUG -DTORRENT_USE_OPENSSL=1 -DBOOST_FILESYSTEM_VERSION=2 -O2 -Wno-missing-braces
In file included from ./libtorrent/src/alert.cpp:37:
./libtorrent/include/libtorrent/config.hpp:46:2: error: #error you must define either BOOST_ASIO_SEPARATE_COMPILATION or BOOST_ASIO_DYN_LINK in your project in order for asio's declarations to be correct. If you're linking dynamically against libtorrent, define BOOST_ASIO_DYN_LINK otherwise BOOST_ASIO_SEPARATE_COMPILATION. You can also use pkg-config or boost build, to automatically apply these defines
In file included from ./libtorrent/include/libtorrent/piece_picker.hpp:54,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:53,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/time.hpp: In function ‘int libtorrent::total_seconds(libtorrent::time_duration)’:
./libtorrent/include/libtorrent/time.hpp:114: warning: implicit conversion shortens 64-bit value into a 32-bit value
./libtorrent/include/libtorrent/time.hpp: In function ‘int libtorrent::total_milliseconds(libtorrent::time_duration)’:
./libtorrent/include/libtorrent/time.hpp:116: warning: implicit conversion shortens 64-bit value into a 32-bit value
In file included from ./libtorrent/include/libtorrent/storage.hpp:58,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:57,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/hasher.hpp: In constructor ‘libtorrent::hasher::hasher()’:
./libtorrent/include/libtorrent/hasher.hpp:75: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:75: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp: In constructor ‘libtorrent::hasher::hasher(const char*, int)’:
./libtorrent/include/libtorrent/hasher.hpp:86: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:86: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:87: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp:87: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘void libtorrent::hasher::update(const char*, int)’:
./libtorrent/include/libtorrent/hasher.hpp:113: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp:113: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘libtorrent::sha1_hash libtorrent::hasher::final()’:
./libtorrent/include/libtorrent/hasher.hpp:124: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123)
./libtorrent/include/libtorrent/hasher.hpp:124: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘void libtorrent::hasher::reset()’:
./libtorrent/include/libtorrent/hasher.hpp:134: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:134: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
In file included from ./libtorrent/src/alert.cpp:37:
./libtorrent/include/libtorrent/config.hpp:46:2: error: #error you must define either BOOST_ASIO_SEPARATE_COMPILATION or BOOST_ASIO_DYN_LINK in your project in order for asio's declarations to be correct. If you're linking dynamically against libtorrent, define BOOST_ASIO_DYN_LINK otherwise BOOST_ASIO_SEPARATE_COMPILATION. You can also use pkg-config or boost build, to automatically apply these defines
In file included from ./libtorrent/include/libtorrent/piece_picker.hpp:54,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:53,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/time.hpp: In function ‘int libtorrent::total_seconds(libtorrent::time_duration)’:
./libtorrent/include/libtorrent/time.hpp:114: warning: implicit conversion shortens 64-bit value into a 32-bit value
./libtorrent/include/libtorrent/time.hpp: In function ‘int libtorrent::total_milliseconds(libtorrent::time_duration)’:
./libtorrent/include/libtorrent/time.hpp:116: warning: implicit conversion shortens 64-bit value into a 32-bit value
In file included from ./libtorrent/include/libtorrent/torrent_info.hpp:52,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:54,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/lazy_entry.hpp: In member function ‘void libtorrent::lazy_entry::set_end(const char*)’:
./libtorrent/include/libtorrent/lazy_entry.hpp:215: warning: implicit conversion shortens 64-bit value into a 32-bit value
In file included from ./libtorrent/include/libtorrent/torrent_info.hpp:61,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:54,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/policy.hpp: In member function ‘int libtorrent::policy::num_peers() const’:
./libtorrent/include/libtorrent/policy.hpp:352: warning: implicit conversion shortens 64-bit value into a 32-bit value
In file included from ./libtorrent/include/libtorrent/storage.hpp:58,
                 from ./libtorrent/include/libtorrent/torrent_handle.hpp:57,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/hasher.hpp: In constructor ‘libtorrent::hasher::hasher()’:
./libtorrent/include/libtorrent/hasher.hpp:75: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:75: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp: In constructor ‘libtorrent::hasher::hasher(const char*, int)’:
./libtorrent/include/libtorrent/hasher.hpp:86: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:86: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:87: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp:87: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘void libtorrent::hasher::update(const std::string&)’:
./libtorrent/include/libtorrent/hasher.hpp:105: warning: implicit conversion shortens 64-bit value into a 32-bit value
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘void libtorrent::hasher::update(const char*, int)’:
./libtorrent/include/libtorrent/hasher.hpp:113: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp:113: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘libtorrent::sha1_hash libtorrent::hasher::final()’:
./libtorrent/include/libtorrent/hasher.hpp:124: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123)
./libtorrent/include/libtorrent/hasher.hpp:124: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123)
./libtorrent/include/libtorrent/hasher.hpp: In member function ‘void libtorrent::hasher::reset()’:
./libtorrent/include/libtorrent/hasher.hpp:134: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
./libtorrent/include/libtorrent/hasher.hpp:134: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121)
In file included from ./libtorrent/include/libtorrent/torrent_handle.hpp:59,
                 from ./libtorrent/include/libtorrent/alert_types.hpp:37,
                 from ./libtorrent/src/alert.cpp:39:
./libtorrent/include/libtorrent/bitfield.hpp: In copy constructor ‘libtorrent::bitfield::bitfield(const libtorrent::bitfield&)’:
./libtorrent/include/libtorrent/bitfield.hpp:54: warning: implicit conversion shortens 64-bit value into a 32-bit value
./libtorrent/include/libtorrent/bitfield.hpp: In member function ‘libtorrent::bitfield& libtorrent::bitfield::operator=(const libtorrent::bitfield&)’:
./libtorrent/include/libtorrent/bitfield.hpp:99: warning: implicit conversion shortens 64-bit value into a 32-bit value
In file included from ./libtorrent/include/libtorrent/extensions.hpp:50,
                 from ./libtorrent/src/alert.cpp:45:
./libtorrent/include/libtorrent/buffer.hpp: In member function ‘int libtorrent::buffer::interval::left() const’:
./libtorrent/include/libtorrent/buffer.hpp:63: warning: implicit conversion shortens 64-bit value into a 32-bit value
./libtorrent/include/libtorrent/buffer.hpp: In member function ‘int libtorrent::buffer::const_interval::left() const’:
./libtorrent/include/libtorrent/buffer.hpp:93: warning: implicit conversion shortens 64-bit value into a 32-bit value
lipo: can't open input file: /var/tmp//cczi7IJq.out (No such file or directory)
error: command 'gcc' failed with exit status 1
Also, I'm not 'married' to building it from source, my desired result is OSX + Flexget + Deluge Daemon.

Any help would be greatly appreciated.

Warm Regards,
Jeremy
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Building from source on OSX

Post by Cas »

Have you used the macports instructions here: http://dev.deluge-torrent.org/wiki/Inst ... rtsInstall

Make sure the python version for flexget matches deluge.
jeremymelbourne
Member
Member
Posts: 12
Joined: Mon Dec 31, 2012 1:21 am

Re: Building from source on OSX

Post by jeremymelbourne »

Cas wrote:Have you used the macports instructions here: http://dev.deluge-torrent.org/wiki/Inst ... rtsInstall
Thanks for the quick response Cas, I've followed the macports instructions to the letter, twice, on a mountain lion virtual machine (quicker than rebuilding my mac mini media centre using mountain lion recovery each time - but the mac mini gets the same result). Post that, I follow these instructions to setup deluged - http://dev.deluge-torrent.org/wiki/UserGuide/ThinClient

Either way, the result is the same. I'm very happy to provide logs etc... to help diagnose this as well.
Make sure the python version for flexget matches deluge.
How do I do this? When I installed flexget I'm almost certain I saw 2.7 flashing up on the screen, and I know that deluge is using 2.7. What's the best way to validate?

Cheers,
Jeremy
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Building from source on OSX

Post by Cas »

I think that you should ask the flexget devs how to debug the reason for it not finding Deluge when installed via macports.
jeremymelbourne
Member
Member
Posts: 12
Joined: Mon Dec 31, 2012 1:21 am

Re: Building from source on OSX

Post by jeremymelbourne »

Thanks Cas, actually I just found what I believe to be the solution and raised the ticket.

http://flexget.com/ticket/1886
Post Reply