Test for missing system_libs (KB-H043)#171
Conversation
|
@uilianries |
|
I think Windows CI fails because it needs the Visual Studio compiler and it is not set in the test section. |
What do mean by correct? Anyway, it deserves a separated hook. |
uilianries
left a comment
There was a problem hiding this comment.
Do think about header-only libraries? I mean, in terms of test. Some of them contain system_libs.
By correct, I mean correct ordering. Such that dependencies of other libraries come last in the list.
header-only libraries require another approach. For header-only libraries, we'ld need to grep all headers for occurrences of certain includes, which can be time and cpu intensive for larger projects. e.g. for glibc: (dl, m, pthread and rt) r"""#\w*include\w*([<"])((dlfcn.h)|(math.h)|(pthread.h)|(time.h))\g<1>"""It can be done, but will be non-perfect. |
Okay, let's update it in another occasion. |
d803413 to
3a5a081
Compare
|
@uilianries Do you have an idea what might be up? |
|
@madebr Does this hook allow recipes to not list system libs if those system libs are not direct dependencies but instead are coming from system libs of dependencies? |
Yes! On Linux, it runs I've got this from the |
|
I've used this tool for windows https://docs.microsoft.com/en-us/cpp/windows/understanding-the-dependencies-of-a-visual-cpp-application?view=vs-2019 There's a link to a GitHub repo with the tool |
fb43ecb to
5e88ab6
Compare
|
@madebr I took some look, and it seems like environment is somehow corrupted, e.g. it returns None from: and from: I am pretty sure it's corrupted somewhere inside the test, probably in |
d0f8ea0 to
beb486b
Compare
| coverage: PYTESTDJANGO_COVERAGE_SRC={toxinidir}/ | ||
|
|
||
| passenv = PYTEST_ADDOPTS USE_UNSUPPORTED_CONAN_WITH_PYTHON_2 USERNAME | ||
| passenv = PYTEST_ADDOPTS USE_UNSUPPORTED_CONAN_WITH_PYTHON_2 USERNAME ProgramFiles(x86) ProgramFiles |
There was a problem hiding this comment.
Nice job @SSE4
How a one line change can fix (almost) everything.
There was a problem hiding this comment.
it took me two years to find it: https://tox.wiki/en/latest/config.html#conf-passenv 🤦
There was a problem hiding this comment.
well, today we learned something new at least 🤓
142954f to
174147b
Compare
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
…aboratory.pro/index.php?view=changelog&l=glibc&v=2.30) Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
Signed-off-by: SSE4 <tomskside@gmail.com>
|
@madebr @uilianries I've added some macOS implementation, it's detecting missing frameworks. |
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Test whether a recipe has all system libraries listed in
cpp_info.system_libs.This heuristic only run on Linux and Windows and can only be done for shared libraries.
WIKI:
#KB-H041: "MISSING SYSTEM LIBS"
A shared library links to some system libraries which are not set by
cpp_info.system_libsinpackage_info.This test can only be run on shared libraries.