You are not logged in.

#1 2020-06-17 06:54:36

MSMHRO
Member
Registered: 2010-05-06
Posts: 13

Nagios - collect2 not found

Hello, I'm trying to build nagios but it returns error as below.

[Aur: 1]  nagios-4.4.5-1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: archivejson.cgi] Error 1

Please tell me what should I do?

Thanks.
MSMHRO

Offline

#2 2020-06-17 13:33:43

philo
Member
Registered: 2015-01-26
Posts: 251

Re: Nagios - collect2 not found

This is an AUR package. You shoudl put your question on the web page of the package.

That said, this is the correct way to build a package:

https://wiki.archlinux.org/index.php/Ar … he_package

Last edited by philo (2020-06-17 14:29:21)

Offline

#3 2020-07-02 02:09:45

webdawg
Member
Registered: 2010-12-28
Posts: 62

Re: Nagios - collect2 not found

Anyone know why nagios is not in official repos?

I think the maintainer just needs to upgrade to latest upstream:  https://bugs.gentoo.org/706902

I have the same issue:

gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -c -o statusdata-cgi.o ../common/statusdata.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -c -o xstatusdata-cgi.o ../xdata/xsddefault.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -c -o comments-cgi.o ../common/comments.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -c -o downtime-cgi.o ../common/downtime.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -DJSON_NAGIOS_4X -c -o archiveutils.o archiveutils.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -DJSON_NAGIOS_4X -c -o jsonutils.o jsonutils.c
gcc -Wall -I.. -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DHAVE_CONFIG_H -DNSCGI -DJSON_NAGIOS_4X -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o archivejson.cgi archivejson.c ../common/shared.o getcgi.o cgiutils.o cgiauth.o macros-cgi.o  objects-cgi.o xobjects-cgi.o statusdata-cgi.o xstatusdata-cgi.o comments-cgi.o downtime-cgi.o ../lib/libnagios.a archiveutils.o jsonutils.o 
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0x98): multiple definition of `process_performance_data'; ../common/shared.o:(.bss+0x48): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0x9c): multiple definition of `enable_flap_detection'; ../common/shared.o:(.bss+0x28): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xa8): multiple definition of `obsess_over_hosts'; ../common/shared.o:(.bss+0x8): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xac): multiple definition of `obsess_over_services'; ../common/shared.o:(.bss+0xc): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xb0): multiple definition of `enable_event_handlers'; ../common/shared.o:(.bss+0x10): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xb4): multiple definition of `accept_passive_host_checks'; ../common/shared.o:(.bss+0x14): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xb8): multiple definition of `execute_host_checks'; ../common/shared.o:(.bss+0x18): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xbc): multiple definition of `accept_passive_service_checks'; ../common/shared.o:(.bss+0x1c): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xc0): multiple definition of `execute_service_checks'; ../common/shared.o:(.bss+0x20): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xc4): multiple definition of `enable_notifications'; ../common/shared.o:(.bss+0x24): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xc8): multiple definition of `last_log_rotation'; ../common/shared.o:(.bss+0x30): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xd8): multiple definition of `program_start'; ../common/shared.o:(.bss+0xa0): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0xd0): multiple definition of `daemon_mode'; ../common/shared.o:(.bss+0x38): first defined here
/usr/bin/ld: xstatusdata-cgi.o:(.bss+0x94): multiple definition of `nagios_pid'; ../common/shared.o:(.bss+0x3c): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:177: archivejson.cgi] Error 1
make[1]: Leaving directory '/home/hsluser/.cache/yay/nagios/src/nagios-4.4.5/cgi'
make: *** [Makefile:89: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: %!s(func() string=0x5642c7f36000)

Offline

#4 2020-07-02 02:21:19

webdawg
Member
Registered: 2010-12-28
Posts: 62

Re: Nagios - collect2 not found

until the maintainer fixes:

git clone https://aur.archlinux.org/nagios.git
nano PKGBUILD
*then change pkgver to 4.4.6
*scroll all the way down

replace the first md5 sum w/:
ba849e9487e13859381eb117127bfee2

replace the first sha1 sum w/:
d52e26d6a17ac70f01d87e9329b20436fff1f1a7

save

makepkg -si

Offline

#5 2020-07-02 02:22:29

webdawg
Member
Registered: 2010-12-28
Posts: 62

Re: Nagios - collect2 not found

I just upgraded, and tested...working great.

Offline

#6 2020-07-02 03:32:49

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: Nagios - collect2 not found

webdawg wrote:

Anyone know why nagios is not in official repos?

https://wiki.archlinux.org/index.php/Ar … epository?

Please edit your post rather than creating a new post if no one else has posted since your last post in a thread.

Offline

Board footer

Powered by FluxBB