Page 1 of 2

Nagios core mk-livestatus install error

Posted: Thu Oct 24, 2019 1:20 am
by ddro90
Good morning,

When I try to install the livestatus option in my Nagios Core distribution, I get the following error:

make all-recursive
make[1]: Entering directory '/tmp/mk-livestatus-1.2.8p18'
Making all in src
make[2]: Entering directory '/tmp/mk-livestatus-1.2.8p18/src'
rm -f plugin.so
g++ -s -fPIC -shared livestatus_so-AndingFilter.o livestatus_so-ClientQueue.o livestatus_so-Column.o livestatus_so-ColumnsColumn.o livestatus_so-CustomVarsExplicitColumn.o livestatus_so-ContactsColumn.o livestatus_so-CustomVarsColumn.o livestatus_so-CustomVarsFilter.o livestatus_so-DoubleColumn.o livestatus_so-DoubleColumnFilter.o livestatus_so-DowntimeOrComment.o livestatus_so-DownCommColumn.o livestatus_so-DynamicColumn.o livestatus_so-EmptyColumn.o livestatus_so-NullColumn.o livestatus_so-Filter.o livestatus_so-GlobalCountersColumn.o livestatus_so-HostContactsColumn.o livestatus_so-HostgroupsColumn.o livestatus_so-HostlistColumn.o livestatus_so-HostlistColumnFilter.o livestatus_so-HostlistStateColumn.o livestatus_so-MetricsColumn.o livestatus_so-HostSpecialIntColumn.o livestatus_so-ServiceSpecialIntColumn.o livestatus_so-InputBuffer.o livestatus_so-IntColumn.o livestatus_so-IntColumnFilter.o livestatus_so-ListColumn.o livestatus_so-ListColumnFilter.o livestatus_so-OffsetDoubleColumn.o livestatus_so-OffsetIntColumn.o livestatus_so-OffsetStringColumn.o livestatus_so-OffsetTimeperiodColumn.o livestatus_so-OringFilter.o livestatus_so-OutputBuffer.o livestatus_so-OffsetTimeColumn.o livestatus_so-TimePointerColumn.o livestatus_so-TimeColumnFilter.o livestatus_so-PerfdataAggregator.o livestatus_so-Query.o livestatus_so-ServiceContactsColumn.o livestatus_so-ServicegroupsColumn.o livestatus_so-ServicelistColumn.o livestatus_so-ServicelistColumnFilter.o livestatus_so-ServicelistStateColumn.o livestatus_so-store_c.o livestatus_so-Store.o livestatus_so-StringColumn.o livestatus_so-StringColumnFilter.o livestatus_so-strutil.o livestatus_so-Table.o livestatus_so-TableColumns.o livestatus_so-StatusSpecialIntColumn.o livestatus_so-HostSpecialDoubleColumn.o livestatus_so-TableCommands.o livestatus_so-TableContacts.o livestatus_so-TableDownComm.o livestatus_so-TableHostgroups.o livestatus_so-ServiceSpecialDoubleColumn.o livestatus_so-TableHosts.o livestatus_so-TableServicegroups.o livestatus_so-TableServices.o livestatus_so-TableStatus.o livestatus_so-LogEntry.o livestatus_so-LogCache.o livestatus_so-Logfile.o livestatus_so-TableStateHistory.o livestatus_so-TableLog.o livestatus_so-TableTimeperiods.o livestatus_so-TableContactgroups.o livestatus_so-ContactgroupsMemberColumn.o livestatus_so-OffsetStringMacroColumn.o livestatus_so-OffsetStringServiceMacroColumn.o livestatus_so-OffsetStringHostMacroColumn.o livestatus_so-StatsColumn.o livestatus_so-IntAggregator.o livestatus_so-CountAggregator.o livestatus_so-DoubleAggregator.o livestatus_so-AttributelistColumn.o livestatus_so-AttributelistFilter.o livestatus_so-BlobColumn.o livestatus_so-HostFileColumn.o livestatus_so-global_counters.o livestatus_so-module.o livestatus_so-logger.o livestatus_so-waittriggers.o livestatus_so-TimeperiodsCache.o livestatus_so-pnp4nagios.o livestatus_so-mk_inventory.o livestatus_so-ContactgroupsColumn.o livestatus_so-CustomTimeperiodColumn.o livestatus_so-HostServiceState.o livestatus_so-opids.o livestatus_so-auth.o -o livestatus.o -lpthread -static-libstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2143: livestatus.o] Error 1
make[2]: Leaving directory '/tmp/mk-livestatus-1.2.8p18/src'
make[1]: *** [Makefile:308: all-recursive] Error 1
make[1]: Leaving directory '/tmp/mk-livestatus-1.2.8p18'
make: *** [Makefile:248: all] Error 2

I follow the next steps:
tar zxf mk-livestatus-1.2.8p18.tar.gz
cd mk-livestatus-1.2.8p18

./configure --with-nagios4
make

What's wrong? Anyhelp?

Thanks!

Re: Nagios core mk-livestatus install error

Posted: Thu Oct 24, 2019 6:52 am
by scottwilkerson
This would probably be a better question for the Livestatus people as we are not the authors, but it looks like you are missing a package they require
ddro90 wrote:/usr/bin/ld: cannot find -lstdc++
You could try

Code: Select all

yum install libstdc++-devel libstdc++

Re: Nagios core mk-livestatus install error

Posted: Thu Oct 24, 2019 7:37 am
by ddro90
I check it but I have installed both packages:

[root@machine04 ~]# rpm -qa | grep libstdc
libstdc++-devel-8.2.1-3.5.el8.x86_64
libstdc++-8.2.1-3.5.el8.x86_64


In which page can I do this question?

Thanks!

Re: Nagios core mk-livestatus install error

Posted: Thu Oct 24, 2019 8:08 am
by scottwilkerson
ddro90 wrote:In which page can I do this question?
Looks to be here
https://checkmk.com/support.html

Re: Nagios core mk-livestatus install error

Posted: Fri Oct 25, 2019 12:05 am
by ddro90
I have tried to contac with this page but nobody reply.

Could you help me with my problem? Any new ideas?

Thanks!

Re: Nagios core mk-livestatus install error

Posted: Fri Oct 25, 2019 8:11 am
by scottwilkerson
ddro90 wrote:I have tried to contac with this page but nobody reply.

Could you help me with my problem? Any new ideas?

Thanks!
There's not a whole lot I can do, mklivestatus installer doesn't seem to be able to find lstdc++

You might want to reinstall the packages

Code: Select all

yum reinstall libstdc++-devel libstdc++
Beyond that, we don't have much to offer because we are not familiar with the software.

Re: Nagios core mk-livestatus install error

Posted: Fri Oct 25, 2019 12:51 pm
by mcapra
You could try running make with ld in debug mode:
https://stackoverflow.com/questions/167 ... brary?rq=1

Like so:

Code: Select all

LD_DEBUG=all make all-recursive
Bottom line is this isn't a Nagios Core or a mklivestatus problem, it's a problem with the environment on which you're trying to build mklivestatus. You likely need to create some sort of symbolic link from where your systems package management installed the libstdc++ libraries to where make is trying to ld them from.

You might be able to find an rpm of a pre-built mklivestatus. I found this one which appears to be in EPEL but only for el7 -- you appear to be on el8:
https://centos.pkgs.org/7/epel-x86_64/c ... 4.rpm.html

Re: Nagios core mk-livestatus install error

Posted: Fri Oct 25, 2019 1:50 pm
by scottwilkerson
Thanks @mcapra

Re: Nagios core mk-livestatus install error

Posted: Mon Oct 28, 2019 6:09 am
by ddro90
Thanks for your comments, I'm going to try it and tell you my advances.

Re: Nagios core mk-livestatus install error

Posted: Mon Oct 28, 2019 6:26 am
by ddro90
I have checked it and run partially. I have created a new symbolic link to this library:
ln -s /usr/lib64/libstdc++.so.6.0.25 /usr/lib64/libstdc++.so

But, when I run the following command, I have a warning at the end:
ld -lstdc++ --verbose
attempt to open //usr/x86_64-redhat-linux/lib64/libstdc++.so failed
attempt to open //usr/x86_64-redhat-linux/lib64/libstdc++.a failed
attempt to open //usr/lib64/libstdc++.so succeeded
-lstdc++ (//usr/lib64/libstdc++.so)
libm.so.6 needed by //usr/lib64/libstdc++.so
attempt to open //usr/lib64//bind9-export/libm.so.6 failed
attempt to open //usr/x86_64-redhat-linux/lib64/libm.so.6 failed
found libm.so.6 at //usr/lib64/libm.so.6
libc.so.6 needed by //usr/lib64/libstdc++.so
attempt to open //usr/lib64//bind9-export/libc.so.6 failed
attempt to open //usr/x86_64-redhat-linux/lib64/libc.so.6 failed
attempt to open //usr/local/lib64/libc.so.6 failed
attempt to open //usr/x86_64-redhat-linux/lib/libc.so.6 failed
attempt to open //usr/local/lib/libc.so.6 failed
attempt to open //lib/libc.so.6 failed
attempt to open //usr/lib/libc.so.6 failed
attempt to open //usr/lib64//bind9-export/libc.so.6 failed
attempt to open //usr/x86_64-redhat-linux/lib64/libc.so.6 failed
found libc.so.6 at //usr/lib64/libc.so.6
ld-linux-x86-64.so.2 needed by //usr/lib64/libstdc++.so
attempt to open //usr/lib64//bind9-export/ld-linux-x86-64.so.2 failed
attempt to open //usr/x86_64-redhat-linux/lib64/ld-linux-x86-64.so.2 failed
found ld-linux-x86-64.so.2 at //usr/lib64/ld-linux-x86-64.so.2
libgcc_s.so.1 needed by //usr/lib64/libstdc++.so
attempt to open //usr/lib64//bind9-export/libgcc_s.so.1 failed
attempt to open //usr/x86_64-redhat-linux/lib64/libgcc_s.so.1 failed
found libgcc_s.so.1 at //usr/lib64/libgcc_s.so.1
ld: warning: cannot find entry symbol _start; not setting start address

I try to make again, but I have the same error:
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status


Any more idea?

Thanks!