Irqbalance / irqbalance

The irqbalance source tree - The new official site for irqbalance
http://irqbalance.github.io/irqbalance/
GNU General Public License v2.0
586 stars 139 forks source link

Add ubuntu packages to install so it can be built. Especially the num… #273

Closed Alb0t closed 1 year ago

Alb0t commented 1 year ago

Add ubuntu packages to install so it can be built. Especially the numa headers package which gets (mostly silently) ignored and you end up with numa incompatible irqbalance which took me way too long to figure out.

nhorman commented 1 year ago

What? This is silly. The configure script fails if any of these packages are missing, with errors that are clear. And the ubuntu-specific package are required for all distros. Not sure what exactly you're trying to do here

Alb0t commented 1 year ago

What's clear about this?

configure.ac:3: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:3: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:745: AM_CONFIG_HEADER is expanded from...
configure.ac:3: the top level
configure.ac:21: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
configure.ac:21:   Except in unusual embedded environments, you can safely include all
configure.ac:21:   ISO C90 headers unconditionally.
configure.ac:16: error: possibly undefined macro: AS_IF
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:34: error: possibly undefined macro: AC_CHECK_LIB
configure.ac:37: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:66: error: possibly undefined macro: AC_DEFINE
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

Without (automake?) I can't remember which package, it starts telling me to whitelist stuff. It doesn't fail in a way that suggests a package would make my issues go away, and I'm not familiar with what these are.

Without the numa-dev headers it shuts numa off and the only way we know during configure time is it says "numa

# autoupdate && ./autogen.sh && ./configure
configure.ac:14: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
  Except in unusual embedded environments, you can safely include all
  ISO C90 headers unconditionally.
+ mkdir -p m4
+ autoreconf -fv --install
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/bin/autoconf --force
configure.ac:7: warning: The macro `AM_PROG_LIBTOOL' is obsolete.
configure.ac:7: You should run autoupdate.
m4/libtool.m4:100: AM_PROG_LIBTOOL is expanded from...
configure.ac:7: the top level
configure.ac:14: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
configure.ac:14:   Except in unusual embedded environments, you can safely include all
configure.ac:14:   ISO C90 headers unconditionally.
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:7: installing './compile'
configure.ac:7: installing './config.guess'
configure.ac:7: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory '.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for gawk... (cached) gawk
checking for egrep... (cached) /usr/bin/grep -E
checking for numa.h... no
checking for getopt_long... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for numa... no
checking for numa_available in -lnuma... no
checking for floor in -lm... yes
checking for glib-2.0... yes
checking for ncursesw... yes
checking for libnl-3.0 libnl-genl-3.0... no
configure: no thermal event support as libnl-3.0 is unavailable.
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for libcap-ng... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
configure: irqbalance Version:     1.9.2
configure: Target:
configure: Installation prefix:    /usr/local
configure: Compiler:               gcc
configure: Compiler flags: -g -O2

It doesn't fail. It just builds irqbalance without numa support.

I'm happy to defer to you, but figured I should write down why since I'm getting a little push back which I hadn't really expected.

nhorman commented 1 year ago

well, lets go through it:

configure.ac:3: warning: 'AM_CONFIG_HEADER': this macro is obsolete. configure.ac:3: You should use the 'AC_CONFIG_HEADERS' macro instead. ./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from... aclocal.m4:745: AM_CONFIG_HEADER is expanded from... configure.ac:3: the top level configure.ac:21: warning: The preprocessor macro `STDC_HEADERS' is obsolete. configure.ac:21: Except in unusual embedded environments, you can safely include all configure.ac:21: ISO C90 headers unconditionally.

These all suggest that you are using a newer version of autotools than was available when this configure script was created. I should probably fix that, but it wasn't the problem reported here

error: possibly undefined macro: AS_IF This is the (admittedly) odd error that autoconf generates if you don't have pkg-config installed, googling that error specifically will tell you thats the problem

configure.ac:34: error: possibly undefined macro: AC_CHECK_LIB configure.ac:37: error: possibly undefined macro: AC_MSG_ERROR configure.ac:66: error: possibly undefined macro: AC_DEFINE Ditto for libtool here

I grant you, autotools isn't the best at announcing the need for specific tools, but thats well understood, and easily googlable.

As for the lack of numa support, take a look at the configure output: ... checking for numa... no checking for numa_available in -lnuma... no ...

The configure output pretty clearly says it can't find numa support here, which was your initial complaint . You need to read the output of configure, not just look at the all caps error messages