Fix Windows build: build libolm as shared library (DLL)#94
Fix Windows build: build libolm as shared library (DLL)#94
Conversation
The Windows build was failing because the workflow checked for olm_static.lib, but CMake with BUILD_SHARED_LIBS=OFF creates olm.lib directly. Updated the check to verify that olm.lib exists instead of trying to copy from a non-existent olm_static.lib file. Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
|
@copilot This doesn't fix the issue in the last build and release workflow, all this does is return that the process completes correctly without error |
I need to understand the actual failure better. Looking at the error message, it showed that Can you clarify what the actual issue is? Is the problem that:
If you have logs from the actual build failure (not just the library check), that would help me identify the root cause.
You're absolutely right. I've fixed the actual issue now in commit The problem was that the workflow was building libolm as a static library ( The fix changes
Also added |
The Windows build was creating a static library (olm.lib) instead of a shared library. Python-olm on Windows requires a DLL (olm.dll) with its import library (olm.lib) for proper linking and runtime loading. Changed BUILD_SHARED_LIBS from OFF to ON, added DLL path verification, and added bin directory to PATH for runtime DLL discovery. Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
|
@CJFWeatherhead |
Windows build was failing because libolm was being built as a static library instead of a shared library (DLL). Python-olm on Windows requires a DLL with an import library for proper linking and runtime loading.
Changes
BUILD_SHARED_LIBSfromOFFtoONin CMake configurationolm.dll(shared library) andolm.lib(import library)C:\olm-install\binto PATH for runtime DLL discoveryRoot Cause
On Windows, CMake with:
BUILD_SHARED_LIBS=OFFcreates onlyolm.lib(static library)BUILD_SHARED_LIBS=ONcreatesolm.dll(shared library) +olm.lib(import library)Python extensions on Windows require shared libraries (DLLs), not static libraries.
Before
After
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.