Project

General

Profile

Bug #10941

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

Added by mi niMo 3 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
High
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

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

Actions
#1

Updated by Roel Standaert 3 months 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.

#2

Updated by Roel Standaert 3 months ago

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

Updated by Roel Standaert 3 months ago

  • Priority changed from Normal to High
#4

Updated by Roel Standaert 2 months ago

  • Assignee set to Korneel Dumon
#5

Updated by Roel Standaert 2 months ago

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

Updated by Roel Standaert 2 months ago

  • Status changed from Implemented @Emweb to Resolved
#7

Updated by Roel Standaert about 2 months ago

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

Also available in: Atom PDF