GithubHelp home page GithubHelp logo

centreon-clib's Introduction

Centreon Clib

Warning This repository is deprecated. Please switch to Centreon Collect.

Centreon Clib is an open-source utility library used by some Centreon software. It is a low-level component of the Centreon software suite.

Centreon Clib is released under the General Public License version 2 and is endorsed by the Centreon company.

Documentation

Coming soon on https://docs.centreon.com

Installing from binaries

Centreon Clib is a low-level component of the Centreon software suite. If this is your first installation you would probably want to install it entirely.

Centreon (the company behind the Centreon software suite) provides binary packages for RedHat / CentOS. They are available either as part of the Centreon Platform or as individual packages on our RPM repository.

Once the repository installed a simple command will be needed to install Centreon Clib.

yum install centreon-clib

Fetching sources

Beware that the repository hosts in-development sources and that it might not work at all.

Stable releases are available as gziped tarballs on Centreon's download site.

Compilation

This paragraph is only a quickstart guide for the compilation of Centreon Clib.

CentOS / Debian / Raspbian

Compilation of these distributions is pretty straightforward.

You'll need to download the project and launch the cmake.sh script to prepare the compilation environment:

git clone https://github.com/centreon/centreon-clib
cd centreon-clib
./cmake.sh

Now launch the compilation using the make command and then install the software by running make install as priviledged user:

cd build
make
make install

Other distributions

If you are on another distribution, then follow the steps below.

Check if you have these packages installed (Note that packages names come from CentOS distributions, so if some packages names don't match on your distribution try to find their equivalent names): git, make, cmake.

You can now prepare the compilation environment:

git clone https://github.com/centreon/centreon-clib
mkdir -p centreon-clib/build
cd centreon-clib/build
cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DWITH_PREFIX_LIB=/usr/lib64 -DWITH_TESTING=On  ..

Now launch the compilation using the make command and then install the software by running make install as priviledged user:

make
make install

You're done!

Bug reports / Feature requests

The best way to report a bug or to request a feature is to open an issue in GitHub's issue tracker.

Please note that Centreon Clib follows the same workflow as Centreon to process issues.

For a quick resolution of a bug your message should contain:

  • The problem description
  • Precise steps on how to reproduce the issue (if you're using Centreon web UI tell us where you click)
  • The expected behavior
  • The Centreon products versions
  • The operating system you're using (name and version)
  • If possible configuration, log and debug files

Contributing

Contributions are much welcome! If possible provide them as pull-requests on GitHub. If not, patches will do but describe against which version/commit they apply.

For any question or remark feel free to send a mail to the project maintainers:

     

centreon-clib's People

Contributors

adr-mo avatar afouille avatar bouda1 avatar cgagnaire avatar dguillois avatar kduret avatar lgcosta avatar rem31 avatar sc979 avatar sylvestreg avatar tmpaccount01 avatar zguennoune02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

centreon-clib's Issues

Incompatibility with conan2

While trying to build centreon-clib from sources on AlmaLinux 9, the build failed with:

======== Finalizing install (deploy, generators) ========
conanfile.txt: Writing generators to /home/almalinux/centreon-clib
ERROR: Invalid generator 'cmake_find_package'. Available types: CMakeToolchain, CMakeDeps, MesonToolchain, MSBuildDeps, MSBuildToolchain, NMakeToolchain, NMakeDeps, VCVars, QbsProfile, VirtualRunEnv, VirtualBuildEnv, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps, BazelDeps, BazelToolchain, IntelCC, XcodeDeps, XcodeToolchain, PremakeDeps

Quickly searching for this led me to https://stackoverflow.com/questions/75794398/conan-returning-error-invalid-generator-cmake-when-running-conan-install

Changing the pip install command in cmake.sh to install conan<2.0 fixed it. Since Conan 2.0 is relatively fresh (https://blog.conan.io/2023/02/22/Conan-2.0.html), it appears centreon-clib has not been migrated to it yet. We should either fix the pip install line, or migrate to Conan 2.0.

Don't handle EINTR

EINTR is handle in multiple components of Clib whereas it shouldn't. This would let upper floors handle breakage in syscalls for example.

No magic for AlmaLinux in cmake.sh

The cmake.sh script has some magic for CentOS and Debian-based distributions to install some dependencies.

This should also detect AlmaLinux (by looking for /etc/almalinux-release)

Cannot compile on Debian 11

Using cmake.sh script to install and configure automatically all dependencies, when doing the make, I get the following error on Debian 11:

[ 84%] Building CXX object test/CMakeFiles/ut-clib.dir/timestamp.cc.o
[ 87%] Building CXX object test/CMakeFiles/ut-clib.dir/version.cc.o
In file included from /root/lab/centreon-clib/test/version.cc:20:
/root/.conan/data/gtest/cci.20210126/_/_/package/e019a06362b932ca5d1b082b6c112aa150c88de4/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = unsigned int]’:
/root/.conan/data/gtest/cci.20210126/_/_/package/e019a06362b932ca5d1b082b6c112aa150c88de4/include/gtest/gtest.h:1564:23:   required from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = unsigned int; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’
/root/lab/centreon-clib/test/version.cc:26:3:   required from here
/root/.conan/data/gtest/cci.20210126/_/_/package/e019a06362b932ca5d1b082b6c112aa150c88de4/include/gtest/gtest.h:1545:11: warning: comparison of integer expressions of different signedness: ‘const int’ and ‘const unsigned int’ [-Wsign-compare]
 1545 |   if (lhs == rhs) {
      |       ~~~~^~~~~~
[ 89%] Linking CXX executable ut-clib
/usr/bin/ld: cannot find -lcentreon_clib
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/ut-clib.dir/build.make:257: test/ut-clib] Error 1
make[1]: *** [CMakeFiles/Makefile2:1035: test/CMakeFiles/ut-clib.dir/all] Error 2
make: *** [Makefile:160: all] Error 2

With Debian 10 works normally

More information:

# neofetch
       _,met$$$$$gg.          root@debian11
    ,g$$$$$$$$$$$$$$$P.       -------------
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 11 (bullseye) x86_64
 ,$$P'              `$$$.     Host: BHYVE 1.0
',$$P       ,ggs.     `$$b:   Kernel: 5.10.0-8-amd64
`d$$'     ,$P"'   .    $$$    Uptime: 22 mins
 $$P      d$'     ,    $$P    Packages: 1038 (dpkg)
 $$:      $$.   -    ,d$$'    Shell: bash 5.1.4
 $$;      Y$b._   _,d$P'      CPU: Intel i3 550 (2) @ 3.190GHz
 Y$$.    `.`"Y$$$$P"'         GPU: 00:06.0 Vendor fb5d Device 40fb
 `$$b      "-.__              Memory: 86MiB / 1981MiB
  `Y$$
   `Y$$.
     `$$b.
       `Y$$b.
          `"Y$b._
              `"""

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.