1 Star 1 Fork 0

SummerGao/iotdb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Building compile tools

Requirements

  • Java 8+
  • Maven 3.5+
  • Flex
  • Bison 2.7+
  • Boost
  • OpenSSL 1.0+

Make sure a complete C++ building environment is prepared on your machine.

Mac

  • Bison

Bison 2.3 is preinstalled on OSX, but this version is too low. When building Thrift with Bison 2.3, the following error would pop out:

invalid directive: '%code'

For such case, please update Bison:

     brew install bison		
     brew link bison --force		

Then, you need to tell the OS where the new bison is.

For Bash users:

    echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.bash_profile		

For zsh users:

    echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.zshrc
  • Boost

Please make sure a relative new version of Boost is ready on your machine. If no Boost available, install the latest version of Boost:

    brew install boost
    brew link boost
  • OpenSSL

Make sure the Openssl libraries has been install on your Mac. The default Openssl include file search path is "/usr/local/opt/openssl/include". If Openssl header files can not be found when building Thrift, please add option -Dopenssl.include.dir="" to specify the correct directory on your Mac.

Linux

Additional requrirements

  • g++

To install all dependencies, run:

Debian/Ubuntu:

sudo apt-get install gcc g++ bison flex libboost-all-dev

CentOS:

yum install gcc g++ bison flex boost-devel

Windows

Flex and Bison

For Flex and Bison, they could be downloaded from SourceForge: https://sourceforge.net/projects/winflexbison/

After downloaded, please rename the executables to flex.exe and bison.exe and add them to "PATH" environment variables.

Boost

For Boost, please download from the official website: https://www.boost.org/users/download/

Cmake generator on Windows

There is a long list of supported Cmake generators on Windows environment.

  Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Visual Studio 9 2008 [arch]  = Generates Visual Studio 2008 project files.
                                 Optional [arch] can be "Win64" or "IA64".
  Borland Makefiles            = Generates Borland makefiles.
* NMake Makefiles              = Generates NMake makefiles.
  NMake Makefiles JOM          = Generates JOM makefiles.
  MSYS Makefiles               = Generates MSYS makefiles.
  MinGW Makefiles              = Generates a make file for use with
                                 mingw32-make.
  Unix Makefiles               = Generates standard UNIX makefiles.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  Ninja                        = Generates build.ninja files.
  Ninja Multi-Config           = Generates build-<Config>.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
  CodeBlocks - NMake Makefiles = Generates CodeBlocks project fi

(the list is gotten by cmake --help.)

When building client-cpp project, use -Dcmake.generator="" option to specify a Cmake generator. E.g., mvn package -Dcmake.generator="Visual Studio 15 2017 [arch]"

on windows, you should set -Dboost.include.dir=${your boost header folder} -Dboost.library.dir=${your boost lib (stage) folder}

FAQ

on Mac

if you occur some errors when compiling thrift source code, try to downgrade your xcode-commandline from 12 to 11.5

see https://stackoverflow.com/questions/63592445/ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file/65518087#65518087

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/summergaolib/iotdb.git
git@gitee.com:summergaolib/iotdb.git
summergaolib
iotdb
iotdb
master

搜索帮助