conan-io / hooks

Official Conan client hooks
MIT License
32 stars 45 forks source link

Need a test that on Linux, libm is a system level dependency #198

Open 0x8000-0000 opened 4 years ago

0x8000-0000 commented 4 years ago

See https://github.com/conan-io/conan-center-index/pull/1547, https://github.com/conan-io/conan-center-index/pull/1550, https://github.com/conan-io/conan-center-index/pull/1549, https://github.com/conan-io/conan-center-index/pull/1647

Basically reject

self.cpp_info.libs.append("m")
self.cpp_info.system_libs += ["m"]

and recommend:

self.cpp_info.system_libs.append("m")

instead.

Croydon commented 4 years ago

system_libs didn't even exist in the past, so that is probably where this is coming from. I'm not sure if we actually need a hook for such a specific thing 🤔

0x8000-0000 commented 4 years ago

system_libs didn't even exist in the past, so that is probably where this is coming from. I'm not sure if we actually need a hook for such a specific thing 🤔

We do, because otherwise we keep getting useless messages from Conan during "install", that "m" is not found. Those messages are not useful nor actionable. libm is part of the standard C library for ever - it was a separate binary way back when math was expensive (there was no floating point support in hardware).