Skip to content

Fix/windows toolchain build - #135

Open
Phenitix wants to merge 6 commits into
Euro-Office:mainfrom
Phenitix:fix/windows-toolchain-build
Open

Fix/windows toolchain build#135
Phenitix wants to merge 6 commits into
Euro-Office:mainfrom
Phenitix:fix/windows-toolchain-build

Conversation

@Phenitix

Copy link
Copy Markdown

No description provided.

Patrick Schulz and others added 6 commits August 23, 2026 10:43
build.ps1 loads the full MSVC environment via Import-VcVars, so VCINSTALLDIR,
PATH, INCLUDE and LIB are inherited here. Calling vcvars again prepends every
MSVC/SDK directory onto the already long PATH and blows past cmd.exe's
8191-character limit:

    Die eingegebene Zeile ist zu lang. / Syntaxfehler.

Reuse the inherited environment when VCINSTALLDIR is set and append Cygwin
instead of prepending it, so MSVC's link.exe keeps precedence over Cygwin's
/usr/bin/link. A fresh shell still takes the original vcvars path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit ef93915)
Two independent failures in the Cygwin build script.

configure runs `link --version` and aborts on "GNU coreutils". Cygwin ships
such a link in /usr/bin and it can shadow MSVC's linker even when cl resolves
correctly. Front-load the directory cl lives in, which also holds link.exe.

PYTHON was exported as /usr/bin/python3 unconditionally. autoconf accepts a
preset value without testing it, so configure reports success and only fails
when the interpreter runs - on a Cygwin install without the python3 package
that is a confusing late error. Detect python3/python instead, and fail with a
clear message when neither exists. A native Windows Python works because ICU's
databuilder normalizes path separators to '/'.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit cf0bedb)
The stdext:: iterator extensions were removed from the MSVC STL - there is no
occurrence left in 14.51. cryptopp selects them through raw _MSC_VER
comparisons, which can never be correct for a removal, so both files fail with:

    error C2653: 'stdext': is not a class or namespace

Add defined(_STDEXT_BEGIN) to both guards. That is the same feature test
zdeflate.cpp already uses to pick unchecked_mismatch, and _STDEXT_BEGIN is the
macro the MSVC headers use to open that namespace. Correct in both directions:
older MSVC keeps the existing path, newer MSVC takes the portable one. The
wrappers only added debug bounds checks and warning suppression.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit a1fa93e)
…odules

Three defects in the Boost build script.

project-config.jam was written with single backslashes. Jam treats them as
escapes, so the path collapses to "C:Program FilesMicrosoft..." and b2 silently
falls back to whatever cl.exe is on PATH. The file already had a jam_path()
helper for this - it was never called.

The toolset was hard-coded as `using msvc : 14.0` while pointing at cl.exe from
14.51. Boost derives the library name tag from that value, so the libraries came
out tagged vc140 although built by the right compiler, and CMake's BoostConfig
rejected them: "(vc140, detected vc145) No suitable build variant". Derive it
from VCToolsVersion instead; MSVC's tag keeps only the first digit of the minor
version.

Only a subset of submodules is checked out, so every Boost header the project
uses must be reachable from that list. variant, spirit, ptr_container and
serialization are no longer pulled in transitively on current Boost, which
breaks libetonyek and librevenge. Note that boost/archive/** ships in
serialization - there is no module called "archive".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 45d14e7)
Boost.Regex is header-only since Boost 1.77, so Boost::regex is an INTERFACE
target. For compiled components Boost's CMake config sets BOOST_<LIB>_NO_LIB,
which switches off the auto-link pragma because CMake passes the .lib path
itself. A header-only target gets neither that define nor a library directory,
yet boost/regex/v5/cregex.hpp still emits the pragma - so linking fails with

    LNK1104: cannot open file 'libboost_regex-vc145-mt-x64-1_92.lib'

even though nothing needs to be linked. Define BOOST_REGEX_NO_LIB explicitly,
restoring what Boost's own CMake did while regex was still compiled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit bea9c98)
Some v8 dependency paths exceed MAX_PATH, e.g.
buildtools/third_party/libc++/trunk/test/std/thread/... at 264 characters. git
cannot write those files, reports "Filename too long", and the unwritten file
then surfaces as a local deletion - so gclient aborts with a misleading

    You have uncommitted changes.
    cd into v8\buildtools\third_party\libc++\trunk, run git status to see changes

Windows' LongPathsEnabled registry flag does not cover this; git needs its own
core.longpaths. Set it through GIT_CONFIG_COUNT/KEY/VALUE so the git processes
gclient spawns internally inherit it - they cannot be reached with -c.

Deliberately only longpaths. depot_tools also recommends core.autocrlf=false,
but on a tree already checked out with CRLF that makes every patch under
tools/8.9/ fail with "patch does not apply", since those are LF.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Phenitix
Phenitix requested a review from a team as a code owner August 23, 2026 08:52
@Phenitix
Phenitix requested review from DmySyz and rikled and removed request for a team August 23, 2026 08:52

@Phenitix Phenitix left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows' LongPathsEnabled registry flag does not cover this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant