Skip to content

Instantly share code, notes, and snippets.

@Jamesits
Last active June 28, 2019 09:34
Show Gist options
  • Save Jamesits/3be0f66a92934bcc32d3631aa68b893f to your computer and use it in GitHub Desktop.
Save Jamesits/3be0f66a92934bcc32d3631aa68b893f to your computer and use it in GitHub Desktop.
How to compile tg-cli on macOS 10.12
#!/bin/bash
# for macOS
brew install libconfig readline lua python libevent jansson openssl
ln -s /usr/local/opt/readline/lib/libreadline.7.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
git clone https://github.com/vysheng/tg.git --recursive
cd tg
CFLAGS="-I/usr/local/include -I/usr/local/Cellar/readline/6.3.8/include" \
LDFLAGS="-L/usr/local/lib -L/usr/local/Cellar/readline/6.3.8/lib" \
./configure --with-openssl=/usr/local/opt/openssl
sed -i -e 's/-Werror//g' Makefile
make
#!/bin/bash
# for Ubuntu
sudo apt-get install build-essential libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
git clone https://github.com/vysheng/tg.git --recursive
cd tg
./configure
make
@tddschn
Copy link

tddschn commented May 31, 2019

Error when using the first script to install tg-cli on mac:

sed: Makefile: No such file or directory

@Di9
Copy link

Di9 commented Jun 28, 2019

I have installed readline with different version, so my CL and LD FLAGS paths were different.
In my case it was in "/usr/local/Cellar/readline/8.0.0_1" not 6.3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment