network-analytics / mdt-dialout-collector

Model-Driven Telemetry - Collecting <multi-vendor> metrics via gRPC dialout
MIT License
27 stars 8 forks source link

Geeting an error while running make for mdt-dialout-collector #13

Closed Kevin-Patel119 closed 2 years ago

Kevin-Patel119 commented 2 years ago
scuzzilla commented 2 years ago

@Kevin-Patel119 pls, avoid attachments - describe the errors directly here.

Kevin-Patel119 commented 2 years ago
scuzzilla commented 2 years ago

pls, check the README. Specifically, the "additional notes" related to CentOS should be, most probably, valid for RH.

Kevin-Patel119 commented 2 years ago

@scuzzilla I had already followed https://github.com/scuzzilla/mdt-dialout-collector#additional-install-notes

[root@localhost ~]# echo $HOME /root [root@localhost ~]# export MY_INSTALL_DIR=$HOME/.local [root@localhost ~]# echo $MY_INSTALL_DIR /root/.local [root@localhost ~]# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin [root@localhost ~]# export PATH="$MY_INSTALL_DIR/bin:$PATH" [root@localhost ~]# echo $PATH /root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin [root@localhost ~]# echo $PKG_CONFIG_PATH

[root@localhost ~]# ls -la /usr/local/lib total 0 drwxr-xr-x. 2 root root 6 Aug 12 2018 . drwxr-xr-x. 12 root root 131 Sep 7 09:18 .. [root@localhost ~]# export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/ [root@localhost ~]# echo $PKG_CONFIG_PATH :/usr/local/lib/pkgconfig/ [root@localhost ~]# cat /usr/include/spdlog/tweakme.h | grep -A1 -B1 SPDLOG_FMT_EXTERNAL //

define SPDLOG_FMT_EXTERNAL

/////////////////////////////////////////////////////////////////////////////// [root@localhost ~]#

[root@localhost mdt-dialout-collector]# ll total 36 drwx------ 2 root root 23 Sep 12 09:47 bin drwx------ 3 root root 118 Sep 12 09:47 build -rw------- 1 root root 14194 Sep 8 12:55 CMakeLists.txt drwx------ 2 root root 23 Sep 8 12:55 csv -rw------- 1 root root 1096 Sep 8 12:55 LICENSE drwx------ 6 root root 66 Sep 8 12:55 proto drwx------ 2 root root 23 Sep 8 12:55 ptm -rw------- 1 root root 12598 Sep 8 12:55 README.md drwx------ 8 root root 135 Sep 8 12:55 src [root@localhost mdt-dialout-collector]# pushd build /opt/mdt-dialout-collector/build /opt/mdt-dialout-collector [root@localhost build]# cmake ../ -- Using protobuf -- Using gRPC 1.46.3 -- Using jsoncpp 1.8.4 -- Using librdkafka++ 1.9.2 -- Using librdkafka 1.9.2 -- Using libconfig++ 1.5 -- Using spdlog 1.5.0 -- Configuring done -- Generating done -- Build files have been written to: /opt/mdt-dialout-collector/build [root@localhost build]# make Consolidate compiler generated dependencies of target mdt_dialout_collector [ 3%] Linking CXX executable ../bin/mdt_dialout_collector CMakeFiles/mdt_dialout_collector.dir/src/utils/cfg_handler.cc.o: In function std::filesystem::exists(std::filesystem::__cxx11::path const&)': cfg_handler.cc:(.text._ZNSt10filesystem6existsERKNS_7__cxx114pathE[_ZNSt10filesystem6existsERKNS_7__cxx114pathE]+0x14): undefined reference tostd::filesystem::status(std::filesystem::cxx11::path const&)' CMakeFiles/mdt_dialout_collector.dir/src/utils/cfg_handler.cc.o: In function std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::filesystem::__cxx11::path::format)': cfg_handler.cc:(.text._ZNSt10filesystem7__cxx114pathC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE[_ZNSt10filesystem7__cxx114pathC5INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES1_EERKT_NS1_6formatE]+0x64): undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/mdt_dialout_collector.dir/build.make:557: ../bin/mdt_dialout_collector] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/mdt_dialout_collector.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 [root@localhost build]#

scuzzilla commented 2 years ago

The whole install process is 100% correct, you just need to upgrade to a newer gcc version.

--- Procedure ---

  1. install a newer version of gcc - I tested it on CentOS with "gcc-toolset-11-11.0-1.el8.x86_64"
  2. switch to the newer gcc (for example): scl enable gcc-toolset-11 bash
  3. move to the app root & remove the build folder: cd mdt-dialout-collector; rm -rf build
  4. restart the compile procedure from scratch: cd build; cmake ../; make
Kevin-Patel119 commented 2 years ago

Thanks a lot @scuzzilla for detailed steps.

@scuzzilla I do see an error while running below commands,

scuzzilla commented 1 year ago

you have two options:

  1. specify a config file from the command line.
  2. create a configuration file within the default location as mentioned in the README.
Kevin-Patel119 commented 1 year ago

Thanks @scuzzilla 2nd option worked for us.

Is the MDT collector is multi threaded? Can it have multiple connections to port 10007 or do we need to run a collector instance for every telemetry connection when we have multiple routers and therefore multiple connections.

scuzzilla commented 1 year ago

Multi threaded and each thread is using async API

Kevin-Patel119 commented 1 year ago

Thanks a lot @scuzzilla for your prompt response. I really appreciated.