llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.18k stars 12.04k forks source link

[lldb] Build failure with LZMA support on windows #107407

Open R-Goc opened 2 months ago

R-Goc commented 2 months ago

On x86-64-pc-windows-msvc compiling with clang-cl and lld-link, attempting to build lldb with lzma support causes the following build failure:

[7103/7877] Linking CXX shared library bin\liblldb.dll
FAILED: bin/liblldb.dll lib/liblldb.lib
C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=tools\lldb\source\API\CMakeFiles\liblldb.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\Users\rysza\bin\LLVM\bin\lld-link.exe /nologo @CMakeFiles\liblldb.rsp  /out:bin\liblldb.dll /implib:lib\liblldb.lib /pdb:bin\liblldb.pdb /dll /version:20.0 /machine:x64 -fuse-ld=lld-link /INCREMENTAL:NO && cd ."
LINK: command "C:\Users\rysza\bin\LLVM\bin\lld-link.exe /nologo @CMakeFiles\liblldb.rsp /out:bin\liblldb.dll /implib:lib\liblldb.lib /pdb:bin\liblldb.pdb /dll /version:20.0 /machine:x64 -fuse-ld=lld-link /INCREMENTAL:NO /MANIFEST:EMBED,ID=2" failed (exit code 1) 
lld-link: error: undefined symbol: __declspec(dllimport) lzma_stream_footer_decode
> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp
> >>>               lldbHost.lib(LZMA.cpp.obj)
> 
> lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_buffer_decode
> >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp
> >>>               lldbHost.lib(LZMA.cpp.obj)
> 
> lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_uncompressed_size
> >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp
> >>>               lldbHost.lib(LZMA.cpp.obj)
> 
> lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_end
> >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp
> >>>               lldbHost.lib(LZMA.cpp.obj)
> 
> lld-link: error: undefined symbol: __declspec(dllimport) lzma_stream_buffer_decode
> >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp
> >>>               lldbHost.lib(LZMA.cpp.obj)
> 

LLVM version 20.0.0git from around a month ago.

llvmbot commented 2 months ago

@llvm/issue-subscribers-lldb

Author: None (R-Goc)

On x86-64-pc-windows-msvc compiling with clang-cl and lld-link, attempting to build lldb with lzma support causes the following build failure: ``` [7103/7877] Linking CXX shared library bin\liblldb.dll FAILED: bin/liblldb.dll lib/liblldb.lib C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=tools\lldb\source\API\CMakeFiles\liblldb.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\Users\rysza\bin\LLVM\bin\lld-link.exe /nologo @CMakeFiles\liblldb.rsp /out:bin\liblldb.dll /implib:lib\liblldb.lib /pdb:bin\liblldb.pdb /dll /version:20.0 /machine:x64 -fuse-ld=lld-link /INCREMENTAL:NO && cd ." LINK: command "C:\Users\rysza\bin\LLVM\bin\lld-link.exe /nologo @CMakeFiles\liblldb.rsp /out:bin\liblldb.dll /implib:lib\liblldb.lib /pdb:bin\liblldb.pdb /dll /version:20.0 /machine:x64 -fuse-ld=lld-link /INCREMENTAL:NO /MANIFEST:EMBED,ID=2" failed (exit code 1) lld-link: error: undefined symbol: __declspec(dllimport) lzma_stream_footer_decode > referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp > >>> lldbHost.lib(LZMA.cpp.obj) > > lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_buffer_decode > >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp > >>> lldbHost.lib(LZMA.cpp.obj) > > lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_uncompressed_size > >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp > >>> lldbHost.lib(LZMA.cpp.obj) > > lld-link: error: undefined symbol: __declspec(dllimport) lzma_index_end > >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp > >>> lldbHost.lib(LZMA.cpp.obj) > > lld-link: error: undefined symbol: __declspec(dllimport) lzma_stream_buffer_decode > >>> referenced by C:\Users\rysza\lib\llvm-project\lldb\source\Host\common\LZMA.cpp > >>> lldbHost.lib(LZMA.cpp.obj) > ``` LLVM version 20.0.0git from around a month ago.