Skip to content

[C++] Error building bundled Boost on Windows #45613

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
pitrou opened this issue Feb 24, 2025 · 10 comments
Open

[C++] Error building bundled Boost on Windows #45613

pitrou opened this issue Feb 24, 2025 · 10 comments

Comments

@pitrou
Copy link
Member

pitrou commented Feb 24, 2025

Describe the bug, including details regarding any error messages, version, and platform.

On Windows x64, I get this error with -DBOOST_SOURCE=BUNDLED:

[29/323] Performing build step for 'boost_ep'
FAILED: boost_ep-prefix/src/boost_ep-stamp/boost_ep-build boost_ep-prefix/src/boost_ep/stage/lib/libboost_system-vc143-mt-gd-x64-1_81.lib boost_ep-prefix/src/boost_ep/stage/lib/libboost_filesystem-vc143-mt-gd-x64-1_81.lib C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep/stage/lib/libboost_system-vc143-mt-gd-x64-1_81.lib C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep/stage/lib/libboost_filesystem-vc143-mt-gd-x64-1_81.lib
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\pitro\arrow\cpp\build-test\boost_ep-prefix\src\boost_ep && "C:\Program Files\CMake\bin\cmake.exe" -P C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build-DEBUG.cmake && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build"
CMake Error at C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build-DEBUG.cmake:37 (message):
  Command failed: 1

   './b2' '-j8' 'link=static' 'variant=debug' 'toolset=msvc-14.3' '--with-filesystem' '--with-system'

  See also

    C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build-*.log


-- stdout output is:
Performing configuration checks

    - default address-model    : none [1]
    - default architecture     : none [1]

Building the Boost C++ Libraries.


    - has std::atomic_ref      : no [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - has BCrypt API           : no [2]
    - is Windows CE            : no [2]
    - has init_priority attribute : no [2]
    - has stat::st_blksize     : no [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : no [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : no [2]
    - has fdopendir(O_NOFOLLOW) : no [2]
    - has POSIX *at APIs       : no [2]
    - x86                      : no [2]
    - arm                      : no [2]
    - mips1                    : no [2]
    - power                    : no [2]
    - sparc                    : no [2]
    - has synchronization.lib  : no [2]
    - has std::atomic_ref      : no [3]
    - has statx                : no [3]
    - has statx syscall        : no [3]
    - has BCrypt API           : no [3]
    - is Windows CE            : no [3]
    - has init_priority attribute : no [3]
    - has stat::st_blksize     : no [3]
    - has stat::st_mtim        : no [3]
    - has stat::st_mtimensec   : no [3]
    - has stat::st_mtimespec   : no [3]
    - has stat::st_birthtim    : no [3]
    - has stat::st_birthtimensec : no [3]
    - has stat::st_birthtimespec : no [3]
    - has fdopendir(O_NOFOLLOW) : no [3]
    - has POSIX *at APIs       : no [3]
    - x86                      : no [3]
    - arm                      : no [3]
    - mips1                    : no [3]
    - power                    : no [3]
    - sparc                    : no [3]
    - has synchronization.lib  : no [3]
error: Name clash for '<pC:\Users\pitro\arrow\cpp\build-test\boost_ep-prefix\src\boost_ep\stage\lib>libboost_atomic-vc143-mt-gd-1_81.lib'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error:     -  <address-model>32
error:     -  <address-model>64
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.

Component(s)

C++

@pitrou
Copy link
Member Author

pitrou commented Feb 24, 2025

cc @kou

@kou
Copy link
Member

kou commented Feb 25, 2025

I couldn't reproduce this on GitHub Actions: https://github.com/apache/arrow/actions/runs/13516005446/job/37764706158?pr=45621

Could you share your full cmake command line?

@kou
Copy link
Member

kou commented Feb 25, 2025

Could you also share C:/Users/pitro/arrow/cpp/build-test/boost_ep-prefix/src/boost_ep-stamp/boost_ep-build-*.log?

@pitrou
Copy link
Member Author

pitrou commented Feb 25, 2025

CMake command line:

cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DARROW_BUILD_SHARED=ON -DARROW_BUILD_STATIC=OFF -DBOOST_SOURCE=BUNDLED -DARROW_BOOST_USE_SHARED=ON -DARROW_BUILD_TESTS=ON -DARROW_PARQUET=ON -DPARQUET_REQUIRE_ENCRYPTION=ON

@pitrou
Copy link
Member Author

pitrou commented Feb 25, 2025

Here are Boost configure log and build log.

@kou
Copy link
Member

kou commented Feb 25, 2025

Thanks.

Could you also provide cmake ... log?

How did you setup your console? Open "Developer Command Prompt for VS 2022"? call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64?

@pitrou
Copy link
Member Author

pitrou commented Feb 25, 2025

Could you also provide cmake ... log?

Here it is: https://gist.github.com/pitrou/07a31d7a60d855de8c4f55bbbd4ac490

How did you setup your console? Open "Developer Command Prompt for VS 2022"?

Yes.

@kou
Copy link
Member

kou commented Feb 25, 2025

Here is the logs on GitHub Actions:

https://github.com/apache/arrow/actions/runs/13520407383?pr=45621#artifacts

Performing configuration checks

    - default address-model    : 64-bit [1]
    - default architecture     : x86 [1]

Building the Boost C++ Libraries.


    - has std::atomic_ref      : no [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - has BCrypt API           : yes [2]
    - has init_priority attribute : no [2]
    - has stat::st_blksize     : no [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : no [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : no [2]
    - has fdopendir(O_NOFOLLOW) : no [2]
    - has POSIX *at APIs       : no [2]
    - compiler supports SSE2   : yes [2]
    - compiler supports SSE4.1 : yes [2]
    - has synchronization.lib  : yes [2]
    - has std::atomic_ref      : no [3]
    - has statx                : no [3]
    - has statx syscall        : no [3]
    - has BCrypt API           : yes [3]
    - has init_priority attribute : no [3]
    - has stat::st_blksize     : no [3]
    - has stat::st_mtim        : no [3]
    - has stat::st_mtimensec   : no [3]
    - has stat::st_mtimespec   : no [3]
    - has stat::st_birthtim    : no [3]
    - has stat::st_birthtimensec : no [3]
    - has stat::st_birthtimespec : no [3]
    - has fdopendir(O_NOFOLLOW) : no [3]
    - has POSIX *at APIs       : no [3]
    - compiler supports SSE2   : yes [3]
    - compiler supports SSE4.1 : yes [3]
    - has synchronization.lib  : yes [3]

[1] msvc-14.3
[2] msvc-14.3/debug/address-model-32/link-static/python-3.9/threadapi-win32/threading-multi/visibility-hidden
[3] msvc-14.3/debug/link-static/python-3.9/threadapi-win32/threading-multi/visibility-hidden

Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - container                : not building
    - exception                : not building
    - filesystem               : building
    - headers                  : not building
    - iostreams                : not building
    - locale                   : not building
    - log                      : not building
    - mpi                      : not building
    - program_options          : not building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - system                   : building
    - test                     : not building
    - thread                   : not building
    - timer                    : not building
    - wave                     : not building

It seems that all auto-detections failed on your environment. For example, default address-model : none [1] on your environment and default address-model : 64-bit [1] on GitHub Actions. You may need to do something to setup your environment...

@pitrou
Copy link
Member Author

pitrou commented Feb 25, 2025

You may need to do something to setup your environment...

You're right, but I don't know what to setup :)

@kou
Copy link
Member

kou commented Feb 26, 2025

boostorg/boost#914 may be related.

Upgrading bundled Boost may solve this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants