mabrarov / zja

Zabbix Java Agent
0 stars 0 forks source link

Investigate usability of Conan #1

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi.

I tried to build something with default packages from conan-center, here is the result: asio-playground. CLion integration works, but Conan must be operated from command line, plugin is in the pre-release state.

Issues:

  1. Conan interface is rather terrible: https://github.com/conan-io/conan/issues/2306. Another example not mentioned:
    
    conan.exe search *ssl* -r conan-center
    # There are no packages matching the '*ssl*' pattern
    conan.exe search *SSL* -r conan-center
    # Existing package recipes: ...

But if you already have OpenSSL locally

conan.exe search ssl

case-insensitive search works.

2. `conanbuildinfo.cmake` must be present in the build root and CLion doesn't seem to support different build roots for subprojects. Because of that, the above project doesn't have top-level
```cmake
add_subdirectory(HelloServer)
add_subdirectory(HelloClient)

otherwise include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) in subdirectories will refer to the same file, which is bad if subproject's conanfile.txts are different. I don't know how to resolve it without changing include paths in subprojects.

  1. I don't know how to make conan use clang-cl, it uses MSVC. conan ... -s compiler=clang ... results in
    'settings.compiler.libcxx' value not defined
  2. I haven't added SSL support. ASIO doesn't support modern SSL out of the box. There is a patch that adds ECDHE support, but it got no attention from ASIO's author. So, if OpenSSL is to be used, it will have to be operated through native handles, ASIO's wrappers are not sufficient.
  3. There is another crypto library: Botan, which can be used with ASIO as well. It has worse performance and potentially worse security compared to OpenSSL. It's also lacking recent standards support like TLS 1.3. On the other hand, it's C++ rather than C. Conan has no Botan packages in conan-center, only in bincrafters repository and the version is outdated. I was unable to use it: prebuild binaries are missing and conan build fails with MAKEFILE not found and no target specified.
  4. In addition to storing data in user profile, Conan pollutes C:\.conan.
mabrarov commented 5 years ago

FYI, there is a new project called Micrometer (http://micrometer.io/) which has issue #65 about adding Zabbix support.

Micrometer already supports various monitoring systems (I'm not sure about level of support though):

AppOptics, Atlas, Azure Monitor, Cloudwatch, Datadog, Datadog StatsD, Dynatrace, Elastic, Humio, Influx, KairosDB, New Relic, Prometheus, SignalFx, Sysdig StatsD, Telegraf StatsD, Wavefront