建立书商
Building Libraires
有人可以解释在不依赖包管理器的情况下构建库的过程吗?我是一名新开发人员,每次都发现这项任务非常困难。我目前正在尝试构建 https://github.com/ClickHouse/ClickHouse 库,以便我可以为它做出贡献并获得实际经验。
我设法遵循了 https://clickhouse.tech/docs/en/development/developer-instruction/ 但我现在很困惑在哪里可以找到 .Sln 文件以开始编码。
顺便说一句:我在虚拟机上使用 Ubuntu 20.04.2.0。
我的问题:有人可以详细或简单地概述如何构建库吗?使用 clickhouse 库作为示例也会有所帮助。build directory
我添加了一张我的构建目录的图片,如果这也有助于显示我哪里出错了。
ClickHouse 是用 C++ 编写的(不是 c#,所以没有 sln-文件)。
C++ 没有其他世界中的标准包管理器 - .net (nuget)、nodejs (npm) 等而是使用 git 子模块。
您引用的文章应该明确解释如何编译所需的软件 - 照着做就行了 (https://clickhouse.tech/docs/en/development/developer-instruction/#creating-a-repository-on-github)。
我可以重复这篇文章:
# configure git (call just ONCE)
git clone https://github.com/your_git/ClickHouse.git
git remote add upstream git@github.com:ClickHouse/ClickHouse.git
# get the latest version (
git fetch upstream
git checkout master
git rebase upstream/master
git push -f origin master
# get packages files
git submodule sync --recursive
git submodule update --init --recursive -f
# build
mkdir build
cd build
export CC=clang-10 CXX=clang++-10
cmake -D CMAKE_BUILD_TYPE=Debug ..
ninja -j 2 clickhouse-server clickhouse-client
# run compiled code
cd {your_repo_location}/ClickHouse/programs/server
../../build/programs/clickhouse-server
../../build/programs/clickhouse-client
# run tests
cd {your_repo_location}/ClickHouse/tests
./clickhouse-test -b ../build/programs/clickhouse --print-time --no-stateful 00189 00921
ps 所有这些 steps 在官方文档中都有详细的描述 - 我会遵循这些文档,如果你发现一些错误,请毫不犹豫地修复它
ps2 考虑到第一次编译需要几个小时
有人可以解释在不依赖包管理器的情况下构建库的过程吗?我是一名新开发人员,每次都发现这项任务非常困难。我目前正在尝试构建 https://github.com/ClickHouse/ClickHouse 库,以便我可以为它做出贡献并获得实际经验。
我设法遵循了 https://clickhouse.tech/docs/en/development/developer-instruction/ 但我现在很困惑在哪里可以找到 .Sln 文件以开始编码。
顺便说一句:我在虚拟机上使用 Ubuntu 20.04.2.0。
我的问题:有人可以详细或简单地概述如何构建库吗?使用 clickhouse 库作为示例也会有所帮助。build directory
我添加了一张我的构建目录的图片,如果这也有助于显示我哪里出错了。
ClickHouse 是用 C++ 编写的(不是 c#,所以没有 sln-文件)。
C++ 没有其他世界中的标准包管理器 - .net (nuget)、nodejs (npm) 等而是使用 git 子模块。
您引用的文章应该明确解释如何编译所需的软件 - 照着做就行了 (https://clickhouse.tech/docs/en/development/developer-instruction/#creating-a-repository-on-github)。
我可以重复这篇文章:
# configure git (call just ONCE)
git clone https://github.com/your_git/ClickHouse.git
git remote add upstream git@github.com:ClickHouse/ClickHouse.git
# get the latest version (
git fetch upstream
git checkout master
git rebase upstream/master
git push -f origin master
# get packages files
git submodule sync --recursive
git submodule update --init --recursive -f
# build
mkdir build
cd build
export CC=clang-10 CXX=clang++-10
cmake -D CMAKE_BUILD_TYPE=Debug ..
ninja -j 2 clickhouse-server clickhouse-client
# run compiled code
cd {your_repo_location}/ClickHouse/programs/server
../../build/programs/clickhouse-server
../../build/programs/clickhouse-client
# run tests
cd {your_repo_location}/ClickHouse/tests
./clickhouse-test -b ../build/programs/clickhouse --print-time --no-stateful 00189 00921
ps 所有这些 steps 在官方文档中都有详细的描述 - 我会遵循这些文档,如果你发现一些错误,请毫不犹豫地修复它
ps2 考虑到第一次编译需要几个小时