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

Rapidyaml failed to build due to fatal error C1189: #error: "unknown endianness" with MSVC on windows arm64 #221

Open
spacelg opened this issue Feb 28, 2022 · 3 comments

Comments

@spacelg
Copy link

spacelg commented Feb 28, 2022

Hi All,

Environment:
VS 2019 + Windows Server 2019

Rapidyaml failed to build due to fatal error C1189: #error: "unknown endianness" with MSVC on windows arm64. It can be reproduced on latest version ed547aa on master branch. Could you please help look at this issue? Does Rapidyaml support windows arm64?

ARM64_build_log:
build_arm64.zip

Repro steps:

  1. git clone https://github.com/biojppm/rapidyaml F:\gitP\biojppm\rapidyaml
  2. cd F:\gitP\biojppm\rapidyaml && git -C "F:\gitP\biojppm\rapidyaml" submodule update --init --recursive
  3. mkdir build_arm64 && cd build_arm64
  4. cmake -G "Visual Studio 16 2019" -A arm64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DRYML_BUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=install/dir ..
  5. msbuild /m /p:Platform=arm64 /p:Configuration=Release ryml.sln /t:Rebuild

Error info:
62>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\ryml.vcxproj]
64>ClCompile:
log.cpp
62>ClCompile:
node.cpp
65>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\subprojects\c4fs\build\c4fs.vcxproj]
66>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\arm64\CL.exe /c /IF:\gitP\biojppm\rapidyaml\ext\c4core\src /nologo /W3 /WX- /diagnostics:column /O2 /Ob2 /Oy- /D _ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 /D _MBCS /D WIN32 /D _WINDOWS /D NDEBUG /D "CMAKE_INTDIR="Release"" /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"c4core.dir\Release\" /Fd"F:\gitP\biojppm\rapidyaml\build_arm64\subprojects\c4core\build\Release\c4core.pdb" /external:W3 /Gd /TP /analyze- /errorReport:queue F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\base64.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\char_traits.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\error.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\format.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\language.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\memory_resource.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\memory_util.cpp F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4\utf.cpp
65>ClCompile:
base64.cpp
62>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\ryml.vcxproj]
parse.cpp
62>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\ryml.vcxproj]
preprocess.cpp
66>ClCompile:
base64.cpp
62>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\ryml.vcxproj]
tree.cpp
65>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\subprojects\c4fs\build\c4fs.vcxproj]
char_traits.cpp
64>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\test\subprojects\c4log\build\c4log.vcxproj]
base64.cpp
62>F:\gitP\biojppm\rapidyaml\ext\c4core\src\c4/cpu.hpp(79,1): fatal error C1189: #error: "unknown endianness" [F:\gitP\biojppm\rapidyaml\build_arm64\ryml.vcxproj]

@biojppm
Copy link
Owner

biojppm commented Feb 28, 2022

Indeed, aarm64 under windows is not implemented yet. Hold on for a fix; it's just a matter of adding some preprocessor branches and ensuring the tests run and pass there.

@biojppm
Copy link
Owner

biojppm commented Feb 28, 2022

Based on this MSDN article, arm64 should be little-endian. @spacelg can you verify this works for you?
image

biojppm added a commit to biojppm/c4core that referenced this issue Mar 1, 2022
@spacelg
Copy link
Author

spacelg commented Mar 2, 2022

@biojppm Sorry for late reply, and thanks for your workaround. I've tried this workaround, it works for windows arm64.

Thanks,
Lin

biojppm added a commit to biojppm/c4core that referenced this issue Mar 16, 2022
biojppm added a commit to biojppm/c4core that referenced this issue Mar 17, 2022
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

No branches or pull requests

2 participants