Last active
February 8, 2021 13:22
-
-
Save doctorpangloss/ecfbe70c61de9332698d4d4445848f81 to your computer and use it in GitHub Desktop.
Compiling rtorrent on a mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Thank you. works on macOS High Sierra. I had to edit it a bit.
line 25: make -j4 # if you want to speed it up
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
This works as of master on rtorrent & libtorrent