Skip to content
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] tool.collect_libs behaves differently on mac and linux #11282

Closed
DS-Serafin opened this issue May 17, 2022 · 2 comments · Fixed by #11527
Closed

[bug] tool.collect_libs behaves differently on mac and linux #11282

DS-Serafin opened this issue May 17, 2022 · 2 comments · Fixed by #11527

Comments

@DS-Serafin
Copy link

DS-Serafin commented May 17, 2022

Mac and Linux both creaete symlinks without package version and libs with package version.

Linux: libmylib.so -> llibmylib.so.X.Y.Z
Mac: libmylib.dylib -> llibmylib.X.Y.Z.dylib

tools.collect_libs with make a os.path.splitext and check if the extension is a valid lib extension. Both symlinks are fine:
libmylib.so -> ext = .so (valid and listed)
libmylib.dylib -> ext = .dylib (valid and listed)

The actualy libs however behave defferntly:
libmylib.so.X.Y.Z -> ext = .Z (not valid is discarded
libmylib.X.Y.Z.dylib -> ext = .dylib (valid and listed)

Not sure what the corect behaviour should be probaly both should be listed in both cases. But behaving like this is clearly a bug

@gabyx
Copy link

gabyx commented May 17, 2022

Jeah, collect_lib should collect all libs (even symlinks) and also it should report
a list of (fileName, path) instead of only the filenames, to allow the user to check other stuff on these files... discarding symlinks.

On linux the additional check:

".so." in name

should be done...

@SpaceIm
Copy link
Contributor

SpaceIm commented Jun 25, 2022

#11527 implements a consistent behavior. But it keeps only the most generic lib name since collect_libs usually aims to populate self.cpp_info.libs in package_info().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants