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

Failed to build c code with CMake on Windows #402

Closed
leochou0729 opened this issue Jun 25, 2024 · 5 comments · Fixed by #404
Closed

Failed to build c code with CMake on Windows #402

leochou0729 opened this issue Jun 25, 2024 · 5 comments · Fixed by #404
Assignees
Labels
bug Something isn't working CMake

Comments

@leochou0729
Copy link

leochou0729 commented Jun 25, 2024

Hello,
I try to build Blake3 into a static lib on Windows as follows:
cmake . -A Win32 -DBUILD_SHARED_LIBS=OFF
cmake --build . --config Release

But the build process ends with these errors.
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(9): error A2006: undefined symbol : r15 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(10): error A2006: undefined symbol : r14 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(11): error A2006: undefined symbol : r13 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(12): error A2006: undefined symbol : r12 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(13): error A2006: undefined symbol : rsi [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(14): error A2006: undefined symbol : rdi [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(15): error A2006: undefined symbol : rbx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(16): error A2006: undefined symbol : rbp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(17): error A2006: undefined symbol : rbp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(18): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(19): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(20): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(21): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(22): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(23): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(24): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(25): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(26): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(27): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(28): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(29): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(30): error A2006: undefined symbol : rdi [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(31): error A2006: undefined symbol : rsi [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(32): error A2006: undefined symbol : rdx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(33): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(34): error A2006: undefined symbol : r8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(35): error A2006: undefined symbol : r9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(36): error A2006: undefined symbol : r9d [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(37): error A2006: undefined symbol : r9d [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(39): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(40): error A2074: cannot access label through segment registers [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(41): error A2074: cannot access label through segment registers [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(42): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(43): error A2006: undefined symbol : r8d [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(46): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(47): error A2074: cannot access label through segment registers [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(48): error A2074: cannot access label through segment registers [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(50): error A2006: undefined symbol : r8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(51): error A2006: undefined symbol : r8d [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(54): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(55): error A2006: undefined symbol : rdx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(56): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(57): error A2006: undefined symbol : rsi [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(60): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(61): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(62): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(63): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(64): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(65): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(66): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(67): error A2006: undefined symbol : rcx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(68): error A2006: undefined symbol : r8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(69): error A2006: undefined symbol : r9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(70): error A2006: undefined symbol : r10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(71): error A2006: undefined symbol : r11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(72): error A2006: undefined symbol : r12 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(73): error A2006: undefined symbol : r13 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(74): error A2006: undefined symbol : r14 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(75): error A2006: undefined symbol : r15 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(76): error A2006: undefined symbol : rbp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(77): error A2006: undefined symbol : rbp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(82): error A2006: undefined symbol : rbp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(84): error A2006: undefined symbol : rdx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(85): error A2006: undefined symbol : rdx [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(87): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(88): error A2006: undefined symbol : xmm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(89): error A2006: undefined symbol : ymm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(90): error A2006: undefined symbol : xmm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(91): error A2006: undefined symbol : ymm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(92): error A2006: undefined symbol : ymm12 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(93): error A2006: undefined symbol : ymm13 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(94): error A2006: undefined symbol : xmm10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(95): error A2006: undefined symbol : ymm10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(96): error A2006: undefined symbol : xmm11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(97): error A2006: undefined symbol : ymm11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(98): error A2006: undefined symbol : ymm14 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(99): error A2006: undefined symbol : ymm15 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(100): error A2006: undefined symbol : ymm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(101): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(102): error A2006: undefined symbol : ymm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(103): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(104): error A2006: undefined symbol : ymm10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(105): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(106): error A2006: undefined symbol : ymm11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(107): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(108): error A2006: undefined symbol : xmm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(109): error A2006: undefined symbol : ymm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(110): error A2006: undefined symbol : xmm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(111): error A2006: undefined symbol : ymm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(112): error A2006: undefined symbol : ymm12 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(113): error A2006: undefined symbol : ymm13 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(114): error A2006: undefined symbol : xmm10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(115): error A2006: undefined symbol : ymm10 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(116): error A2006: undefined symbol : xmm11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(117): error A2006: undefined symbol : ymm11 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(118): error A2006: undefined symbol : ymm14 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(119): error A2006: undefined symbol : ymm15 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(120): error A2006: undefined symbol : ymm8 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(121): error A2006: undefined symbol : rsp [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(122): error A2006: undefined symbol : ymm9 [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm(123): fatal error A1012: error count exceeds 100; stopping assembly [C:\Users\leo\Downloads\BLAKE3-1.5.1\c\build\blake3.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\masm.targets(69,5): error MSB3721: 命令“ml.exe /c /nologo /Zi /Fo"blake3.dir\Release\blake3_avx2_x86-64_windows_msvc.obj" /D"WIN32"
/D"_WINDOWS" /D"NDEBUG" /D"CMAKE_INTDIR="Release"" /I "C:\Users\leo\Downloads\BLAKE3-1.5.1\c" /W3 /errorReport:prompt /Ta"C:\Users\leo\Downloads\BLAKE3-1.5.1\c\blake3_avx2_x86-64_windows_msvc.asm"”已退出,返回代码为 1。 [C:\Users\leo\Downloads
BLAKE3-1.5.1\c\build\blake3.vcxproj]

I'm using Visual Studio 2017.
Could anyone tell me how to fix it? Thanks!

@oconnor663
Copy link
Member

When I try the commands you mentioned on my Windows machine (VS 2022), I get similar errors. But the errors go away if I remove the -A Win32 flag. Is there a particular reason you included that flag?

@leochou0729
Copy link
Author

My VS 2017 still prints these errors when I remove -A Win32. VS 2022 seems to have no problem, but I need to build both x86 and x64 versions. How can I do that? Thanks!

@sneves
Copy link
Collaborator

sneves commented Jun 28, 2024

-A Win32 targets 32-bit Windows, whereas the .asm files are x64-specific. 32-bit builds should use the intrinsics implementations.

The CMake file seems to have this logic implemented but I guess the detection logic is not correct? Specifically, CMAKE_SYSTEM_PROCESSOR is used but this is not a 1-1 map to the target architecture.

@oconnor663
Copy link
Member

@BurningEnlightenment do you think we need a CMake fix here?

@BurningEnlightenment
Copy link
Collaborator

BurningEnlightenment commented Jun 30, 2024

I will take a [closer] look tomorrow.

EDIT: It seems like MSVC needs special treatment w.r.t. CMAKE_SYSTEM_PROCESSOR until the CMake folks decide on a path forward [1][2]. Specifically we need to consult CMAKE_C_COMPILER_ARCHITECTURE_ID for MSVC and clang-cl to get the correct architecture. The only workaround in the meantime is to use the x86 CMake build for building x86 Windows binaries.

BurningEnlightenment added a commit to BurningEnlightenment/BLAKE3 that referenced this issue Jul 2, 2024
BurningEnlightenment added a commit to BurningEnlightenment/BLAKE3 that referenced this issue Jul 2, 2024
@BurningEnlightenment BurningEnlightenment self-assigned this Jul 2, 2024
@BurningEnlightenment BurningEnlightenment added bug Something isn't working CMake labels Jul 2, 2024
BurningEnlightenment added a commit to BurningEnlightenment/BLAKE3 that referenced this issue Jul 2, 2024
oconnor663 pushed a commit that referenced this issue Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants