Project

General

Profile

Actions

Bug #10941

closed

[MSVC] Wt failed to build with error C2026 on MSVC

Added by mi niMo over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Roel Standaert
Target version:
Start date:
09/14/2022
Due date:
% Done:

100%

Estimated time:

Description

Hi all,
Wt fails to build on MSVC due to error C2026. Could you help look?
Error message
F:\gitP\emweb\wt\build_amd64\src\Wt_js.C(34,3): error C2026: string too big, trailing characters truncated [F:\gitP\emweb\wt\build_amd64\src\wt.vcxproj]
Expected Behaviour
build successfully.
version info
OS Version: windows server 2019
VS version: VS2019 (16.11.18)
the commit of Wt we use is 0a2ea66
Repro steps

  1. git clone https://github.com/emweb/wt F:\gitP\emweb\wt
  2. set VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
  3. xcopy F:\tools\Boost\Patch\boost_1_67_0\x64\boost\iostream\Changed\fpos.hpp F:\gitP\emweb\wt..\boost_1_67_0\x64\boost\iostreams\detail\config /k/r/i/c/f/y
  4. mkdir F:\gitP\emweb\wt\build_amd64 and cd F:\gitP\emweb\wt\build_amd64
  5. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DBOOST_PREFIX=F:\gitP\emweb\wt..\boost_1_67_0\x64 -DBOOST_LIBRARYDIR=F:\gitP\emweb\wt..\boost_1_67_0\x64\lib64-msvc-14.1 .. 2>&1
  6. msbuild /m /p:Platform=x64 /p:Configuration=Release ALL_BUILD.vcxproj /t:Rebuild 2>&1

Files

build (7).log (282 KB) build (7).log Detail log mi niMo, 09/14/2022 10:24 AM

Related issues 1 (0 open1 closed)

Related to Bug #11006: filetostring.cmake generates file literals that exceed the minimum maximum string literal lengthClosedRoel Standaert10/13/2022

Actions
Actions #1

Updated by Roel Standaert over 1 year ago

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version set to 4.9.0

It appears that our new minifier (terser) doesn't insert quite as many newlines as our old one (an old Google closure compiler version), and our filetostring CMake script starts a new string literal at every newline. This means that we're running into MSVC's maximum for string literal sizes: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2026.

Actions #2

Updated by Roel Standaert over 1 year ago

  • Status changed from InProgress to Review
  • Assignee deleted (Roel Standaert)
Actions #3

Updated by Roel Standaert over 1 year ago

  • Priority changed from Normal to High
Actions #4

Updated by Roel Standaert over 1 year ago

  • Assignee set to Korneel Dumon
Actions #5

Updated by Roel Standaert over 1 year ago

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Korneel Dumon to Roel Standaert
  • % Done changed from 0 to 100
Actions #6

Updated by Roel Standaert over 1 year ago

  • Status changed from Implemented @Emweb to Resolved
Actions #7

Updated by Roel Standaert over 1 year ago

  • Related to Bug #11006: filetostring.cmake generates file literals that exceed the minimum maximum string literal length added
Actions #8

Updated by Roel Standaert over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF