0

I used the following command to get a list of pre-built packages for the libpng library:

conan download libpng/1.6.40 -p "arch=x86_64 AND os=Windows AND compiler=msvc AND compiler.version=192" -r conancenter -f json

Besides other information, I get the following info:

                        "requires": [
                                "zlib/1.3.Z"
                            ]
                        }

I get the path to the downloaded pre-built package like this: conan cache path libpng/1.6.40:2dc71d849fb2a3eea8f4b3bf24e7117c93b68a8a (the last part being the package id from the conan download output).

How can I find out which exact version of zlib was used to build this pre-built libpng .lib file? The conan download information just gives me a Z for the last part of the version.

I also looked into conan graph info command, but couldn't figure out if this can help me.

1 Answer 1

2

Conan packages do not contain by default the declaration of the exact version and revision that the binary used to link. The "zlib/1.3.Z" that is being listed is the "binary compatibility" declaration, saying that this built binary can be used with any patch version of zlib/1.3 without necessarily recompiling itself.

If you want to store an exact copy of the dependencies versions when building a package, it can be done with:

  • Modifying a recipe, you can generate a file in your preferred format iterating self.dependencies. This might be done in the generate() method if you want to do it pre-build, or during the build() or even in the package() method. Using something like dep.ref, read this section
  • Without modifying the recipe, and applying it to all packages being built, you can add the same logic as above, but inside a hook (read this section). A post/pre generate/build/package might be ok for this.
Sign up to request clarification or add additional context in comments.

2 Comments

So there is no standard way to find out for the pre-compiled packages in conancenter @drodri?
Not for the pre-built binaries in ConanCenter, no

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.