conan-io / hooks

Official Conan client hooks
MIT License
33 stars 46 forks source link

[conan-center] Check system libraries #134

Open uilianries opened 4 years ago

uilianries commented 4 years ago

When building libraries on Linux, some of them requires system libraries (e.g. pthread, dl, m, rt) which can be identified by ldd command:

ldd libsodium/1.0.18///package/3657559d3c5cde1200c50e/lib/libsodium.so linux-vdso.so.1 (0x00007ffe67181000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fa6c0a2b000) libc.so.6 => /usr/lib/libc.so.6 (0x00007fa6c0864000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa6c0af4000)

Here we can see pthread listed, but we need to check if the same library is listed in self.cpp_info.system_libs

The feature should run ldd or similar command, during the post package, and validate self.cpp_info.system_libs X what was showed by ldd.

jgsogo commented 4 years ago

Linking to https://github.com/conan-io/conan/issues/6229, if it goes ahead, these issues are somehow related