libexecdir defaulting to /lib

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
regress
Posts: 2
Joined: Wed Aug 12, 2015 10:08 am

libexecdir defaulting to /lib

Post by regress »

I've installed nagios-4.0.8.tar.gz and nagios-plugins-2.1.1.tar.gz per the quickstart guide on openSUSE 13.2 (Harlequin) (x86_64).

Everything works fine except that when I run

Code: Select all

./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios
the plugin Makefile points libexecdir to /usr/local/nagios/lib at which point things like check_ping fail.

Makefile:

Code: Select all

libexecdir = ${exec_prefix}/lib
If I copy/symlink /usr/local/nagios/lib to /usr/local/nagios/libexec it works

If I force the issue with:

Code: Select all

 ./configure --prefix=/usr/local/nagios --libexecdir=/usr/local/nagios/libexec --with-nagios-user=nagios --with-nagios-group=nagios
Everything works fine.

My knowledge of autoconf is limited but it looks like /lib in relation to libexecdir appears in config.status as:

Code: Select all

S["libexecdir"]="${exec_prefix}/lib"
Does anyone have any insight into whether this is supposed to happen on my platform or if I'm doing something incorrectly that requires this to be explicitly specified?

Thank you.

Update:
config.log shows:
| # If user did not specify libexecdir, set the correct target:
| # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.
|
| if test "$libexecdir" = '${exec_prefix}/libexec' ; then
| libexecdir='${exec_prefix}/lib'
| fi

Not sure if this is autogenerated or not but my question stands - is this desired behavior on my platform for some reason?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: libexecdir defaulting to /lib

Post by jdalrymple »

It sounds to me like the generated configuration just pointed your $USER1$ macro to the wrong directory? Can you verify this, or am I way off base? Nagios doesn't have a "default plugins directory" per-se, and if a path isn't given it will follow $PATH just like any other process. By convention this is typically defined in the $USER1$ macro in the resource.cfg file and I suspect that's where your problem lies.

I may be totally nuts though and not correlating the symptom with your description as I'm supposed to.
regress
Posts: 2
Joined: Wed Aug 12, 2015 10:08 am

Re: libexecdir defaulting to /lib

Post by regress »

In case anyone else is looking for clarification - this is actually an OpenSUSE design decision as FHS does include libexec or it's optional or it's an issue beyond my install of nagios.
https://en.opensuse.org/openSUSE:Specfi ... Libexecdir

Which explains
| # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.

We accepted the default compile and updated $USER1$ in resource.cfg to point at /lib.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: libexecdir defaulting to /lib

Post by tgriep »

Are we good to close up this post then?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked