I've compiled a static version of ipmitool based on latest source tree here (codeberg.org) available. Executing this on ESXi VMware 7 with an Intel BMC yields following error:
# ./ipmitool.static-1.8.19.19.gab5ce5b lan print 3
IANA PEN registry open failed: No such file or directory
Failed to load entries from IANA PEN Registry
Could not enable event receiver: Invalid argument
With strace:
# strace -f ./ipmitool.static-1.8.19.19.gab5ce5b lan print 3
execve("./ipmitool.static-1.8.19.19.gab5ce5b", ["./ipmitool.static-1.8.19.19.gab5"..., "lan", "print", "3"], [/* 18 vars */]) = 0
arch_prctl(0x3001 /* ARCH_??? */) = -1 EINVAL (Invalid argument)
brk(0) = 0xc9c7765000
brk(0xc9c7765e00) = 0xc9c7765e00
arch_prctl(ARCH_SET_FS, 0xc9c7765400) = 0
set_tid_address(0xc9c77656d0) = 2242671
set_robust_list(0xc9c77656e0, 0x18) = 0
syscall_334(0xc9c7765da0, 0x20, 0, 0x53053053, 0, 0x800, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0) = -1 (errno 38)
uname({sys="VMkernel", node="SERVER.DOMAIN.COM", ...}) = 0
syscall_302(0, 0x3, 0, 0x329c3db8b70, 0x3, 0x800, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50) = -1 (errno 38)
readlink("/proc/self/exe", 0x329c3db7ab0, 4096) = -1 EINVAL (Invalid argument)
syscall_318(0x6e9b10, 0x8, 0x1, 0x329c3db8b70, 0, 0x800, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50) = 0x8
brk(0xc9c7786e00) = 0xc9c7786e00
brk(0xc9c7787000) = 0xc9c7787000
mprotect(0x637000, 81920, PROT_READ) = 0
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", 0x6e5340, 0x1000 /* AT_??? */) = -1 EBADF (Bad file descriptor)
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGINT, {0x440de0, [INT], SA_RESTORER|SA_RESTART, 0x4b6560}, {SIG_DFL, ~[KILL STOP RTMIN RT_1], 0}, 8) = 0
openat(AT_FDCWD, "//.local/usr/share/misc/enterprise-numbers", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/share/misc/enterprise-numbers", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "IANA PEN registry open failed: N"..., 57IANA PEN registry open failed: No such file or directory
) = 57
write(2, "Failed to load entries from IANA"..., 46Failed to load entries from IANA PEN Registry
) = 46
openat(AT_FDCWD, "/dev/ipmi0", O_RDWR) = 3
ioctl(3, IPMICTL_SET_GETS_EVENTS_CMD, 0x329c3db897c) = -1 EINVAL (Invalid argument)
write(2, "Could not enable event receiver:"..., 50Could not enable event receiver: Invalid argument
) = 50
exit_group(1) = ?
After some trial & error I managed to get it up & running with 1.8.18 on the same machine so guess this is a bug in more recent versions?
# ./ipmitool.static -V
ipmitool.static version 1.8.18
# ./ipmitool.static lan print 3
Set in Progress : Set Complete
Auth Type Support : MD5 PASSWORD
Auth Type Enable : Callback :
: User :
....
I've compiled the static versions as follows:
1.8.19.19.gab5ce5b
./bootstrap
LDFLAGS=-static ./configure --disable-intf-lanplus
make
cd src
/bin/bash ../libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -Wextra -std=gnu11 -pedantic -Wformat -Wformat-nonliteral -all-static -o ipmitool.static-1.8.19.19.gab5ce5b ipmitool.o ipmishell.o ../lib/libipmitool.la plugins/libintf.la -lcrypto -lreadline -ltinfo
I had to add -ltinfo manually otherwise it would not link but not sure if that is relevant to this issue
1.8.18
Latest source from SourceForge + Gentoo Patch #706870
./bootstrap
LDFLAGS=-static ./configure --disable-intf-lanplus
make
cd src
/bin/bash ../libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -Wextra -std=gnu99 -pedantic -Wformat -Wformat-nonliteral -all-static -o ipmitool.static ipmitool.o ipmishell.o ../lib/libipmitool.la plugins/libintf.la -lreadline -lncurses -ltinfo -lreadline -lncurses -ltinfo -lcrypto
I've compiled a static version of ipmitool based on latest source tree here (codeberg.org) available. Executing this on ESXi VMware 7 with an Intel BMC yields following error:
```
# ./ipmitool.static-1.8.19.19.gab5ce5b lan print 3
IANA PEN registry open failed: No such file or directory
Failed to load entries from IANA PEN Registry
Could not enable event receiver: Invalid argument
```
With strace:
```
# strace -f ./ipmitool.static-1.8.19.19.gab5ce5b lan print 3
execve("./ipmitool.static-1.8.19.19.gab5ce5b", ["./ipmitool.static-1.8.19.19.gab5"..., "lan", "print", "3"], [/* 18 vars */]) = 0
arch_prctl(0x3001 /* ARCH_??? */) = -1 EINVAL (Invalid argument)
brk(0) = 0xc9c7765000
brk(0xc9c7765e00) = 0xc9c7765e00
arch_prctl(ARCH_SET_FS, 0xc9c7765400) = 0
set_tid_address(0xc9c77656d0) = 2242671
set_robust_list(0xc9c77656e0, 0x18) = 0
syscall_334(0xc9c7765da0, 0x20, 0, 0x53053053, 0, 0x800, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0, 0x6371c0) = -1 (errno 38)
uname({sys="VMkernel", node="SERVER.DOMAIN.COM", ...}) = 0
syscall_302(0, 0x3, 0, 0x329c3db8b70, 0x3, 0x800, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50) = -1 (errno 38)
readlink("/proc/self/exe", 0x329c3db7ab0, 4096) = -1 EINVAL (Invalid argument)
syscall_318(0x6e9b10, 0x8, 0x1, 0x329c3db8b70, 0, 0x800, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50, 0x329c3db8c50) = 0x8
brk(0xc9c7786e00) = 0xc9c7786e00
brk(0xc9c7787000) = 0xc9c7787000
mprotect(0x637000, 81920, PROT_READ) = 0
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", 0x6e5340, 0x1000 /* AT_??? */) = -1 EBADF (Bad file descriptor)
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGINT, {0x440de0, [INT], SA_RESTORER|SA_RESTART, 0x4b6560}, {SIG_DFL, ~[KILL STOP RTMIN RT_1], 0}, 8) = 0
openat(AT_FDCWD, "//.local/usr/share/misc/enterprise-numbers", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/share/misc/enterprise-numbers", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "IANA PEN registry open failed: N"..., 57IANA PEN registry open failed: No such file or directory
) = 57
write(2, "Failed to load entries from IANA"..., 46Failed to load entries from IANA PEN Registry
) = 46
openat(AT_FDCWD, "/dev/ipmi0", O_RDWR) = 3
ioctl(3, IPMICTL_SET_GETS_EVENTS_CMD, 0x329c3db897c) = -1 EINVAL (Invalid argument)
write(2, "Could not enable event receiver:"..., 50Could not enable event receiver: Invalid argument
) = 50
exit_group(1) = ?
```
After some trial & error I managed to get it up & running with 1.8.18 on the same machine so guess this is a bug in more recent versions?
```
# ./ipmitool.static -V
ipmitool.static version 1.8.18
# ./ipmitool.static lan print 3
Set in Progress : Set Complete
Auth Type Support : MD5 PASSWORD
Auth Type Enable : Callback :
: User :
....
```
I've compiled the static versions as follows:
*1.8.19.19.gab5ce5b*
```
./bootstrap
LDFLAGS=-static ./configure --disable-intf-lanplus
make
cd src
/bin/bash ../libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -Wextra -std=gnu11 -pedantic -Wformat -Wformat-nonliteral -all-static -o ipmitool.static-1.8.19.19.gab5ce5b ipmitool.o ipmishell.o ../lib/libipmitool.la plugins/libintf.la -lcrypto -lreadline -ltinfo
```
I had to add `-ltinfo` manually otherwise it would not link but not sure if that is relevant to this issue
*1.8.18*
Latest source from SourceForge + [Gentoo Patch #706870](https://706870.bugs.gentoo.org/attachment.cgi?id=649446)
```
./bootstrap
LDFLAGS=-static ./configure --disable-intf-lanplus
make
cd src
/bin/bash ../libtool --silent --tag=CC --mode=link gcc -g -O2 -Wall -Wextra -std=gnu99 -pedantic -Wformat -Wformat-nonliteral -all-static -o ipmitool.static ipmitool.o ipmishell.o ../lib/libipmitool.la plugins/libintf.la -lreadline -lncurses -ltinfo -lreadline -lncurses -ltinfo -lcrypto
```