rTorrent works fine when built without xmlrpc-c but when using the following options, it fails to load.
CXXFLAGS="-Wno-deprecated-declarations -Os -stdlib=libstdc++" ./configure --with-xmlrpc-c --prefix=/usr/local/Cellar/rtorrent/0.9.6
$ rtorrent
Caught Segmentation fault, dumping stack:
0 rtorrent 0x000000010b3e4a4c _Z8do_panici + 233
1 libsystem_platform.dylib 0x00007fff94251eaa _sigtramp + 26
2 libtorrent.19.dylib 0x000000010b654f65 _ZStL8__ioinit + 10964
3 rtorrent 0x000000010b424ee0 _ZN12ThreadWorkerC1Ev + 14
4 rtorrent 0x000000010b3e142a main + 1075
5 libdyld.dylib 0x00007fff94dd05ad start + 1
[1] 40655 abort rtorrent
process syscall details:
https://gist.github.com/tzudot/b0b937ac75d55702b675
I can confirm The error
Demangled output of the crash:
0 rtorrent 0x0000000105f7da4c do_panic(int) 233
1 libsystem_platform.dylib 0x00007fff94251eaa _sigtramp 26
2 libtorrent.19.dylib 0x00000001061ecf7a std::__ioinit 10985
3 rtorrent 0x0000000105fbdee0 ThreadWorker::ThreadWorker() 14
4 rtorrent 0x0000000105f7a42a main 1075
5 libdyld.dylib 0x00007fff94dd05ad start 1
$ gdb rtorrent
[New Thread 0x1413 of process 72207]
Program received signal SIGSEGV, Segmentation fault.
-----------------------------------------------------------------------------------------------------------------------[regs]
RAX: 0x000000010060E550 RBX: 0x0000000100804800 RCX: 0x0000000000000000 RDX: 0x0000000000000100 o d I t s z a p c
RSI: 0x0000000100600000 RDI: 0x00000001004F2E00 RBP: 0x00007FFF5FBFF100 RSP: 0x00007FFF5FBFF0E0 RIP: 0x0000000100048885
R8 : 0x0000000000000017 R9 : 0x00000000FFFFE000 R10: 0x0000000000000018 R11: 0x0000000000000206 R12: 0x0000000100804E50
R13: 0xA000AA8790C06E63 R14: 0x0000000100804E70 R15: 0x0000000000000000
CS: 002B DS: Error while running hook_stop:
value is not available
0x0000000100048885 in ThreadBase::ThreadBase() ()
gdb$ bt
#0 0x0000000100048885 in ThreadBase::ThreadBase() ()
#1 0x0000000100048ee0 in ThreadWorker::ThreadWorker() ()
#2 0x000000010000542a in main ()
Building on the same platform/os-version with no problem, though I do seem to remember fixing something about xmlrpc not that long ago. So use HEAD, not 0.9.6.
Built libtorrent, and rtorrent from git HEAD, along with xmlrpc-c 1.39.07.
After I launch rtorrent and start a torrent, leech or seed, crash occurs.
One instance,
Caught Segmentation fault, dumping stack:
0 rtorrent 0x000000010e1c5fa4 do_panic(int) 233
1 libsystem_platform.dylib 0x00007fff96162eaa _sigtramp 26
2 ??? 0x0000000000000000 0x0 0
3 libtorrent.19.dylib 0x000000010e3b5036 std::vector<torrent::ChunkPart, std::allocator<torrent::ChunkPart> >::insert(__gnu_cxx::__normal_iterator<torrent::ChunkPart*, std::vector<torrent::ChunkPart, std::allocator<torrent::ChunkPart> > >, torrent::ChunkPart const&) 88
4 libtorrent.19.dylib 0x000000010e3b47d9 torrent::Chunk::push_back(torrent::ChunkPart::mapped_type, torrent::MemoryChunk const&) 101
5 libtorrent.19.dylib 0x000000010e398d12 torrent::FileList::create_chunk(unsigned long long, unsigned int, int) 248
6 libtorrent.19.dylib 0x000000010e3b5cc5 torrent::ChunkList::get(unsigned int, int) 281
7 libtorrent.19.dylib 0x000000010e3dfde6 torrent::PeerConnectionBase::down_chunk_start(torrent::Piece const&) 134
8 libtorrent.19.dylib 0x000000010e3e31fc torrent::PeerConnection<(torrent::Download::ConnectionType)0>::read_message() 608
9 libtorrent.19.dylib 0x000000010e3e292e torrent::PeerConnection<(torrent::Download::ConnectionType)0>::event_read() 492
10 libtorrent.19.dylib 0x000000010e38c462 torrent::PollKQueue::perform() 242
11 libtorrent.19.dylib 0x000000010e3b2cae torrent::thread_base::event_loop(torrent::thread_base*) 422
12 rtorrent 0x000000010e1c5803 main 13946
13 libdyld.dylib 0x00007fff96ce15ad start 1
14 ??? 0x0000000000000001 0x0 1
[1] 3228 abort rtorrent
Another instance,
Caught Segmentation fault, dumping stack:
0 rtorrent 0x0000000104506fa4 do_panic(int) 233
1 libsystem_platform.dylib 0x00007fff96162eaa _sigtramp 26
2 ??? 0x00007fff67003090 0x0 140734921453712
3 libtorrent.19.dylib 0x00000001046f3036 std::vector<torrent::ChunkPart, std::allocator<torrent::ChunkPart> >::insert(__gnu_cxx::__normal_iterator<torrent::ChunkPart*, std::vector<torrent::ChunkPart, std::allocator<torrent::ChunkPart> > >, torrent::ChunkPart const&) 88
4 libtorrent.19.dylib 0x00000001046f27d9 torrent::Chunk::push_back(torrent::ChunkPart::mapped_type, torrent::MemoryChunk const&) 101
5 libtorrent.19.dylib 0x00000001046d6d12 torrent::FileList::create_chunk(unsigned long long, unsigned int, int) 248
6 libtorrent.19.dylib 0x00000001046f3cc5 torrent::ChunkList::get(unsigned int, int) 281
7 libtorrent.19.dylib 0x00000001046f9cfd torrent::HashTorrent::queue(bool) 277
8 libtorrent.19.dylib 0x00000001046f9b82 torrent::HashTorrent::start(bool) 178
9 rtorrent 0x00000001045695a3 core::Manager::receive_hashing_changed() 531
10 rtorrent 0x000000010456fc75 core::View::emit_changed_now() 35
11 rtorrent 0x000000010450788d client_perform() 180
12 libtorrent.19.dylib 0x00000001046f0bef torrent::thread_base::event_loop(torrent::thread_base*) 231
13 rtorrent 0x0000000104506803 main 13946
14 libdyld.dylib 0x00007fff96ce15ad start 1
[1] 3274 abort rtorrent
ProductName: Mac OS X
ProductVersion: 10.11.3
BuildVersion: 15D21
@rakshasa The application builds fine, the issue is when rtorrent is launched and when a torrent is started the application crashes. Also, if I have xmlrpc settings in ~/.rtorrent.rc, the application crashes immediately.
As it works on your machine, could you verify and confirm the build instructions and the version of xmlrpc-c [1.39.07] which I have used.
CXXFLAGS="-Wno-deprecated-declarations -Os -stdlib=libstdc++" ./configure --with-xmlrpc-c --prefix=/usr/local/Cellar/rtorrent/0.9.6
any update @rakshasa ... i know you don't have a lot spare time :(
Ok, this is what I use:
./autogen.sh &&CC=clang CXX=clang++ CXXFLAGS="-O3 -stdlib=libc++" ./configure --enable-arch=x86-64 --enable-extra-debug --enable-werror --with-xmlrpc-c --prefix=/Users/rakshasa/local/ $@
kitsune: ~>clang++ --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
kitsune: ~>xmlrpc-c-config --version
1.16.42
Try things out. Oh, and '-Wno-deprecated-declarations' is a red flag. It's supposed to compile with no warnings.
Also if someone finds the above useful, figure out what part is important and add it to the wiki.
Unless we include "-stdlib=libstdc++" in CXXFLAGS, <tr1/functional> is not available and the build itself fails.
@rakshasa would it be possible to somehow create a homebrew formula with the required flags already present? It's a shame that it won't automaticall build on OSX at the moment.
Just did a compile on macos sierra and after adding workarounds for the missing libcurl pkg-config file it should now compile as is.
@rakshasa I installed rtorrent on macOS sierra via homebrew today:
brew tap homebrew/versions
brew install [email protected]
brew tap homebrew/boneyard
brew install rtorrent
and rtorrent crashes as soon as I add a torrent (as described by others above).
I then uninstalled rtorrent and libtorrent via homebrew, downloaded libtorrent 0.13.6 and rtorrent 0.9.6 from https://rakshasa.github.io/rtorrent/, and tried to compile libtorrent. But libtorrent make fails with ./../../torrent/poll.h:40:10: fatal error: 'tr1/functional' file not found.
I would really be happy if you could tell me how to to do this, or which flags to use for ./configure.
@rakshasa I installed rtorrent on macOS sierra via homebrew today:
brew tap homebrew/versions
brew install [email protected]
brew tap homebrew/boneyard
brew install rtorrent
and rtorrent crashes as soon as I add a torrent (as described by others above).
I then uninstalled rtorrent and libtorrent via homebrew, downloaded libtorrent 0.13.6 and rtorrent 0.9.6 from https://rakshasa.github.io/rtorrent/, and tried to compile libtorrent. But libtorrent make fails with ./../../torrent/poll.h:40:10: fatal error: 'tr1/functional' file not found.
I would really be happy if you could tell me how to to do this, or which flags to use for ./configure.
Same issue here, would love to move back into rtorrent, any progress made here?
Some progress here on Sierra it seems, still not fully there
after using posted autogen
./autogen.sh &&CC=clang CXX=clang++ CXXFLAGS="-O3 -stdlib=libc++" ./configure --enable-arch=x86-64 --enable-extra-debug --enable-werror --with-xmlrpc-c --prefix=/Users/rakshasa/local/ $@
brew install openssl
sudo cpan
upgrade
then to build libtorrent, making sure to include library paths for latest brew openssl prior to build:
export CPPFLAGS='-I/usr/local/opt/openssl/include'
export LDFLAGS='-L/usr/local/opt/openssl/lib'
./configure; make; make install
this gets libtorrent built properly it seems, the build for rtorrent progresses further until it fails with:

if anyone has a clue how to move past this I'd love some input
You can build it with this commit.
I'd be curious whether it will work. What version of OS X do you use?
Thanks for that, @chros73 - rtorrent successfully built for me with xmlrpc on Mac 10.12.4b2
@katiepea try this, worked for me. Note, I had to include several additional libraries (curl, libxml2, as well as build libiconv as a static library from scratch), which you may or may not have to depending on how your environment set up. So play around withCPPFLAGS and LDFLAGS as needed.
Clone rtorrent repo, making sure to git checkout 10ce686.
export CPPFLAGS='-I/usr/local/opt/openssl/include -I/usr/local/opt/curl/include -I/usr/local/opt/libxml2/include'
export LDFLAGS='-L/usr/local/opt/openssl/lib -L/usr/local/opt/curl/lib -L/usr/local/opt/libxml2/lib'
./autogen.sh CXXFLAGS="-Wno-deprecated-declarations -Os -stdlib=libstdc++"
./configure --enable-arch=x86-64 --enable-extra-debug --enable-werror --with-xmlrpc-c --prefix=/Users/Anthony/Development/apps/ $@
make
make install
rtorrent running with xmlrpc support on mac 10.12.4b2.
Yeah I got it to build with the commit posted a few posts up, on MacOS 10.12.3 (16D32), glad to see I'm not the only masochist doing this on OS X. Everything seems to be working for me, spent a good amount of time trying to figure out syntax changes with commands for a filebot script to be handled post-download, but that's working now too. Now to tackle protecting rutorrent with ssl, should be …. fun
@amizzo87 @katiepea
I tried with commit 10ce686, suggested libs and flags including libiconv... builds without errors...
I get
./rtorrent
Caught Illegal instruction, dumping stack:
0 rtorrent 0x000000010ddd6fa9 _Z8do_panici + 441
1 libsystem_platform.dylib 0x00007fff89e5552a _sigtramp + 26
2 libcurl.4.dylib 0x000000010e152800 sslerr_to_curlerr + 14166
3 libdispatch.dylib 0x00007fff82b8d40b _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff82b8d303 dispatch_once_f + 67
5 libdispatch.dylib 0x00007fff82b914c3 _dispatch_kq_update + 77
6 libdispatch.dylib 0x00007fff82b90b35 _dispatch_mgr_wakeup + 34
7 libdispatch.dylib 0x00007fff82b8eaa5 _dispatch_queue_wakeup_with_qos_slow + 29
8 libdispatch.dylib 0x00007fff82b8eb06 _dispatch_queue_wakeup_with_qos_slow + 126
9 libdispatch.dylib 0x00007fff82b90337 _dispatch_resume_slow + 14
10 libsystem_notify.dylib 0x00007fff8ec3fda6 _notify_lib_init + 790
11 libsystem_notify.dylib 0x00007fff8ec406c3 notify_register_dispatch + 112
12 CoreFoundation 0x00007fff981d2ad7 __71+[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:]_block_invoke_2 + 55
13 libdispatch.dylib 0x00007fff82b8d40b _dispatch_client_callout + 8
14 libdispatch.dylib 0x00007fff82b8d303 dispatch_once_f + 67
15 CoreFoundation 0x00007fff981d23eb +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] + 1131
16 CoreFoundation 0x00007fff98207e3c _CFPreferencesCopyValueWithContainer + 236
17 Security 0x00007fff83171c0e _SSLContextReadDefault + 46
18 libsystem_pthread.dylib 0x00007fff8ec67bf6 __pthread_once_handler + 65
19 libsystem_platform.dylib 0x00007fff89e53fc4 _os_once + 41
Abort trap: 6
Mac-Pro:bin saperlipopette$ ./rtorrent
Caught Illegal instruction, dumping stack:
0 rtorrent 0x00000001026b2fa9 _Z8do_panici + 441
1 libsystem_platform.dylib 0x00007fff89e5552a _sigtramp + 26
2 libsystem_c.dylib 0x00007fff94cc16c1 __v2printf + 669
3 libdispatch.dylib 0x00007fff82b8d40b _dispatch_client_callout + 8
4 libdispatch.dylib 0x00007fff82b8d303 dispatch_once_f + 67
5 libdispatch.dylib 0x00007fff82b914c3 _dispatch_kq_update + 77
6 libdispatch.dylib 0x00007fff82b90b35 _dispatch_mgr_wakeup + 34
7 libdispatch.dylib 0x00007fff82b8eaa5 _dispatch_queue_wakeup_with_qos_slow + 29
8 libdispatch.dylib 0x00007fff82b8eb06 _dispatch_queue_wakeup_with_qos_slow + 126
9 libdispatch.dylib 0x00007fff82b90337 _dispatch_resume_slow + 14
10 libsystem_notify.dylib 0x00007fff8ec3fda6 _notify_lib_init + 790
11 libsystem_notify.dylib 0x00007fff8ec406c3 notify_register_dispatch + 112
12 CoreFoundation 0x00007fff981d2ad7 __71+[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:]_block_invoke_2 + 55
13 libdispatch.dylib 0x00007fff82b8d40b _dispatch_client_callout + 8
14 libdispatch.dylib 0x00007fff82b8d303 dispatch_once_f + 67
15 CoreFoundation 0x00007fff981d23eb +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] + 1131
16 CoreFoundation 0x00007fff98207e3c _CFPreferencesCopyValueWithContainer + 236
17 Security 0x00007fff83171c0e _SSLContextReadDefault + 46
18 libsystem_pthread.dylib 0x00007fff8ec67bf6 __pthread_once_handler + 65
19 libsystem_platform.dylib 0x00007fff89e53fc4 _os_once + 41
Abort trap: 6
@amizzo87 , Can you provide all os x commands to successfully build libtorrent and rtorrent with xmlrpc. Appreciate your cooperation.
try this:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo chown -R whoami /usr/local
brew install automake libtool boost curl lzlib libsigc++ openssl
brew uninstall libtorrent-rasterbar
git clone https://github.com/rakshasa/rtorrent.git
git clone https://github.com/rakshasa/libtorrent.git
cd libtorrent
./autogen.sh
CC=clang CXX=clang++ CXXFLAGS="-Wno-deprecated-declarations -O3 -std=c++11 -stdlib=libc++ -I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure
make
make install
cd ../rtorrent
./autogen.sh
CC=clang CXX=clang++ CXXFLAGS="-Wno-deprecated-declarations -O3 -std=c++11 -stdlib=libc++ -I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" ./configure --with-xmlrpc-c
make
make install
rtorrent
Most helpful comment
@katiepea try this, worked for me. Note, I had to include several additional libraries (curl, libxml2, as well as build libiconv as a static library from scratch), which you may or may not have to depending on how your environment set up. So play around with
CPPFLAGSandLDFLAGSas needed.Clone rtorrent repo, making sure to
git checkout 10ce686.rtorrent running with xmlrpc support on mac 10.12.4b2.