BLAKE3-team / BLAKE3

the official Rust and C implementations of the BLAKE3 cryptographic hash function
Apache License 2.0
4.71k stars 315 forks source link

Compilation failure on Windows when using clang-cl (blake3 1.5.0) #385

Closed abique closed 4 months ago

abique commented 4 months ago

install-x64-windows-bitwig-rel-out.log

abique commented 4 months ago

Maybe easier like this:

[7/9] C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\clang-cl.exe     /nologo /DWIN32 /D_WINDOWS /W3 /utf-8  /nologo /DWIN32 /D_WINDOWS /utf-8 /w /MP -m64 /MT /O2 /Oi /Gy /DNDEBUG /Z7 /DNDEBUG /O2 /Ob3 /D_DISABLE_STRING_ANNOTATION /D_DISABLE_VECTOR_ANNOTATION /D_ITERATOR_DEBUG_LEVEL=0 /showIncludes /FoCMakeFiles\blake3.dir\blake3_dispatch.c.obj /FdCMakeFiles\blake3.dir\blake3.pdb -c -- C:\j\workspace\ext-libs\src\vcpkg\buildtrees\blake3\src\1.5.0-44da76e0b5.clean\c\blake3_dispatch.c
FAILED: CMakeFiles/blake3.dir/blake3_dispatch.c.obj 
C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\clang-cl.exe     /nologo /DWIN32 /D_WINDOWS /W3 /utf-8  /nologo /DWIN32 /D_WINDOWS /utf-8 /w /MP -m64 /MT /O2 /Oi /Gy /DNDEBUG /Z7 /DNDEBUG /O2 /Ob3 /D_DISABLE_STRING_ANNOTATION /D_DISABLE_VECTOR_ANNOTATION /D_ITERATOR_DEBUG_LEVEL=0 /showIncludes /FoCMakeFiles\blake3.dir\blake3_dispatch.c.obj /FdCMakeFiles\blake3.dir\blake3.pdb -c -- C:\j\workspace\ext-libs\src\vcpkg\buildtrees\blake3\src\1.5.0-44da76e0b5.clean\c\blake3_dispatch.c
C:\j\workspace\ext-libs\src\vcpkg\buildtrees\blake3\src\1.5.0-44da76e0b5.clean\c\blake3_dispatch.c(34,23): error: token is not a valid binary operator in a preprocessor subexpression
#elif defined(IS_X86) and defined(_MSC_VER)
      ~~~~~~~~~~~~~~~~^~~
1 error generated.
ninja: build stopped: subcommand failed.
abique commented 4 months ago

Sorry about this issue, it turns out that it is a vcpkg patch 🤦