question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[zlib] zlib/1.2.12: Compilation with Clang on Windows produces the wrong library name (z.lib instead of zlib.lib)

See original GitHub issue

Description

To elaborate on the title:

  • When building zlib on Windows with MSVC, the produced library is named zlib.lib, as intended by all generators which try to locate a file with basename zlib.

  • If zlib is built with Conan 15 on Windows, the produced library is names z.lib instead, which breaks downstreams because they expect zlib basename.

Package and Environment Details

  • Package Name/Version: libpng/1.6.38
  • Operating System+version: Windows 10
  • Compiler+version: Clang 15 (scoop install llvm)
  • Conan version: conan 1.53.0

Conan profile

[settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=clang compiler.cppstd=20 compiler.version=15 os=Windows os_build=Windows [options] [build_requires] *: cmake/3.24.1 [env] CONAN_CMAKE_GENERATOR=Unix Makefiles [conf] tools.cmake.cmaketoolchain:generator=Unix Makefiles

Steps to reproduce

Build zlib:

conan install -pr:h clang15-win-dev -pr:b build/Windows zlib/1.2.12@

Then locate the build package in the filesystem, and take a look under lib/ folder. It will contain z.lib for Clang builds, and zlib.lib for MSVC builds.

Logs

Click to expand log

It is more of filename issue than a log error per se.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
SpaceImcommented, Oct 19, 2022
1reaction
SpaceImcommented, Oct 18, 2022

I’ve opened https://github.com/conan-io/conan/issues/12336. I believe that we can’t do anything robust currently without such method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zlib linker error on Windows when building libzippp, libzip and ...
I'm having strange behavior when trying to build and link libzippp (and zlib) with a library project on Windows.
Read more >
zlib DLL FAQ
Frequently Asked Questions about ZLIB1.DLL This document describes the design, the rationale, and the usage of the official DLL build of zlib, named...
Read more >
Diff - refs/tags/v1.2.12^! - third_party/github.com/madler/zlib
-1,8 +1,68 @@ ChangeLog file for zlib -Changes in 1.2.11.1 (xx Jan 2017) ... cc masquerading as gcc or clang in configure +-...
Read more >
zlib1.dll Missing Error | How to Fix | 2 Fixes | 2021 - YouTube
Are you getting a zlib1.dll is missing from your computer Error on Windows 10, 8, or 7 because you tried to open up...
Read more >
https://fossil-scm.org/home/vpatch?from=7ef7284d6b...
to CFLAGS for minizip and miniunzip -- Add missing libs to minizip linker command ... The zlib sources can be compiled without change...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found