Skip to content

Recipe updates for NetBSD 11 support; fix nut-scanner builds --without-threading#3300

Open
jimklimov wants to merge 28 commits intonetworkupstools:masterfrom
jimklimov:issue-3256
Open

Recipe updates for NetBSD 11 support; fix nut-scanner builds --without-threading#3300
jimklimov wants to merge 28 commits intonetworkupstools:masterfrom
jimklimov:issue-3256

Conversation

@jimklimov
Copy link
Member

@jimklimov jimklimov commented Feb 4, 2026

UPDATE: Further fixes due to building recent code on Solaris 8 as the other range of the spectrum, and finding some bugs regarding nut-scanner initialization. It suffers somehow from faults inside malloc's during vupslog() called at random places when debugging is enabled, but passes OK e.g. for network scans which also involve quite a bit of memory work for the strings, I think. For posterity:

:; echo bt | gdb /home/jim/nut/tools/nut-scanner/.libs/nut-scanner `ls -lat /var/cores/nut-scanner.* | head -1 | awk '{print $NF}'`

...
Core was generated by `./tools/nut-scanner/.libs/nut-scanner -DDDDDD -h'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xdf916836 in realfree () from /usr/lib/libc.so.1
(gdb) #0  0xdf916836 in realfree () from /usr/lib/libc.so.1
#1  0xdf916dbf in cleanfree () from /usr/lib/libc.so.1
#2  0xdf9163aa in _malloc_unlocked () from /usr/lib/libc.so.1
#3  0xdf9162c9 in malloc () from /usr/lib/libc.so.1
#4  0xdf90c44e in calloc () from /usr/lib/libc.so.1
#5  0xdf9533de in dgettext () from /usr/lib/libc.so.1
#6  0xdf91ec1d in strerror () from /usr/lib/libc.so.1
#7  0xdfb7a5c8 in vupslog (priority=7, fmt=0x8047598 "[D1] \tVia %s:\t%s", va=0x80479b8 "\345%\270\337\b}\004\b^_\267\337", use_strerror=0) at common.c:3845
---Type <return> to continue, or q <return> to quit---
#8  0xdfb79cac in s_upsdebugx (level=1, fmt=0x8047598 "[D1] \tVia %s:\t%s") at common.c:4353
#9  0xdfb79eca in upsdebugx_report_search_paths (level=1, report_search_paths_builtin=1) at common.c:4961
#10 0xdfb75f5e in nutscan_init () at nutscan-init.c:171
#11 0x080512d1 in main (argc=5, argv=0x8047b34) at nut-scanner.c:1259

That exercise led to fixing a long-standing imperfection about fallback PRI<x>SIZE definitions NOT via %z<x> which is not a valid printf formatting character on older systems. Also a smaller initial buffer for vupslog() would be used on some systems, which should suffice for the majority of our log messages without realloc.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added this to the 2.8.5 milestone Feb 4, 2026
@jimklimov jimklimov added enhancement packaging CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) NetBSD portability We want NUT to build and run everywhere possible labels Feb 4, 2026
jimklimov added a commit to jimklimov/nut that referenced this pull request Feb 4, 2026
…TGT_RULE with explicit .MAKE pseudo-target [networkupstools#3300]

The BSD make as of NetBSD 11 (Beta) updates gets confused about
sub-calls to $(MAKE) with respective $(MAKEFLAGS) passed to it
with our parallel build scripting, despite the standard "+" prefix
to commands in the caller. An explicit pseudo-target seems to help
quiesce the warnings (and hopefully rectify the practical handling).

Co-authored-by: Greg Troxel <gdt@lexort.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

jimklimov and others added 6 commits February 5, 2026 08:24
…py.in: fix codecs.open() deprecation warning (3.14+) [networkupstools#3256]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Co-Authored-by: Paul Donald <newtwen+github@gmail.com>
…@" (was a goal body before)

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… the already-built artefacts

Thanks to Lee Damon for the heads-up

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…TGT_RULE with explicit .MAKE pseudo-target [networkupstools#3300]

The BSD make as of NetBSD 11 (Beta) updates gets confused about
sub-calls to $(MAKE) with respective $(MAKEFLAGS) passed to it
with our parallel build scripting, despite the standard "+" prefix
to commands in the caller. An explicit pseudo-target seems to help
quiesce the warnings (and hopefully rectify the practical handling).

Co-authored-by: Greg Troxel <gdt@lexort.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…nd of file (some SEDs complain)

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e.am, docs/configure.txt, NEWS.adoc, UPGRADING.adoc: Added an option to (primarily) `--disable-threading` [networkupstools#3300]

Can be useful for systems with broken libraries, as well as for
CI testing of sequential implementation on build systems WITH
threading support available (and until now unavoidable then).

This commit also fixes problems found when trying such a build.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…t for (C99+) printf("%zu") et al

It seems Solaris 8 struggles with the lack of it, so formatting strings get skewed

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…sing through the arrays

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…dex increment

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…-NULL args to realpath(), provide the buffer and handle errors better

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…rings

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

@jimklimov jimklimov added the Solaris/illumos Solaris and illumos systems (OpenIndiana, OmniOS, SmartOS, TribbliX...) label Feb 5, 2026
… most logs are short

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…epare_search_paths() [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link

…nsistently with other code [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ed to link anything additional) [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ization of some tools" twice [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…er fixing use of realpath() to use our buffer [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d libusb_init() on libusb older than 1.0.24 [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…de option [networkupstools#3300]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov changed the title Recipe updates for NetBSD 11 support Recipe updates for NetBSD 11 support; fix nut-scanner builds --without-threading Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) enhancement NetBSD nut-scanner packaging portability We want NUT to build and run everywhere possible Solaris/illumos Solaris and illumos systems (OpenIndiana, OmniOS, SmartOS, TribbliX...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants