Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compiling rtorrent on a mac
#!/bin/bash
# Installs the XCode command line tools if you don't have them
xcode-select --install
# Installs brew if you don't have it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Makes your account the owner of /usr/local, which is preferred on single user Macs
sudo chown -R `whoami` /usr/local
# Installs all the dependencies for building libtorrent and rtorrent
brew install automake libtool boost curl lzlib libsigc++ openssl
# Uninstall libtorrent-rasterbar if you already have it
brew uninstall libtorrent-rasterbar
# Get the repos
git clone https://github.com/rakshasa/rtorrent.git
git clone https://github.com/rakshasa/libtorrent.git
cd libtorrent
./autogen.sh
# Adds the openssl includes to your build command
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
# Installs libtorrent to /usr/local/lib
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
# Installs rtorrent to /usr/local/bin
make install
# Run rtorrent
rtorrent
@doctorpangloss

This comment has been minimized.

Copy link
Owner Author

commented Jul 15, 2017

This works as of master on rtorrent & libtorrent

@pyed

This comment has been minimized.

Copy link

commented Sep 28, 2017

Thank you. works on macOS High Sierra. I had to edit it a bit.

@hijxf

This comment has been minimized.

Copy link

commented Dec 1, 2018

line 25: make -j4 # if you want to speed it up

@hijxf

This comment has been minimized.

Copy link

commented Dec 7, 2018

also need to add the xmlrpc-c library if you don't have it. i.e. brew install xmlrpc-c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.