New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Tools collect_libs discards suffixes #11948
Comments
This seems related to the last changes that @SpaceIm did for not returning multiple results when symlinks. |
Indeed, I had to update 2 recipes (zziplib & openexr) as well to satisfy CCI hook, because |
Meanwhile, I'll use the symbolic link in |
The hook is useful, but indeed #11527 broke it since it was relying on previous behavior of collect_libs where everything with .lib, .so, .a, .dylib extensions was collected (it's worth noting that this previous behavior didn't collect In libpng recipe |
I think that if a recipe has some relatively simple logic that makes explicit the name of the final libraries, that is much preferred over a |
When porting the libpng project to Conan v2, the CCI hook complained that I lied about the library name in
self.cpp_info.libs
, which was supposed to be["png16.a"]
(on Linux/Mac islibpng16.a
).The truth is, the libpng projects creates a relative symbolic link, named as
libpng.a
, so we have two files inlibdirs[0]
:libpng16.a
and its symlinklibpng.a
.When writing the recipe, I avoided
collect_libs
and preferred and real name, so I pointed as:However, our CCI hook has a post cpp_info step which checks if what we declared for
libs
is actually installed inlibdirs
, and it failed. When checking the hook script, it usescollect_libs
to list those installed libraries and compare with the libraries names from cpp_info.So, the method
collect_libs
only found"png"
, which means, it found the symbolic link, but ignored the real library.Maybe it's a expected behavior, as the symbolic link makes life easier to find the library, but still, it could be customized like
collect_libs(self, ignore_symlinks=True)
so, it would list only real files.Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs (Executed commands with output) (Include/Attach if Applicable)
Read the last lines of this log, the collected libs is there.
The text was updated successfully, but these errors were encountered: