Closed davidtazy closed 4 years ago
I agree. I'm not personally knowledgeable in conan though, but perhaps someone would like to pick it up?
did a proof of concept https://github.com/davidtazy/conan-kcov
made 2 little patches from the original cmakelist : https://github.com/davidtazy/kcov/commits/master
@SimonKagstrom could you check them and tell if its a conan build system problem or if the kcov CmakeLists could be "enhanced" ?
if its a conan problem, the conan recipe can patch cmakelist.
I understand the libssl fix (thanks!), but I don't quite get the SOLIB patch and has commented it in the commit.
Doesn't the conan package build work otherwise?
Dont know why, but ${SOLIB} is generated in ${CMAKE_BINARY_DIR}/lib
, so it is not compiling unless this patch.
maybe a better fix should be to use "generator expression" $<TARGET_FILE:${SOLIB}> (seem to be available in cmake 2.8.4)
FYI cmake command generated by conan is:
cd '/home/***/conan-kcov/tmp/build' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="8" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DCMAKE_INSTALL_PREFIX="/home/***/conan-kcov/tmp/build/package" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/***/conan-kcov/tmp/source/kcov'
Looks like a good solution to me!
I'll merge the pull-request when it arrives.
i proposed a recipe at the conan center index, https://github.com/conan-io/conan-center-index/pull/1538.
@SimonKagstrom , https://github.com/conan-io/conan-center-index/pull/1538#issuecomment-652613214 can you help me with this request? :What's the required library, libdw?
The command ldd or its friends like objdump, readelf, pmap, and ldconfig (or a combination of them maybe) should be able to help.
Sorry about the late reply, but libdw-dev (sometimes called elfutils-devel) is required. libdw is the library for reading DWARF information in ELF files.
Confusingly enough, there are multiple variants/implementations of it, but they should be in conflict with one another in the distro package managers.
ok, conan provide elfutils package now.
conan guys asked me if kcov can be build on windows/mingw ?
Not out of the box, but it would be possible to build one which has only Python/Bash support. The OSX build used to do that (before the LLDB-based instrumentation for binaries), so it's basically a bit of CMake-hacking that's needed :-)
OK, kcov v38 is available through conan center https://conan.io/center/kcov/38/
minimal howto:
mkdir tmp & cd tmp
conan install kcov/38@ -g virtualrunenv
source ./activate_run.sh
kcov --version
Splendid work @davidtazy ! So I guess we can close this now?
Thanks,!
it would be nice to add this tool as a "build-requires" in a conanfile.txt