Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Compiling

Symeon Huang edited this page Jul 24, 2017 · 21 revisions

Dependencies

Make sure you've installed all dependent development packages (with -dev or -devel).

  • qt5-qtbase-gui >= 5.2 (qtbase5 in Debian/Ubuntu)
  • qrencode (libqrencode in Debian/Ubuntu)
  • libQtShadowsocks >= 1.10.0 (libqtshadowsocks in Debian/Ubuntu. DON'T use the trunk code)
  • botan >= 1.10 (libbotan1.10 in Debian/Ubuntu)
  • zbar (libzbar0 in Debian/Ubuntu)
  • libappindicator (libappindicator1 in Debian/Ubuntu)

Check libQtShadowsocks Compiling wiki if you need to build it yourself.

Compiling

GNU/Linux

qmake INSTALL_PREFIX=/usr
make
make install

macOS

Check libQtShadowsocks Building on macOS page before you proceed.

Requirements

Dependencies

brew update
brew install libqrencode zbar

Installation

qmake INSTALL_PREFIX=/usr/local
make
make install

To create an Xcode project, use qmake -spec macx-xcode

qt-build-environment

After install dependencies mentioned in Wiki, you need to setup build environment as following:

  1. Add /usr/local/bin to PATH
  2. Add environment variable PKG_CONFIG_PATH with value /path/to/qrencode/pkgconfig

If you got following messages, please refer to corresponding solutions:

Message:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libJPEG.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
The program has unexpectedly finished.

Solution:

➜  ls -l /usr/local/lib/libJPEG.dylib
lrwxr-xr-x  1 hzxie  admin  35 Feb 16 22:57 libJPEG.dylib -> ../Cellar/jpeg/8d/lib/libjpeg.dylib
➜  rm /usr/local/lib/libJPEG.dylib
➜  ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libJPEG.dylib /usr/local/lib/libJPEG.dylib

Message:

dyld: Symbol not found: __cg_TIFFClientOpen
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libTIFF.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
The program has unexpectedly finished.

Solution:

➜  ls -l /usr/local/lib/libTIFF.dylib
lrwxr-xr-x  1 hzxie  admin  43 Feb 16 22:57 /usr/local/lib/libTIFF.dylib -> ../Cellar/libtiff/4.0.7_2/lib/libtiff.dylib
➜  rm /usr/local/lib/libTIFF.dylib
➜  ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libTIFF.dylib /usr/local/lib/libTIFF.dylib

Message:

dyld: Symbol not found: __cg_png_create_info_struct
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libPng.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
The program has unexpectedly finished.

Solution:

➜  ls -l /usr/local/lib/libPng.dylib
lrwxr-xr-x  1 hzxie  admin  40 Feb 16 20:34 /usr/local/lib/libPng.dylib -> ../Cellar/libpng/1.6.28/lib/libpng.dylib
➜  rm /usr/local/lib/libPng.dylib
➜  ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libPng.dylib /usr/local/lib/libPng.dylib

Additional Arguments for qmake

Arguments Usage Default Value
INSTALL_PREFIX="/usr" Specify the installation prefix directory /usr
BOTAN_VER="1.10" Specify the botan library version 1.10
Clone this wiki locally