Skip to content

Instantly share code, notes, and snippets.

@adonis0147
Last active August 5, 2017 10:20
Show Gist options
  • Save adonis0147/d6c922cbe7c6ea6a47c499f6478aa027 to your computer and use it in GitHub Desktop.
Save adonis0147/d6c922cbe7c6ea6a47c499f6478aa027 to your computer and use it in GitHub Desktop.
Build YouCompleteMe from source
# Checkout LLVM
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
# Checkout Clang
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
# Checkout Compiler-RT
cd llvm/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
# Compile
mkdir -p llvm/build
cd llvm/build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/llvm -DCMAKE_BUILD_TYPE=Release ..
make
make install
./configure --prefix=$HOME/opt/python --enable-shared
make
make install
# To modify Modules/Setup can fix missing modules.
# For example, uncomment the zlib and correct the CFlags and LDFlags.
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
# build vim with the specific version of Python
vi_cv_path_python=$HOME/opt/python/bin/python ./configure --prefix=$HOME/opt/vim \
--enable-gui=no \
--with-features=huge \
--enable-perlinterp \
--enable-pythoninterp \
--with-python-config-dir=$HOME/opt/python/lib/python2.7/config \
--enable-rubyinterp \
--enable-luainterp \
--enable-cscope
make
make install

Build YouCompleteMe from Source

mkdir ycm_build
cd ycm_build
cmake -DPATH_TO_LLVM_ROOT=$HOME/opt/llvm -DPYTHON_INCLUDE_DIR=$HOME/opt/python/include/python2.7 -DPYTHON_LIBRARY=$HOME/opt/python/lib/libpython2.7.so . $HOME/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment