Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cmake/build output with invalid encoding when the cmake geneartor are Ninja #1615

Closed
lygstate opened this issue Jan 12, 2021 · 7 comments
Closed
Labels
Feature: build Feature: settings world ready World Readiness - ensuring we are globally ready with our localized content
Milestone

Comments

@lygstate
Copy link
Contributor

Brief Issue Summary

The outputs

[main] Building folder: jerryscript 
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/work/study/languages/typescript/jerryscript/build/reldeb --config RelWithDebInfo --target all -- -j 18
[build] [1/1   0% :: 0.000] Re-running CMake...
[build] -- CMAKE_BUILD_TYPE               RelWithDebInfo
[build] -- CMAKE_C_COMPILER_ID            MSVC
[build] -- CMAKE_SYSTEM_NAME              Windows
[build] -- CMAKE_SYSTEM_PROCESSOR         AMD64
[build] -- BUILD_SHARED_LIBS              OFF
[build] -- ENABLE_AMALGAM                 OFF
[build] -- ENABLE_LTO                     ON
[build] -- ENABLE_STRIP                   OFF (FORCED BY COMPILER)
[build] -- JERRY_VERSION                  2.4.0
[build] -- JERRY_CMDLINE                  ON
[build] -- JERRY_CMDLINE_TEST             OFF
[build] -- JERRY_CMDLINE_SNAPSHOT         OFF
[build] -- JERRY_LIBFUZZER                OFF (FORCED BY COMPILER)
[build] -- JERRY_PORT_DEFAULT             ON (FORCED BY CMDLINE OR LIBFUZZER OR TESTS)
[build] -- JERRY_EXT                      ON (FORCED BY CMDLINE OR TESTS)
[build] -- JERRY_MATH                     OFF
[build] -- UNITTESTS                      OFF
[build] -- DOCTESTS                       OFF
[build] -- JERRY_CPOINTER_32_BIT          ON (FORCED BY HEAP SIZE)
[build] -- JERRY_DEBUGGER                 OFF
[build] -- JERRY_ERROR_MESSAGES           OFF
[build] -- JERRY_EXTERNAL_CONTEXT         OFF
[build] -- JERRY_PARSER                   ON
[build] -- JERRY_LINE_INFO                ON
[build] -- JERRY_LOGGING                  OFF
[build] -- JERRY_MEM_STATS                OFF
[build] -- JERRY_MEM_GC_BEFORE_EACH_ALLOC OFF
[build] -- JERRY_PARSER_DUMP_BYTE_CODE    OFF
[build] -- JERRY_PROFILE                  es.next
[build] -- JERRY_REGEXP_STRICT_MODE       OFF
[build] -- JERRY_REGEXP_DUMP_BYTE_CODE    OFF
[build] -- JERRY_SNAPSHOT_EXEC            OFF
[build] -- JERRY_SNAPSHOT_SAVE            OFF
[build] -- JERRY_SYSTEM_ALLOCATOR         OFF
[build] -- JERRY_VALGRIND                 OFF
[build] -- JERRY_VM_EXEC_STOP             OFF
[build] -- JERRY_GLOBAL_HEAP_SIZE         512000
[build] -- JERRY_GC_LIMIT                 (0)
[build] -- JERRY_STACK_LIMIT              (0)
[build] -- JERRY_GC_MARK_LIMIT            (8)
[build] -- FEATURE_INIT_FINI              OFF
[build] -- ENABLE_LINK_MAP                OFF
[build] -- ENABLE_COMPILE_COMMANDS        ON
[build] -- JERRY_TEST_STACK_MEASURE       OFF
[build] -- Configuring done
[build] -- Generating done
[build] -- Build files have been written to: C:/work/study/languages/typescript/jerryscript/build/reldeb
[build] [18/197   0% :: 0.136] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-helpers-string.c.obj
[build] FAILED: jerry-core/CMakeFiles/jerry-core.dir/ecma/base/ecma-helpers-string.c.obj 
[build] C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe  /nologo -DJERRY_CPOINTER_32_BIT=1 -DJERRY_DEBUGGER=0 -DJERRY_ERROR_MESSAGES=0 -DJERRY_EXTERNAL_CONTEXT=0 -DJERRY_GC_LIMIT=(0) -DJERRY_GC_MARK_LIMIT=(8) -DJERRY_GLOBAL_HEAP_SIZE=512000 -DJERRY_LINE_INFO=1 -DJERRY_LOGGING=0 -DJERRY_MEM_GC_BEFORE_EACH_ALLOC=0 -DJERRY_MEM_STATS=0 -DJERRY_NDEBUG -DJERRY_PARSER=1 -DJERRY_PARSER_DUMP_BYTE_CODE=0 -DJERRY_REGEXP_DUMP_BYTE_CODE=0 -DJERRY_REGEXP_STRICT_MODE=0 -DJERRY_SNAPSHOT_EXEC=0 -DJERRY_SNAPSHOT_SAVE=0 -DJERRY_STACK_LIMIT=(0) -DJERRY_SYSTEM_ALLOCATOR=0 -DJERRY_VALGRIND=0 -DJERRY_VM_EXEC_STOP=0 -I..\..\jerry-core\include -I..\..\jerry-core -I..\..\jerry-core\api -I..\..\jerry-core\debugger -I..\..\jerry-core\ecma\base -I..\..\jerry-core\ecma\builtin-objects -I..\..\jerry-core\ecma\builtin-objects\typedarray -I..\..\jerry-core\ecma\operations -I..\..\jerry-core\jcontext -I..\..\jerry-core\jmem -I..\..\jerry-core\jrt -I..\..\jerry-core\lit -I..\..\jerry-core\parser\js -I..\..\jerry-core\parser\regexp -I..\..\jerry-core\vm /DWIN32 /D_WINDOWS /W3 /wd4996 /MD /Zi /O2 /Ob1 /DNDEBUG /showIncludes /Fojerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-helpers-string.c.obj /Fdjerry-core\CMakeFiles\jerry-core.dir\jerry-core.pdb /FS -c ..\..\jerry-core\ecma\base\ecma-helpers-string.c
[build] ..\..\jerry-core\ecma\base\ecma-helpers-string.c(680): error C2061: ������: ��ʶ����ecma_get_internal_string��
[build] ..\..\jerry-core\ecma\base\ecma-helpers-string.c(680): error C2059: ������:��;��
[build] ..\..\jerry-core\ecma\base\ecma-helpers-string.c(680): error C2059: ������:��<parameter-list>��
[build] [18/197   1% :: 0.259] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-literal-storage.c.obj
[build] [18/197   1% :: 0.274] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-lcache.c.obj
[build] [18/197   2% :: 0.274] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-init-finalize.c.obj
[build] [18/197   2% :: 0.289] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-arraybuffer-prototype.c.obj
[build] [18/197   3% :: 0.289] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-set-prototype.c.obj
[build] [18/197   3% :: 0.301] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-helpers-errol.c.obj
[build] [18/197   4% :: 0.306] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-helpers-value.c.obj
[build] [18/197   4% :: 0.312] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-property-hashmap.c.obj
[build] [18/197   5% :: 0.315] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-set.c.obj
[build] [18/197   5% :: 0.322] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-regexp.c.obj
[build] [18/197   6% :: 0.325] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-array-iterator-prototype.c.obj
[build] [18/197   6% :: 0.328] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-regexp-prototype.c.obj
[build] [18/197   7% :: 0.329] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-module.c.obj
[build] [18/197   7% :: 0.329] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-array-prototype-unscopables.c.obj
[build] [18/197   8% :: 0.334] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-array.c.obj
[build] [18/197   8% :: 0.337] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\base\ecma-helpers.c.obj
[build] [18/197   9% :: 0.352] Building C object jerry-core\CMakeFiles\jerry-core.dir\ecma\builtin-objects\ecma-builtin-array-prototype.c.obj
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1

@lygstate lygstate changed the title Cmake/build output with invalid encoding when the cmake geneartor are default MSVC Cmake/build output with invalid encoding when the cmake geneartor are Ninja Jan 12, 2021
@bobbrow
Copy link
Member

bobbrow commented Jan 12, 2021

Does setting "cmake.outputLogEncoding": "utf8" fix it? The extension tries to select the active Windows Codepage on win32 by default, and it may not be getting the correct result.

@lygstate
Copy link
Contributor Author

Does setting "cmake.outputLogEncoding": "utf8" fix it? The extension tries to select the active Windows Codepage on win32 by default, and it may not be getting the correct result.

It's not work as you expect,

  "cmake.outputLogEncoding": "gbk",

"cmake.outputLogEncoding": "utf8" cause encoding problem

The ninja is output with windows codepage. does cmake treat ninja output always to be utf8?
I think that works for non-win platform but not for windows

@bobbrow
Copy link
Member

bobbrow commented Jan 12, 2021

does cmake treat ninja output always to be utf8?

Unfortunately, I don't know the answer to that. Does the output look correct when you run the cmake command in the VS Code Terminal, or a PowerShell/CMD prompt?

@lygstate
Copy link
Contributor Author

does cmake treat ninja output always to be utf8?

Unfortunately, I don't know the answer to that. Does the output look correct when you run the cmake command in the VS Code Terminal, or a PowerShell/CMD prompt?

Valid in PowerShell/CMD prompt, VS Code Terminal not working because the MSVC bat env not setup properly

@andreeis andreeis added the world ready World Readiness - ensuring we are globally ready with our localized content label Jan 25, 2021
@andreeis andreeis added this to the On Deck milestone Jan 25, 2021
@andreeis andreeis modified the milestones: On Deck, 1.7.2 May 4, 2021
@andreeis
Copy link
Contributor

andreeis commented May 4, 2021

@taoyouh, @lygstate, if you would like, you can try this vsix (https://github.com/microsoft/vscode-cmake-tools/actions/runs/811030625) to get unblocked with a fix for this issue before we release 1.7.2.

andreeis added a commit that referenced this issue May 6, 2021
* Fix typo in CMakePresets.json schema (#1809)

MinSizRel => MinSizeRel

* update version to 1.7.2

* Localize an error message

* Added counts for presets (#1819)

* override the locale when querying compiler versions (#1824)

* Adopt new localization process (#1831)

* Fix Operator Precedence when Getting Code Page (#1808)

The replacing should happen after the "??" operator.

Fixes #1615

Co-authored-by: Andreea Isac <48239328+andreeis@users.noreply.github.com>

* If we have both "-DCMAKE_GENERATOR:STRING=" and the generator from (#1753)

toolchain, prefre using "-DCMAKE_GENERATOR:STRING=", as
"-DCMAKE_GENERATOR:STRING=" can be defined by different cmake-variants.yaml

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>

Co-authored-by: Andreea Isac <48239328+andreeis@users.noreply.github.com>

* Use stricter type checks in presets expansion (#1818)

* Use stricter type checks in presets expansion

* Resolving comments

Co-authored-by: Andreea Isac <48239328+andreeis@users.noreply.github.com>

* Fix paths of target sources outside the workspace (#1816)

* Fix paths of target sources outside the workspace

For more details, see:
#1504

* Add test for source files outside of workspace root

Co-Authored-By: Elson Wei <elson.wei@gmail.com>

Co-authored-by: Elson Wei <elson.wei@gmail.com>
Co-authored-by: Bob Brown <bobbrow@users.noreply.github.com>

* CHANGELOG updates for 1.7.2 (#1837)

Co-authored-by: BlueC0re <bluec0re@users.noreply.github.com>
Co-authored-by: Bob Brown <bobbrow@users.noreply.github.com>
Co-authored-by: Bob Brown (DEVDIV) <bobbrow@microsoft.com>
Co-authored-by: xisui-MSFT <44103947+xisui-MSFT@users.noreply.github.com>
Co-authored-by: Colen Garoutte-Carson <49173979+Colengms@users.noreply.github.com>
Co-authored-by: Huang, Zhaoquan <zhaoquan2008@hotmail.com>
Co-authored-by: Yonggang Luo <luoyonggang@gmail.com>
Co-authored-by: Simon Leiner <sleiner@users.noreply.github.com>
Co-authored-by: Elson Wei <elson.wei@gmail.com>
@andreeis
Copy link
Contributor

andreeis commented May 6, 2021

CMake Tools 1.7.2 was released today and it contains a fix for this problem. Upgrade the extension and let us know if you encounter any other issues.

@lygstate
Copy link
Contributor Author

lygstate commented May 7, 2021

thanks, works now

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature: build Feature: settings world ready World Readiness - ensuring we are globally ready with our localized content
Projects
None yet
Development

No branches or pull requests

3 participants