2020-01-22 12:29:26 +01:00
|
|
|
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
|
.. or more contributor license agreements. See the NOTICE file
|
|
|
|
|
.. distributed with this work for additional information
|
|
|
|
|
.. regarding copyright ownership. The ASF licenses this file
|
|
|
|
|
.. to you under the Apache License, Version 2.0 (the
|
|
|
|
|
.. "License"); you may not use this file except in compliance
|
|
|
|
|
.. with the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
.. Unless required by applicable law or agreed to in writing,
|
|
|
|
|
.. software distributed under the License is distributed on an
|
|
|
|
|
.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
|
.. KIND, either express or implied. See the License for the
|
|
|
|
|
.. specific language governing permissions and limitations
|
|
|
|
|
.. under the License.
|
|
|
|
|
|
|
|
|
|
.. _developers-cpp-windows:
|
|
|
|
|
|
|
|
|
|
=====================
|
|
|
|
|
Developing on Windows
|
|
|
|
|
=====================
|
|
|
|
|
|
|
|
|
|
Like Linux and macOS, we have worked to enable builds to work "out of the box"
|
|
|
|
|
with CMake for a reasonably large subset of the project.
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
.. _windows-system-setup:
|
|
|
|
|
|
2020-01-22 12:29:26 +01:00
|
|
|
System Setup
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
Microsoft provides the free Visual Studio Community edition. When doing
|
2021-04-07 20:53:00 -04:00
|
|
|
development in the shell, you must initialize the development environment
|
|
|
|
|
each time you open the shell.
|
2020-01-22 12:29:26 +01:00
|
|
|
|
2021-09-29 13:30:08 +02:00
|
|
|
For Visual Studio 2017, execute the following batch script:
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
For Visual Studio 2019, the script is:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64
|
|
|
|
|
|
2024-02-20 04:54:23 +05:30
|
|
|
One can configure a console emulator like `cmder <https://cmder.app/>`_ to
|
2020-01-22 12:29:26 +01:00
|
|
|
automatically launch this when starting a new development console.
|
|
|
|
|
|
|
|
|
|
Using conda-forge for build dependencies
|
|
|
|
|
========================================
|
|
|
|
|
|
|
|
|
|
`Miniconda <https://conda.io/miniconda.html>`_ is a minimal Python distribution
|
2022-08-09 15:01:59 +09:00
|
|
|
including the `conda <https://conda.io>`_ package manager. Some members of the
|
2020-01-22 12:29:26 +01:00
|
|
|
Apache Arrow community participate in the maintenance of `conda-forge
|
|
|
|
|
<https://conda-forge.org/>`_, a community-maintained cross-platform package
|
|
|
|
|
repository for conda.
|
|
|
|
|
|
|
|
|
|
To use ``conda-forge`` for your C++ build dependencies on Windows, first
|
|
|
|
|
download and install a 64-bit distribution from the `Miniconda homepage
|
|
|
|
|
<https://conda.io/miniconda.html>`_
|
|
|
|
|
|
|
|
|
|
To configure ``conda`` to use the ``conda-forge`` channel by default, launch a
|
2021-04-07 20:53:00 -04:00
|
|
|
command prompt (``cmd.exe``), run the initialization command shown
|
|
|
|
|
:ref:`above<windows-system-setup>` (``vcvarsall.bat`` or ``VsDevCmd.bat``), then
|
|
|
|
|
run the command:
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
conda config --add channels conda-forge
|
|
|
|
|
|
|
|
|
|
Now, you can bootstrap a build environment (call from the root directory of the
|
|
|
|
|
Arrow codebase):
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
2021-07-06 13:05:07 +02:00
|
|
|
conda create -y -n arrow-dev --file=ci\conda_env_cpp.txt
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
Then "activate" this conda environment with:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
activate arrow-dev
|
|
|
|
|
|
|
|
|
|
If the environment has been activated, the Arrow build system will
|
|
|
|
|
automatically see the ``%CONDA_PREFIX%`` environment variable and use that for
|
|
|
|
|
resolving the build dependencies. This is equivalent to setting
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
-DARROW_DEPENDENCY_SOURCE=SYSTEM ^
|
|
|
|
|
-DARROW_PACKAGE_PREFIX=%CONDA_PREFIX%\Library
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
To use the Visual Studio IDE with this conda environment activated, launch it by
|
|
|
|
|
running the command ``devenv`` from the same command prompt.
|
|
|
|
|
|
|
|
|
|
Note that dependencies installed as conda packages are built in release mode and
|
|
|
|
|
cannot link with debug builds. If you intend to use ``-DCMAKE_BUILD_TYPE=debug``
|
|
|
|
|
then you must build the packages from source.
|
|
|
|
|
``-DCMAKE_BUILD_TYPE=relwithdebinfo`` is also available, which produces a build
|
|
|
|
|
that can both be linked with release libraries and be debugged.
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
If you run into any problems using conda packages for dependencies, a very
|
|
|
|
|
common problem is mixing packages from the ``defaults`` channel with those
|
|
|
|
|
from ``conda-forge``. You can examine the installed packages in your
|
|
|
|
|
environment (and their origin) with ``conda list``
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
Using vcpkg for build dependencies
|
|
|
|
|
========================================
|
|
|
|
|
|
|
|
|
|
`vcpkg <https://github.com/microsoft/vcpkg>`_ is an open source package manager
|
|
|
|
|
from Microsoft. It hosts community-contributed ports of C and C++ packages and
|
|
|
|
|
their dependencies. Arrow includes a manifest file `cpp/vcpkg.json
|
2023-02-17 13:49:41 +01:00
|
|
|
<https://github.com/apache/arrow/blob/main/cpp/vcpkg.json>`_ that specifies
|
2021-04-07 20:53:00 -04:00
|
|
|
which vcpkg packages are required to build the C++ library.
|
|
|
|
|
|
|
|
|
|
To use vcpkg for C++ build dependencies on Windows, first
|
|
|
|
|
`install <https://docs.microsoft.com/en-us/cpp/build/install-vcpkg>`_ and
|
|
|
|
|
`integrate <https://docs.microsoft.com/en-us/cpp/build/integrate-vcpkg>`_
|
|
|
|
|
vcpkg. Then change working directory in ``cmd.exe`` to the root directory
|
|
|
|
|
of Arrow and run the command:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
vcpkg install ^
|
|
|
|
|
--triplet x64-windows ^
|
|
|
|
|
--x-manifest-root cpp ^
|
2021-05-13 14:16:36 +02:00
|
|
|
--feature-flags=versions ^
|
2021-04-07 20:53:00 -04:00
|
|
|
--clean-after-build
|
|
|
|
|
|
|
|
|
|
On Windows, vcpkg builds dynamic link libraries by default. Use the triplet
|
2021-07-06 13:05:07 +02:00
|
|
|
``x64-windows-static`` to build static libraries. vcpkg downloads source
|
2021-04-07 20:53:00 -04:00
|
|
|
packages and compiles them locally, so installing dependencies with vcpkg is
|
|
|
|
|
more time-consuming than with conda.
|
|
|
|
|
|
|
|
|
|
Then in your ``cmake`` command, to use dependencies installed by vcpkg, set:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
-DARROW_DEPENDENCY_SOURCE=VCPKG
|
|
|
|
|
|
|
|
|
|
You can optionally set other variables to override the default CMake
|
|
|
|
|
configurations for vcpkg, including:
|
2021-07-06 13:05:07 +02:00
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
* ``-DCMAKE_TOOLCHAIN_FILE``: by default, the CMake scripts automatically find
|
|
|
|
|
the location of the vcpkg CMake toolchain file ``vcpkg.cmake``; use this to
|
|
|
|
|
instead specify its location
|
|
|
|
|
* ``-DVCPKG_TARGET_TRIPLET``: by default, the CMake scripts attempt to infer the
|
2021-07-06 13:05:07 +02:00
|
|
|
vcpkg
|
2021-04-07 20:53:00 -04:00
|
|
|
`triplet <https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md>`_;
|
|
|
|
|
use this to instead specify the triplet
|
|
|
|
|
* ``-DARROW_DEPENDENCY_USE_SHARED``: default is ``ON``; set to ``OFF`` for
|
|
|
|
|
static libraries
|
|
|
|
|
* ``-DVCPKG_MANIFEST_MODE``: default is ``ON``; set to ``OFF`` to ignore the
|
|
|
|
|
``vcpkg.json`` manifest file and only look for vcpkg packages that are
|
|
|
|
|
already installed under the directory where vcpkg is installed
|
|
|
|
|
|
|
|
|
|
|
2020-01-22 12:29:26 +01:00
|
|
|
Building using Visual Studio (MSVC) Solution Files
|
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
|
|
Change working directory in ``cmd.exe`` to the root directory of Arrow and do
|
|
|
|
|
an out of source build by generating a MSVC solution:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
2025-06-03 22:59:29 +02:00
|
|
|
cmake .. -G "Visual Studio 16 2019" -A x64 ^
|
2020-01-22 12:29:26 +01:00
|
|
|
-DARROW_BUILD_TESTS=ON
|
|
|
|
|
cmake --build . --config Release
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
For newer versions of Visual Studio, specify the generator
|
2025-06-03 22:59:29 +02:00
|
|
|
``Visual Studio 17 2022`` or see ``cmake --help`` for available
|
2021-09-29 13:30:08 +02:00
|
|
|
generators.
|
2021-04-07 20:53:00 -04:00
|
|
|
|
2022-11-14 08:37:26 +01:00
|
|
|
Building with Ninja and sccache
|
2020-01-22 12:29:26 +01:00
|
|
|
===============================
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
The `Ninja <https://ninja-build.org/>`_ build system offers better build
|
2022-11-14 08:37:26 +01:00
|
|
|
parallelization, and the optional `sccache
|
|
|
|
|
<https://github.com/mozilla/sccache#local>`_ compiler cache keeps track of
|
2020-01-22 12:29:26 +01:00
|
|
|
past compilations to avoid running them over and over again (in a way similar
|
|
|
|
|
to the Unix-specific ``ccache``).
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
Newer versions of Visual Studio include Ninja. To see if your Visual Studio
|
|
|
|
|
includes Ninja, run the initialization command shown
|
|
|
|
|
:ref:`above<windows-system-setup>` (``vcvarsall.bat`` or ``VsDevCmd.bat``), then
|
2021-04-15 16:19:16 +02:00
|
|
|
run ``ninja --version``.
|
2021-04-07 20:53:00 -04:00
|
|
|
|
|
|
|
|
If Ninja is not included in your version of Visual Studio, and you are using
|
2022-11-14 08:37:26 +01:00
|
|
|
conda, activate your conda environment and install Ninja:
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
activate arrow-dev
|
|
|
|
|
conda install -c conda-forge ninja
|
|
|
|
|
|
2021-04-07 20:53:00 -04:00
|
|
|
If you are not using conda,
|
|
|
|
|
`install Ninja from another source <https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages>`_
|
|
|
|
|
.
|
|
|
|
|
|
|
|
|
|
After installation is complete, change working directory in ``cmd.exe`` to the root directory of Arrow and
|
2020-01-22 12:29:26 +01:00
|
|
|
do an out of source build by generating Ninja files:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
2020-03-02 19:19:58 +01:00
|
|
|
cmake -G "Ninja" ^
|
|
|
|
|
-DARROW_BUILD_TESTS=ON ^
|
2020-01-22 12:29:26 +01:00
|
|
|
-DGTest_SOURCE=BUNDLED ..
|
|
|
|
|
cmake --build . --config Release
|
|
|
|
|
|
2022-11-14 08:37:26 +01:00
|
|
|
To use ``sccache`` in local storage mode you need to set ``SCCACHE_DIR``
|
|
|
|
|
environment variable before calling ``cmake``:
|
2020-03-02 19:19:58 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
...
|
2022-11-14 08:37:26 +01:00
|
|
|
set SCCACHE_DIR=%LOCALAPPDATA%\Mozilla\sccache
|
2020-03-02 19:19:58 +01:00
|
|
|
cmake -G "Ninja" ^
|
|
|
|
|
...
|
|
|
|
|
|
2020-01-22 12:29:26 +01:00
|
|
|
Building with NMake
|
|
|
|
|
===================
|
|
|
|
|
|
|
|
|
|
Change working directory in ``cmd.exe`` to the root directory of Arrow and
|
|
|
|
|
do an out of source build using ``nmake``:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake -G "NMake Makefiles" ..
|
|
|
|
|
nmake
|
|
|
|
|
|
|
|
|
|
Building on MSYS2
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
You can build on MSYS2 terminal, ``cmd.exe`` or PowerShell terminal.
|
|
|
|
|
|
|
|
|
|
On MSYS2 terminal:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake -G "MSYS Makefiles" ..
|
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
On ``cmd.exe`` or PowerShell terminal, you can use the following batch
|
|
|
|
|
file:
|
|
|
|
|
|
|
|
|
|
.. code-block:: batch
|
|
|
|
|
|
|
|
|
|
setlocal
|
|
|
|
|
|
|
|
|
|
REM For 64bit
|
|
|
|
|
set MINGW_PACKAGE_PREFIX=mingw-w64-x86_64
|
|
|
|
|
set MINGW_PREFIX=c:\msys64\mingw64
|
|
|
|
|
set MSYSTEM=MINGW64
|
|
|
|
|
|
|
|
|
|
set PATH=%MINGW_PREFIX%\bin;c:\msys64\usr\bin;%PATH%
|
|
|
|
|
|
|
|
|
|
rmdir /S /Q cpp\build
|
|
|
|
|
mkdir cpp\build
|
|
|
|
|
pushd cpp\build
|
|
|
|
|
cmake -G "MSYS Makefiles" .. || exit /B
|
|
|
|
|
make || exit /B
|
|
|
|
|
popd
|
|
|
|
|
|
2021-10-28 05:34:52 +00:00
|
|
|
Building on Windows/ARM64 using Ninja and Clang
|
|
|
|
|
===============================================
|
|
|
|
|
|
|
|
|
|
Ninja and clang can be used for building library on windows/arm64 platform.
|
|
|
|
|
|
|
|
|
|
.. code-block:: batch
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
|
|
|
|
|
set CC=clang-cl
|
|
|
|
|
set CXX=clang-cl
|
|
|
|
|
|
|
|
|
|
cmake -G "Ninja" ..
|
|
|
|
|
|
|
|
|
|
cmake --build . --config Release
|
|
|
|
|
|
|
|
|
|
LLVM toolchain for Windows on ARM64 can be downloaded from LLVM release page `LLVM release page <https://releases.llvm.org>`_
|
|
|
|
|
|
|
|
|
|
Visual Studio (MSVC) cannot be yet used for compiling win/arm64 build due to compatibility issues for dependencies like xsimd and boost library.
|
|
|
|
|
|
|
|
|
|
Note: This is only an experimental build for WoA64 as all features are not extensively tested through CI due to lack of infrastructure.
|
|
|
|
|
|
2020-01-22 12:29:26 +01:00
|
|
|
Debug builds
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
To build a Debug version of Arrow, you should have pre-installed a Debug
|
2021-04-07 20:53:00 -04:00
|
|
|
version of Boost. It's recommended to configure ``cmake`` with the following
|
|
|
|
|
variables for Debug build:
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
* ``-DARROW_BOOST_USE_SHARED=OFF``: enables static linking with boost debug
|
|
|
|
|
libs and simplifies run-time loading of 3rd parties
|
|
|
|
|
* ``-DBOOST_ROOT``: sets the root directory of boost libs. (Optional)
|
|
|
|
|
* ``-DBOOST_LIBRARYDIR``: sets the directory with boost lib files. (Optional)
|
|
|
|
|
|
|
|
|
|
The command line to build Arrow in Debug mode will look something like this:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd cpp
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
2021-09-29 13:30:08 +02:00
|
|
|
cmake .. -G "Visual Studio 15 2017" -A x64 ^
|
2020-01-22 12:29:26 +01:00
|
|
|
-DARROW_BOOST_USE_SHARED=OFF ^
|
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug ^
|
|
|
|
|
-DBOOST_ROOT=C:/local/boost_1_63_0 ^
|
|
|
|
|
-DBOOST_LIBRARYDIR=C:/local/boost_1_63_0/lib64-msvc-14.0
|
|
|
|
|
cmake --build . --config Debug
|
|
|
|
|
|
2025-10-20 23:11:43 -07:00
|
|
|
Depending on the CMake variables or preset you use, you may need to have the
|
|
|
|
|
``patch`` utility in your ``PATH``. There are a number of ways to do this. For
|
|
|
|
|
example, if you're already using `Git for Windows
|
|
|
|
|
<https://git-scm.com/downloads/win>`_, you could add ``C:\Program
|
|
|
|
|
Files\Git\usr\bin`` to your ``PATH``.
|
|
|
|
|
|
2020-01-22 12:29:26 +01:00
|
|
|
Windows dependency resolution issues
|
|
|
|
|
====================================
|
|
|
|
|
|
|
|
|
|
Because Windows uses ``.lib`` files for both static and dynamic linking of
|
|
|
|
|
dependencies, the static library sometimes may be named something different
|
|
|
|
|
like ``%PACKAGE%_static.lib`` to distinguish itself. If you are statically
|
|
|
|
|
linking some dependencies, we provide some options
|
|
|
|
|
|
|
|
|
|
* ``-DBROTLI_MSVC_STATIC_LIB_SUFFIX=%BROTLI_SUFFIX%``
|
|
|
|
|
* ``-DSNAPPY_MSVC_STATIC_LIB_SUFFIX=%SNAPPY_SUFFIX%``
|
|
|
|
|
* ``-LZ4_MSVC_STATIC_LIB_SUFFIX=%LZ4_SUFFIX%``
|
|
|
|
|
* ``-ZSTD_MSVC_STATIC_LIB_SUFFIX=%ZSTD_SUFFIX%``
|
|
|
|
|
|
|
|
|
|
Statically linking to Arrow on Windows
|
|
|
|
|
======================================
|
|
|
|
|
|
|
|
|
|
The Arrow headers on Windows static library builds (enabled by the CMake
|
|
|
|
|
option ``ARROW_BUILD_STATIC``) use the preprocessor macro ``ARROW_STATIC`` to
|
|
|
|
|
suppress dllimport/dllexport marking of symbols. Projects that statically link
|
|
|
|
|
against Arrow on Windows additionally need this definition. The Unix builds do
|
|
|
|
|
not use the macro.
|
|
|
|
|
|
2022-04-07 14:55:04 -04:00
|
|
|
In addition if using ``-DARROW_FLIGHT=ON``, ``ARROW_FLIGHT_STATIC`` needs to
|
2022-07-07 17:03:33 -04:00
|
|
|
be defined, and similarly for ``-DARROW_FLIGHT_SQL=ON``.
|
2022-04-07 14:55:04 -04:00
|
|
|
|
|
|
|
|
.. code-block:: cmake
|
|
|
|
|
|
|
|
|
|
project(MyExample)
|
|
|
|
|
|
|
|
|
|
find_package(Arrow REQUIRED)
|
|
|
|
|
|
|
|
|
|
add_executable(my_example my_example.cc)
|
2022-07-07 17:03:33 -04:00
|
|
|
target_link_libraries(my_example
|
|
|
|
|
PRIVATE
|
|
|
|
|
arrow_static
|
|
|
|
|
arrow_flight_static
|
|
|
|
|
arrow_flight_sql_static)
|
|
|
|
|
|
|
|
|
|
target_compile_definitions(my_example
|
|
|
|
|
PUBLIC
|
|
|
|
|
ARROW_STATIC
|
|
|
|
|
ARROW_FLIGHT_STATIC
|
|
|
|
|
ARROW_FLIGHT_SQL_STATIC)
|
2022-04-07 14:55:04 -04:00
|
|
|
|
2022-03-28 16:27:29 -05:00
|
|
|
Downloading the Timezone Database
|
|
|
|
|
=================================
|
|
|
|
|
|
2026-03-03 14:19:25 +01:00
|
|
|
When building with MSVC or recent MinGW GCC (version 13+), Arrow uses the
|
|
|
|
|
Windows timezone database or the system-provided tzdata respectively, and
|
|
|
|
|
no additional setup is needed.
|
|
|
|
|
|
|
|
|
|
When building with Clang/libc++ (e.g., MSYS2 Clang64), the IANA timezone
|
|
|
|
|
database and the Windows timezone mapping need to be downloaded first to run
|
|
|
|
|
some of the compute unit tests. See :ref:`download-timezone-database` for
|
|
|
|
|
download instructions. To set a non-default path for the timezone database
|
|
|
|
|
while running the unit tests, set the ``ARROW_TIMEZONE_DATABASE`` environment
|
|
|
|
|
variable.
|
2022-03-28 16:27:29 -05:00
|
|
|
|
2026-03-03 14:19:25 +01:00
|
|
|
Replicating Windows CI Builds
|
|
|
|
|
=============================
|
2020-01-22 12:29:26 +01:00
|
|
|
|
2026-03-03 14:19:25 +01:00
|
|
|
For people more familiar with Linux development but need to replicate a failing
|
|
|
|
|
Windows CI build, here are some rough notes (make unittest will probably still
|
|
|
|
|
fail but many unit tests can be made with their individual make targets).
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
1. Microsoft offers trial VMs for `Windows with Microsoft Visual Studio
|
|
|
|
|
<https://developer.microsoft.com/en-us/windows/downloads/virtual-machines>`_.
|
|
|
|
|
Download and install a version.
|
2020-11-23 16:28:06 +01:00
|
|
|
2. Run the VM and install `Git <https://git-scm.com/>`_, `CMake
|
|
|
|
|
<https://cmake.org/>`_, and Miniconda or Anaconda (these instructions assume
|
|
|
|
|
Anaconda). Also install the `"Build Tools for Visual Studio"
|
|
|
|
|
<https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_.
|
|
|
|
|
Make sure to select the C++ toolchain in the installer wizard, and reboot
|
|
|
|
|
after installation.
|
2020-01-22 12:29:26 +01:00
|
|
|
3. Download `pre-built Boost debug binaries
|
|
|
|
|
<https://sourceforge.net/projects/boost/files/boost-binaries/>`_ and install
|
2020-11-23 16:28:06 +01:00
|
|
|
it.
|
|
|
|
|
|
|
|
|
|
Run this from an Anaconda/Miniconda command prompt (*not* PowerShell prompt),
|
|
|
|
|
and make sure to run "vcvarsall.bat x64" first. The location of vcvarsall.bat
|
|
|
|
|
will depend, it may be under a different path than commonly indicated,
|
|
|
|
|
e.g. "``C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat``"
|
|
|
|
|
with the 2019 build tools.
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
cd $EXTRACT_BOOST_DIRECTORY
|
|
|
|
|
.\bootstrap.bat
|
2026-03-03 14:19:25 +01:00
|
|
|
@rem This is for static libraries needed for static_crt_build
|
2020-11-23 16:28:06 +01:00
|
|
|
.\b2 link=static --with-filesystem --with-regex --with-system install
|
2020-01-22 12:29:26 +01:00
|
|
|
@rem this should put libraries and headers in c:\Boost
|
|
|
|
|
|
|
|
|
|
4. Activate anaconda/miniconda:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
@rem this might differ for miniconda
|
|
|
|
|
C:\Users\User\Anaconda3\Scripts\activate
|
|
|
|
|
|
|
|
|
|
5. Clone and change directories to the arrow source code (you might need to
|
|
|
|
|
install git).
|
|
|
|
|
6. Setup environment variables:
|
|
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
|
|
SET JOB=Static_Crt_Build
|
|
|
|
|
SET GENERATOR=Ninja
|
|
|
|
|
SET USE_CLCACHE=false
|
|
|
|
|
SET ARROW_BUILD_GANDIVA=OFF
|
2020-04-30 14:50:12 -04:00
|
|
|
SET ARROW_LLVM_VERSION=8.0.*
|
2021-12-29 13:40:52 +01:00
|
|
|
SET PYTHON=3.9
|
2020-01-22 12:29:26 +01:00
|
|
|
SET ARCH=64
|
|
|
|
|
SET PATH=C:\Users\User\Anaconda3;C:\Users\User\Anaconda3\Scripts;C:\Users\User\Anaconda3\Library\bin;%PATH%
|
|
|
|
|
SET BOOST_LIBRARYDIR=C:\Boost\lib
|
|
|
|
|
SET BOOST_ROOT=C:\Boost
|
|
|
|
|
|
2026-03-03 14:19:25 +01:00
|
|
|
7. Install dependencies and build:
|
2020-01-22 12:29:26 +01:00
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
2021-07-06 13:05:07 +02:00
|
|
|
conda install -c conda-forge --file .\ci\conda_env_cpp.txt
|
2026-03-03 14:19:25 +01:00
|
|
|
git submodule update --init
|
2020-11-23 16:28:06 +01:00
|
|
|
@rem you can also just invoke cmake directly with the desired options
|
2020-01-22 12:29:26 +01:00
|
|
|
cmake --build . --config Release --target arrow-compute-hash-test
|