[jira] [Commented] (ARROW-2239) [C++] Update build docs for Windows
[ https://issues.apache.org/jira/browse/ARROW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16391505#comment-16391505 ] ASF GitHub Bot commented on ARROW-2239: --- wesm closed pull request #1722: ARROW-2239: [C++] Update Windows build docs URL: https://github.com/apache/arrow/pull/1722 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/cpp/apidoc/Windows.md b/cpp/apidoc/Windows.md index dae5040c2..965369521 100644 --- a/cpp/apidoc/Windows.md +++ b/cpp/apidoc/Windows.md @@ -44,9 +44,8 @@ Now, you can bootstrap a build environment conda create -n arrow-dev cmake git boost-cpp flatbuffers rapidjson cmake thrift-cpp snappy zlib brotli gflags lz4-c zstd -c conda-forge ``` -***Note:*** -> *Make sure to get the `conda-forge` build of `gflags` as the - naming of the library differs from that in the `defaults` channel* +> **Note:** Make sure to get the `conda-forge` build of `gflags` as the +> naming of the library differs from that in the `defaults` channel. Activate just created conda environment with pre-installed packages from previous step: @@ -116,52 +115,85 @@ zstd%ZSTD_SUFFIX%.lib. ### Visual Studio Microsoft provides the free Visual Studio Community edition. When doing -development, you must launch the developer command prompt using +development, you must launch the developer command prompt using: Visual Studio 2015 -```"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64``` +``` +"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 +``` Visual Studio 2017 -```"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64``` +``` +"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 +``` It's easiest to configure a console emulator like [cmder][3] to automatically launch this when starting a new development console. +## Building with Ninja and clcache + +We recommend the [Ninja](https://ninja-build.org/) build system for better +build parallelization, and the optional +[clcache](https://github.com/frerich/clcache/) compiler cache which keeps +track of past compilations to avoid running them over and over again +(in a way similar to the Unix-specific "ccache"). + +Activate your conda build environment to first install those utilities: + +```shell +activate arrow-dev + +conda install -c conda-forge ninja +pip install git+https://github.com/frerich/clcache.git +``` + +Change working directory in cmd.exe to the root directory of Arrow and +do an out of source build by generating Ninja files: + +```shell +cd cpp +mkdir build +cd build +cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release .. +cmake --build . --config Release +``` + ## Building with NMake Activate your conda build environment: -``` +```shell activate arrow-dev ``` Change working directory in cmd.exe to the root directory of Arrow and do an out of source build using `nmake`: -``` +```shell cd cpp mkdir build cd build cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. +cmake --build . --config Release nmake ``` When using conda, only release builds are currently supported. -## Build using Visual Studio (MSVC) Solution Files +## Building using Visual Studio (MSVC) Solution Files Activate your conda build environment: -``` +```shell activate arrow-dev ``` Change working directory in cmd.exe to the root directory of Arrow and do an out of source build by generating a MSVC solution: -``` +```shell cd cpp mkdir build cd build @@ -171,10 +203,11 @@ cmake --build . --config Release ## Debug build -To build Debug version of Arrow you should have pre-insalled Debug version of -boost libs. +To build Debug version of Arrow you should have pre-installed a Debug version +of boost libs. -It's recommended to configure cmake build with following variables for Debug build: +It's recommended to configure cmake build with the following variables for +Debug build: `-DARROW_BOOST_USE_SHARED=OFF` - enables static linking with boost debug libs and simplifies run-time loading of 3rd parties. (Recommended) @@ -185,7 +218,7 @@ simplifies run-time loading of 3rd parties. (Recommended) Command line to build Arrow in Debug might look as following: -``` +```shell cd cpp mkdir build cd build This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] Update build docs
[jira] [Commented] (ARROW-2239) [C++] Update build docs for Windows
[ https://issues.apache.org/jira/browse/ARROW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389760#comment-16389760 ] ASF GitHub Bot commented on ARROW-2239: --- MaxRis commented on issue #1722: ARROW-2239: [C++] Update Windows build docs URL: https://github.com/apache/arrow/pull/1722#issuecomment-371196240 @pitrou looks great! Thank you! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] Update build docs for Windows > --- > > Key: ARROW-2239 > URL: https://issues.apache.org/jira/browse/ARROW-2239 > Project: Apache Arrow > Issue Type: Task > Components: C++, Documentation >Reporter: Antoine Pitrou >Assignee: Antoine Pitrou >Priority: Minor > Labels: pull-request-available > Fix For: 0.9.0 > > > We should update the C++ build docs for Windows to recommend use of Ninja and > clcache for faster builds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARROW-2239) [C++] Update build docs for Windows
[ https://issues.apache.org/jira/browse/ARROW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389750#comment-16389750 ] ASF GitHub Bot commented on ARROW-2239: --- pitrou commented on issue #1722: ARROW-2239: [C++] Update Windows build docs URL: https://github.com/apache/arrow/pull/1722#issuecomment-371192587 @MaxRis does this look to you? I didn't want to switch the debug build instructions to Ninja as I haven't tested that works :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] Update build docs for Windows > --- > > Key: ARROW-2239 > URL: https://issues.apache.org/jira/browse/ARROW-2239 > Project: Apache Arrow > Issue Type: Task > Components: C++, Documentation >Reporter: Antoine Pitrou >Assignee: Antoine Pitrou >Priority: Minor > Labels: pull-request-available > Fix For: 0.9.0 > > > We should update the C++ build docs for Windows to recommend use of Ninja and > clcache for faster builds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARROW-2239) [C++] Update build docs for Windows
[ https://issues.apache.org/jira/browse/ARROW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389751#comment-16389751 ] ASF GitHub Bot commented on ARROW-2239: --- pitrou commented on issue #1722: ARROW-2239: [C++] Update Windows build docs URL: https://github.com/apache/arrow/pull/1722#issuecomment-371192587 @MaxRis does this look ok to you? I didn't want to switch the debug build instructions to Ninja as I haven't tested that works :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] Update build docs for Windows > --- > > Key: ARROW-2239 > URL: https://issues.apache.org/jira/browse/ARROW-2239 > Project: Apache Arrow > Issue Type: Task > Components: C++, Documentation >Reporter: Antoine Pitrou >Assignee: Antoine Pitrou >Priority: Minor > Labels: pull-request-available > Fix For: 0.9.0 > > > We should update the C++ build docs for Windows to recommend use of Ninja and > clcache for faster builds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARROW-2239) [C++] Update build docs for Windows
[ https://issues.apache.org/jira/browse/ARROW-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389749#comment-16389749 ] ASF GitHub Bot commented on ARROW-2239: --- pitrou opened a new pull request #1722: ARROW-2239: [C++] Update Windows build docs URL: https://github.com/apache/arrow/pull/1722 Recommend Ninja and clcache. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [C++] Update build docs for Windows > --- > > Key: ARROW-2239 > URL: https://issues.apache.org/jira/browse/ARROW-2239 > Project: Apache Arrow > Issue Type: Task > Components: C++, Documentation >Reporter: Antoine Pitrou >Assignee: Antoine Pitrou >Priority: Minor > Labels: pull-request-available > Fix For: 0.9.0 > > > We should update the C++ build docs for Windows to recommend use of Ninja and > clcache for faster builds. -- This message was sent by Atlassian JIRA (v7.6.3#76005)