Skip to content

Conan library scan incorrectly removes lib prefix from Windows .lib names #1171

Closed

Description

@ehartford

Both Windows release UAT legs at 9d8a695 now translate OpenSSL 4.0.2 but fail linking:

lld-link: error: could not open 'crypto.lib': no such file or directory
lld-link: error: could not open 'ssl.lib': no such file or directory

The Conan package manifest for recipe b700c658ab174d6ef1bbd719ca441236, Windows x86_64 package 2962650defb331e6d5396b541575d7735fb220d7, package revision e4e0a1ea938963c5ceb0cbc96050a699 contains lib/libcrypto.lib and lib/libssl.lib.

Root: conan_library_name_from_path, src/compiler/ConanClient.w:542, strips a leading lib after removing every supported suffix, including .lib. Unix -l lookup adds a lib prefix; the Windows linker does not. This corrupts metadata for every COFF library whose actual filename starts with lib.

Native LLDB on an exact copy of ConanClient with a local main replaying the package filenames stops at conan_library_name_from_path + 596, line 543. The source is libcrypto, slice start is 3, and slice end is 9. Stepping out returns crypto (length 6). Evidence: out/with-get-investigation/conan-library-name-strip-lldb.log and windows-openssl-manifest.txt.

The generic fix handles .lib suffix removal separately, preserving the complete basename. A matrix covers libcrypto/libssl/libcurl_imp, unprefixed Windows names, and Unix static/shared/versioned libraries. Actual Windows UAT remains mandatory before closure; no package-specific link override.

Activity

  1. added 3 commits that reference this issue on Sep 18, 2026
    5a9577f
    c93e4bd
    84e5a41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions