Retrieve hwloc dependencies through pkg-config to avoid the following
static build failure:
checking for hwloc_get_proc_cpubind in -lhwloc... no
configure: error: can not find required library libhwloc
This build failure is raised because without pkg-config, hwloc
dependencies such as libxml2 are not retrieved:
configure:8999: checking for hwloc_get_proc_cpubind in -lhwloc
configure:9022: /home/autobuild/autobuild/instance-0/output-1/host/bin/powerpc-buildroot-linux-uclibc-gcc -o conftest -D_GNU_SOURCE -I/home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Og -g0 -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -static conftest.c -lhwloc -llzma -L/home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/lib -lncurses -lm >&5
/home/autobuild/autobuild/instance-0/output-1/host/lib/gcc/powerpc-buildroot-linux-uclibc/10.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-0/output-1/host/powerpc-buildroot-linux-uclibc/sysroot/usr/bin/../../usr/lib/libhwloc.a(topology-xml-libxml.o): in function `hwloc_libxml_free_buffer':
topology-xml-libxml.c:(.text+0x6a): undefined reference to `xmlFree'
Fixes:
- http://autobuild.buildroot.org/results/5d815ec08c580005a863df6ac9ac29deff7d4128
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
htop is a program which will be run on CHOST after cross-compilation;
CTARGET is only for a small number of cases where a program itself outputs
code (so you might cross-compile a compiler which spits out code for a third
architecture/platform).
We want to use AC_CANONICAL_HOST to check CHOST for the platform currently
being used to build htop.
The confusion around this issue was compounded by a mistake in autoconf-archive
which has since been fixed (AX_PTHREAD pulled it in incorrectly).
See: https://github.com/libstatgrab/libstatgrab/pull/131
See: https://github.com/fenrus75/powertop/pull/90#discussion_r705803725
Signed-off-by: Sam James <sam@gentoo.org>
The libunwind headers of LLVM are located in the subdirectory
/usr/include/libunwind. Search that subdirectory when the default
header test fails. Also extend the include path due to the transitive
include of `<__libunwind_config.h>`.
Closes: #894
Add an explicit else clause so a following else branch for a prior if
condition does not get mixed up.
Also force a trailing semicolon and thereby silence current
-Wextra-semi-stmt warnings.
Improve readability of the hwloc_bitmap_foreach_begin loop macro.
The build time configuration ancient-vserver implies the configuration
vserver; say so in the configure status report if only ancient-vserver
has been specified.
Also indent with 3 spaces.
configure.ac:72: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:72: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
configure.ac:72: the top level
configure.ac:134: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:134: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:134: the top level
Compilers might due to optimizations, like -ffast-math (included in
-Ofast) expect floating point variables to be never NaN and replace each
call to isnan() with false. Htop uses the value NaN for signaling no
data available for various information.
Warn at configure time if the compiler will ignore NaN values.
Note: this can not be implemented as a compile time static assert, as
some compilers handle compile NaNs differently than runtime NaNs.
This uses proplib and sysmon_envsys to determine the total charge
percentage of any number of connected batteries as well as the
AC adapter state. Should work with ACPI and non-ACPI systems.
Add some words about pcp-htop to the main man page, and add a
new man page describing the pcp-htop configuration files that
allow new meters and columns to be defined at runtime.
This adds a configure check for the ncurses getmouse() function
and disables mouse-related code paths when mouse support is
not present in the curses library.
This is necessary for stable versions of NetBSD's libcurses, the
development version has stub mouse functions for compatibility
with ncurses.
Signed-off-by: Nia Alarie <nia@NetBSD.org>
Right now Unicode support must be disabled, because htop peeks
into the ncurses cchar_t struct with Unicode enabled. NetBSD's cchar_t
has different contents.
Partially fixes#660
Signed-off-by: Nia Alarie <nia@NetBSD.org>
This introduces an initial platform for extracting metrics
using the PCP performance metrics API - PMAPI(3). It can
be used via the --enable-pcp=yes configure option.
So far I've added support for live localhost metrics only,
and only using pre-defined metrics already found in htop.
If available, all sampling is performed by pmcd(1) - else,
we fallback to htop doing the metric sampling itself (all
below the PMAPI). When pmcd is used, it may be configured
to run children with elevated privileges, so htop does not
need to be setuid (authentication with pmcd is available).
Additionally, the PMAPI allows us to support archives (for
historical analysis and for automated regression tests in
htop). We'll need platform-specific command line argument
additions, which isn't yet feasible in htop (not difficult
to add though).
The goal of this first version is minimal impact in terms
of modifying the htop codebase, to introduce key ideas in
PCP (metric namespace, metadata, APIs and so on) and give
us something to discuss, experiment with and build on.
On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking
the Enter key.
Since ncruses macros use the ERR macro, we can not use another name.
Closes: #634
If pkg-config is not installed the following message gets printed, even
on non Linux platform:
"Linux delay accounting support can not be enabled, cause pkg-config is
required for checking its availability"
Several of our newer meters have merged coding concerns in terms
of extracting values and displaying those values. This commit
rectifies that for the SysArch and Hostname meters, allowing use
of this code with alternative front/back ends. The SysArch code
is also refined to detect whether the platform has an os-release
file at all and/or the sys/utsname.h header via configure.ac.
This support was rarely ever used and has been disabled by default for some time.
As far as the developer team is aware there's no distribution that activated this
feature in their packages by default.
Using the same function for the same library causes AC_CHECK_LIB to use
cached results.
Since we change the detection method via different or no
ncurses(5|6)-config invocation, avoid such caching by using different
functions.