boostorg / boostorg/build

Default address-model misdetected in AppVeyor CI (32-bit MSVC 9 to 12)

Open
#659 3 comments 0 reactions 0 assignees View on GitHub
bug transition
Dominant language
C++
Stars
251
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Here is an example of the failing build of Boost.Filesystem:

https://ci.appveyor.com/project/Lastique/filesystem/build/job/bpkhq90n0tot6k24

This build was run on https://github.com/boostorg/filesystem/commit/e260f134d4971a7c130d1cb46e273c2d0140ef87 with the following command line:

```
b2 -j 4 libs/filesystem/test toolset=msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0
```

(here `-j 4` is my assumption, I actually don't know the number of CPUs on the AppVeyor CI test machine; it's not important though)

Note that the command line doesn't set `address-model` and assumes whatever the default is. The problem is that b2 detects default `address-model` to be either "64-bit" or "none", as can be seen in the build log. MSVC versions 9.0 to 11.0 on that system only have compilers targeting 32-bit installed and 12.0 has both 32 and 64-bit. It looks like b2 is unable to detect 32-bit compilers for some reason. The result is that compilation fails because "cl" executable is not found for all compilers except MSVC-12.0 (for which presumably 64-bit compiler is used).

AppVeyor CI config of Boost.Filesystem have not been changed since Jun 5, 2020, and the tests were passing then. I also ran CI of Boost.Atomic, which uses the same compilers on the same AppVeyor CI image, with the difference that that config explicitly specifies `address-model` in all cases (i.e. for MSVC-9.0 it explicitly requests `address-model=32` in the command line). In that build I can also see "default address-model: none", but the build succeeds.

I could not reproduce this locally, but I may have some stale data from previous builds. I remember, b2 used to create auxiliary .cmd files for each MSVC version, but I cannot find them on my system now.

Contributor guide

Open the contributing guide

Research direction

Start with the linked AppVeyor build log and reproduce the command `b2 -j 4 libs/filesystem/test toolset=msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0`. Trace b2's default address-model detection for these MSVC versions, then verify that the build succeeds without explicitly setting `address-model`.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.