Question

How to compile centreon-collect 22.10.0 from source?

  • 13 April 2023
  • 1 reply
  • 48 views

Hello everyone,

I am currently trying to compile centreon-collect 22.10.0 from source, with no success so far.

  • Could you please provide the information related to the environment you use to compile centreon-collect 22.10.0?
    • What are the Pre-requisites?
  • Do you plan to publish a full documentation about how to install a poller from source?

 

Here I share the list of all actions tried and all the errors encountered (so far):

  • The first approach is to look for the official documentation (https://docs.centreon.com/). However, no information is provided about how to install a poller from source. The only process available explains how to install a poller using packages.

  • The second approach taken was then to try compiling centreon-collect 22.10.0 on a CentOs7; following the readme file contained in the source, using the tarball available on https://download.centreon.com/.

    •  

       

       

      wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-collect/centreon-collect-22.10.0.tar.gz

    • tar -xvf centreon-collect-22.10.0.tar.gz

    • ./cmake.sh

 

  • Error:

    • The script detects that some packages are missing and tries to install them with yum, but fails since it was ran as normal user and not as sudo.

  • Action:

    • sudo ./cmake.sh

  • Errors:

    • The script will install a version of conan that is incompatible with the syntax of the conanfile contained in the source.

    •  

    • Errors are raised because there are no default conan profile on the system and  because the conan install command is ran as root.

  • Actions:

    • Patch of cmake.sh to force:

      • pip3 install conan==1.57.0 --upgrade

    • Manually install all the missing packages listed in the cmake.sh as root

      • sudo yum -y install python3 epel-release cmake3 centos-release-scl rh-python38 python3-pip devtoolset-9 gcc-c++ ninja-build rrdtool-devel gnutls-devel lua-devel perl-Thread-Queue perl-devel perl-ExtUtils-Embed perl-srpm-macros libgcrypt-devel

      • ln -s /usr/bin/cmake3 /usr/bin/cmake

      • Manually install the right version of conan and create a default profile

        • (sudo) pip3 install conan==1.57.0 –upgrade

        • (normal user) conan profile new default --detect

      • Rerun the script as normal user

        • ./cmake.sh

  • Errors:
    • Error raised by conan because of SSL certificates issues when trying to reach conan repos.
  • Actions:

    • conan remote update conancenter https://center.conan.io false

    • ./cmake.sh

 

  • Errors:

    • The default version of GCC on CentOs7 is not appropriate. Impossible to complete the installation.

  • Action:

    • Manual installation of GCC 7 on CentOs7

    • ./cmake.sh

With this, we finally go through the whole cmake.sh script. Then other issues are faced when trying to run the make command in the build directory:

  • cd build

  • make

  • Error:

    • Problem with protoc/protobuf not being found

  • Actions:

    • sudo yum -y install ‘*protobuf*’

      • What is expected is unknown, so all packages with this type of name are installed.

 

  • Error:

    • The default version of protoc installed on CentOs7 breaks the make command. Impossible for protoc to see the .proto files from the source even if they are there.

 

With so many version issues, the choice was made to try compiling centreon-collect 22.10.0 on CentOs8. On CentOs8, the versions issues of GCC and protoc are solved by default, but the cmake.sh tries to enable the repo PowerTools instead of powertools.

 

 

 

Then new issues are faced with Proto3.

Trying to manually remove these ‘optional’ labels before re-running the make command leads to other issues linked to proto3.

We stopped there.

 

So just in case, I repeat my questions here:

  • Could you please provide the information related to the environment you use to compile centreon-collect 22.10.0?
    • What are the Pre-requisites?
  • Do you plan to publish a full documentation about how to install a poller from source?

Thank you.

 


1 reply

Just found that the same issue was already described and still open:

Shadok opened this issue on Nov 4, 2022 · 29 comments

 

https://github.com/centreon/centreon-collect/issues/433

 

 

 

Reply