bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with getloadavg configuration


From: Phil D'Amore
Subject: Re: problems with getloadavg configuration
Date: Fri, 16 May 2003 09:29:09 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

This actually becomes a bit worse if you are using a newer autoconf. configure.ac is requiring 2.52 or later, but if you use one that is too new (saw this in 2.57), the AC_FUNC_GETLOADAVG check actually generates this:

# Make sure getloadavg.c is where it belongs, at configure-time.
test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
 AC_MSG_ERROR([$srcdir/$ac_config_libobj_dir/getloadavg.c is missing])

Which stops you dead. Earlier versions will politely just ignore the fact that the file is missing and move along. The hack I use in the RPM I maintain was just to touch ./getloadavg in the same directory as configure, which is enough on an OS that provides getloadavg already, but that is not a real fix. It would probably be good to at least set AC_CONFIG_LIBOBJ_DIR and drop an empty file in there, if not something with useful code as was succested below.

Later,

--
Phil D'Amore                             "Sometimes there is a fine line
Senior System Administrator               between criminally abusive
Red Hat, Inc                              behavior and fun."
Office: 919.754.3700 x44395                 -- Ted the Generic Guy
Cell:   919.641.3669                           (Dilbert 4/19/2003)


Mark Burgess wrote:

On 16 May, Dave Love wrote:
I've just noticed 2.0.7 and tried to build it on a system without
`getloadavg'.  That fails because it looks for a getloadavg.c and
can't find it.  See the autoconf doc:

- Macro: AC_FUNC_GETLOADAVG
    Check how to get the system load averages.  To perform its tests
    properly, this macro needs the file `getloadavg.c'; therefore, be
    sure to set the `AC_LIBOBJ' replacement directory properly (see
    *Note Generic Functions::, `AC_CONFIG_LIBOBJ_DIR').

I suggest adding
AC_CONFIG_LIBOBJ_DIR(pub)

before the use of AC_FUNC_GETLOADAVG [why is it in `Checks for
programs.'?] and putting the getloadavg.c from the Emacs distribution
into pub.  Then in cfenvd.c you can remove the conditional on
HAVE_GETLOADAVG.  (Emacs uses getloadavg unconditionally after maybe
linking its own version, so it is portable.)


The loadavg test is a little odd because it refers to loadavg.c but does
not provide one. I have not found a solution to this problem for all
platforms. Since this is mainly for research purposes at present it
can just be ignored.
M

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



_______________________________________________
Bug-cfengine mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-cfengine






reply via email to

[Prev in Thread] Current Thread [Next in Thread]