vlambda博客
学习文章列表

CentOS+CCLS开发环境搭建

夜中不能寐,起坐弹鸣琴。薄帷鉴明月,清风吹我襟。

软硬件条件:

VMware虚拟机 Centos7.5

2核4进程 x86_64架构 InterCPU

1块虚拟硬盘300G, /data 200G, /swap 30G, / 45G

运存10G + 20G swap挂载



安装大致分为以下几步:

  1. 更改系统源为阿里mirror

  2. 编译安装最新gcc套件

  3. 装node、npm、yarn、python3

  4. 安装0.4版以上的neoVim,github上的appimage就行(自带的vim版本低了)

  5. 编译安装最新git、下载安装spaceVim(先装依赖

    yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
  6. 编译安装cmake

  7. git下载llvm项目,编译安装llvm+clang

    cmake -S llvm -B build -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;"

       

_DCMAKE_BUILD_TYPE=Release一定要加!默认是生成Debug,刚开始没加这个参数,结果移动硬盘里跑了三天,link的时候各种毛病,什么轨道损坏,读取太慢CPU卡住,swap文件用了10G,etc...

参考:

1.https://www.jianshu.com/p/249850f2cc64

2.https://cmake.org/install/

3.https://github.com/MaskRay/ccls/wiki/Build

4.https://blog.csdn.net/yupei881027/article/details/104876860

5.https://blog.csdn.net/qq_40323844/article/details/103191029

6.https://github.com/llvm/llvm-project

7.https://www.openvim.com/sandbox.html

8.https://www.cnblogs.com/zd520pyx1314/p/8532356.html

9.https://www.huaweicloud.com/articles/ea3a51854fc80614115d1d69d16d5978.html

10.https://github.com/neovim/neovim/wiki/Installing-Neovim

11.https://www.24kplus.com/linux/596.html

12.https://blog.csdn.net/wang_shiling/category_7633904.html

13.https://www.cnblogs.com/fps2tao/p/9956139.html

14.https://github.com/nodejs/help/wiki/Installation

15.https://www.huaweicloud.com/articles/0b72bf69bb70f1c89ef1872ce2c21560.html

16.https://www.cnblogs.com/fps2tao/p/9956139.html

17.https://neovim.io/doc/user/provider.html