Skip to content

Windows: link manifest records Vulkan import lib as vulkan, breaking non-CMake consumers (LNK1181) - #103

Merged
cjpais merged 1 commit into
handy-computer:mainfrom
MorrisonLiu:win-vulkan-import-lib
Aug 30, 2026
Merged

cjpais merged 1 commit into
handy-computer:mainfrom
MorrisonLiu:win-vulkan-import-lib

Conversation

@MorrisonLiu

Copy link
Copy Markdown
Contributor

cmake/transcribe-install.cmake writes vulkan into transcribe-link.json's system_libs on every OS, but Windows' LunarG SDK ships the import lib as vulkan-1.lib — so a consumer reconstructing the link line from the manifest (the Rust -sys crate, the link_smoke C consumer) asks MSVC for a nonexistent vulkan.lib and dies with LNK1181: cannot open input file 'vulkan.lib'.

The in-tree ggml-vulkan target links fine because it uses find_package(Vulkan)Vulkan::Vulkan (an absolute path); only the hand-written manifest reconstruction hardcodes the Unix basename.

Fix: emit vulkan-1 under if(WIN32) and vulkan otherwise, matching how whisper-rs-sys resolves the same import lib. Non-Windows output is byte-identical.

cmake/transcribe-install.cmake records `vulkan` into transcribe-link.json's
system_libs on every OS, but Windows' LunarG SDK ships the import lib as
`vulkan-1.lib`. A consumer that reconstructs the link line from the manifest
(the Rust -sys crate, the link_smoke C consumer) then asks MSVC for a
nonexistent `vulkan.lib` and dies with LNK1181: cannot open input file
'vulkan.lib'.

The in-tree ggml-vulkan target links fine because it uses
find_package(Vulkan) -> Vulkan::Vulkan (an absolute path); only the
hand-written manifest reconstruction hardcodes the Unix basename.

Emit `vulkan-1` under if(WIN32) and `vulkan` otherwise, matching how
whisper-rs-sys resolves the same import lib. Non-Windows output is byte
identical.
@MorrisonLiu
MorrisonLiu requested a review from cjpais as a code owner July 21, 2026 13:32
@cjpais

cjpais commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Thanks. I'll try to take a look at this and pull it in soon

@cjpais
cjpais merged commit 45da295 into handy-computer:main Aug 30, 2026
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

Successfully merging this pull request may close these issues.

2 participants