Closed as duplicate of#122707
fatal error when building the OpenBLAS ThunderX2 and some other dynamic kernels for Windows on ARM#69454
Bug
Description
I gave it another try on building OpenBLAS with DYNAMIC_ARCH=ON (see https://github.com/msys2/MINGW-packages/blob/b07f75117ed0cfe6e1f000de7caaffb433cb8c80/mingw-w64-openblas/PKGBUILD#L72) for Windows on ARM after patching Clang with #67894
Is it possible that I also have to add another patch for supporting the whole fix or this something new related only to ThunderX2?
Clang is still crashing.
[9616/15543] Building C object kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj
FAILED: kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj
C:\msys64\clangarm64\bin\clang.exe -IC:/M_P/mingw-w64-openblas/src/OpenBLAS-0.3.24/lapack-netlib/LAPACKE/include -IC:/M_P/mingw-w64-openblas/src/OpenBLAS-0.3.24 -IC:/M_P/mingw-w64-openblas/src/build-CLANGARM64-32/kernel_config/THUNDERX2T99 -Wno-unused-function -Wno-unused-variable -DHAVE_C11 -DMS_ABI -fopenmp=libomp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=64 -DMAX_PARALLEL_NUMBER=1 -DNO_AFFINITY -DVERSION="\"0.3.24\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 -O3 -DNDEBUG -DBUILD_KERNEL -DTABLE_NAME=gotoblas_THUNDERX2T99 -DTS=_THUNDERX2T99 -MD -MT kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj -MF kernel\CMakeFiles\kernel_THUNDERX2T99.dir\CMakeFiles\dcopy_k_THUNDERX2T99.c.obj.d -o kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj -c C:/M_P/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dcopy_k_THUNDERX2T99.c
fatal error: error in backend: Failed to evaluate function length in SEH unwind info
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: C:\\msys64\\clangarm64\\bin\\clang.exe -IC:/M_P/mingw-w64-openblas/src/OpenBLAS-0.3.24/lapack-netlib/LAPACKE/include -IC:/M_P/mingw-w64-openblas/src/OpenBLAS-0.3.24 -IC:/M_P/mingw-w64-openblas/src/build-CLANGARM64-32/kernel_config/THUNDERX2T99 -Wno-unused-function -Wno-unused-variable -DHAVE_C11 -DMS_ABI -fopenmp=libomp -DUSE_OPENMP -Wall -DF_INTERFACE_GFORT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=64 -DMAX_PARALLEL_NUMBER=1 -DNO_AFFINITY -DVERSION=\"0.3.24\" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 -O3 -DNDEBUG -DBUILD_KERNEL -DTABLE_NAME=gotoblas_THUNDERX2T99 -DTS=_THUNDERX2T99 -MD -MT kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj -MF kernel\\CMakeFiles\\kernel_THUNDERX2T99.dir\\CMakeFiles\\dcopy_k_THUNDERX2T99.c.obj.d -o kernel/CMakeFiles/kernel_THUNDERX2T99.dir/CMakeFiles/dcopy_k_THUNDERX2T99.c.obj -c C:/M_P/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dcopy_k_THUNDERX2T99.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'C:/M_P/mingw-w64-openblas/src/build-CLANGARM64-32/kernel/CMakeFiles/dcopy_k_THUNDERX2T99.c'.
4. Running pass 'AArch64 Assembly Printer' on function '@dcopy_k_THUNDERX2T99'
Exception Code: 0xE0000046
#0 0x00007fff9ff06334 (C:\Windows\System32\KERNELBASE.dll+0x76334)
#1 0x00007ffef8f85ad0 llvm::CrashRecoveryContext::HandleExit(int) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x85ad0)
#2 0x00007ffef9029ff4 llvm::sys::Process::Exit(int, bool) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x129ff4)
#3 0x00007ff7519b6fe8 llvm::InitializeAllAsmPrinters() (C:\msys64\clangarm64\bin\clang.exe+0x6fe8)
#4 0x00007ffef8f9323c llvm::report_fatal_error(llvm::Twine const&, bool) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x9323c)
#5 0x00007ffef8f9311c llvm::report_fatal_error(char const*, bool) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x9311c)
#6 0x00007ffefa5e8f4c llvm::Win64EH::ARM64UnwindEmitter::Emit(llvm::MCStreamer&) const (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x16e8f4c)
#7 0x00007ffefa5de8d4 llvm::MCStreamer::emitWinCFIEndProc(llvm::SMLoc) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x16de8d4)
#8 0x00007ffef9938478 llvm::WinException::endFuncletImpl() (C:\msys64\clangarm64\bin\libLLVM-17.dll+0xa38478)
#9 0x00007ffef99380a8 llvm::WinException::endFunction(llvm::MachineFunction const*) (C:\msys64\clangarm64\bin\libLLVM-17.dll+0xa380a8)
#10 0x00007ffef98d848c llvm::AsmPrinter::emitFunctionBody() (C:\msys64\clangarm64\bin\libLLVM-17.dll+0x9d848c)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 17.0.2
Target: aarch64-w64-windows-gnu
Thread model: posix
InstalledDir: C:/msys64/clangarm64/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: C:/msys64/tmp/dcopy_k_THUNDERX2T99-ce9e97.c
clang: note: diagnostic msg: C:/msys64/tmp/dcopy_k_THUNDERX2T99-ce9e97.sh
clang: note: diagnostic msg:
********************
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Aborting...