Page 1 of 1

libexecdir defaulting to /lib

Posted: Wed Aug 12, 2015 10:39 am
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?

Re: libexecdir defaulting to /lib

Posted: Wed Aug 12, 2015 4:48 pm
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.

Re: libexecdir defaulting to /lib

Posted: Tue Aug 18, 2015 9:32 pm
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.

Re: libexecdir defaulting to /lib

Posted: Wed Aug 19, 2015 12:46 pm
by tgriep
Are we good to close up this post then?