Skip to content

Fix compilation on newer gcc-13.x and clang-18, fix nut-scanner offering config values not applicable for some USB drivers#2589

Merged
jimklimov merged 5 commits intonetworkupstools:masterfrom
jimklimov:issue-2585-2588
Aug 11, 2024
Merged

Fix compilation on newer gcc-13.x and clang-18, fix nut-scanner offering config values not applicable for some USB drivers#2589
jimklimov merged 5 commits intonetworkupstools:masterfrom
jimklimov:issue-2585-2588

Conversation

@jimklimov
Copy link
Member

Touches on a number of issues:

#1763
#1764
#1768
Closes: #2580
Closes: #2585
Closes: #2588

…: introduce `configure --enable-NUT_STRARG-always` setting [networkupstools#2585]

Signed-off-by: Jim Klimov <[email protected]>
…ys` setting have `auto` detection by default [networkupstools#2585]

Flips to "yes" for gcc-13.x (clang having issues is not proven at the moment)

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov added enhancement nut-scanner CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) portability We want NUT to build and run everywhere possible labels Aug 10, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Aug 10, 2024
@desertwitch
Copy link
Contributor

desertwitch commented Aug 10, 2024

Thanks a lot for following up on this!
Builds without complaints now, although this test output does now show outside config.log (not sure if intended):

--enable-NUT_STRARG-always not set by me:

checking for __attribute__((unused)) for function arguments... yes
checking for __attribute__((unused)) for functions... yes
checking for __attribute__((noreturn))... yes
checking for at least some __attribute__ support... yes
checking for practical support to printf("%s", NULL)... (null)yes
configure: CC_VERSION='gcc (GCC) 13.2.0'
+ test xauto = xauto
+ :
+ nut_enable_NUT_STRARG_always=no
+ test '' = yes
+ case e in
+ test yes = yes
+ :
+ case "$CC_VERSION" in
+ :
+ nut_enable_NUT_STRARG_always=yes
+ test xyes = xyes
+ :
+ printf '%s\n' 'configure:15178: Automatically enabled NUT_STRARG-always due to compiler version used'
+ printf '%s\n' 'configure: Automatically enabled NUT_STRARG-always due to compiler version used'
configure: Automatically enabled NUT_STRARG-always due to compiler version used
+ test yes = yes
+ test xyes '!=' xyes
+ case e in
+ true
+ REQUIRE_NUT_STRARG_TRUE=
+ REQUIRE_NUT_STRARG_FALSE='#'
+ printf '%s\n' '#define REQUIRE_NUT_STRARG 1'
+ printf '%s\n' 'configure:15212: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why'
+ printf '%s\n' 'configure: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why'
configure: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why
+ set +x
checking for cstdbool... no

--enable-NUT_STRARG-always set by me:

checking for __attribute__((unused)) for function arguments... yes
checking for __attribute__((unused)) for functions... yes
checking for __attribute__((noreturn))... yes
checking for at least some __attribute__ support... yes
checking for practical support to printf("%s", NULL)... (null)yes
configure: CC_VERSION='gcc (GCC) 13.2.0'
+ test xyes = xauto
+ test yes = yes
+ test xyes '!=' xyes
+ case e in
+ true
+ REQUIRE_NUT_STRARG_TRUE=
+ REQUIRE_NUT_STRARG_FALSE='#'
+ printf '%s\n' '#define REQUIRE_NUT_STRARG 1'
+ printf '%s\n' 'configure:15212: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why'
+ printf '%s\n' 'configure: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why'
configure: WARNING: Your C library requires workarounds to print NULL values; if something crashes with a segmentation fault (especially during verbose debug) - that may be why
+ set +x
checking for cstdbool... no

P.S. Ah, just saw you encapsulated this into set -x and set +x, so probably intended indeed... 😉

@jimklimov
Copy link
Member Author

Hah, thanks, that was supposed to be l0cal :)

…duct(id), and serial options for bcmxcp_usb, richcomm_usb, nutdrv_atcl_usb [networkupstools#1763, networkupstools#1764, networkupstools#1768, networkupstools#2580]

Signed-off-by: Jim Klimov <[email protected]>
@jimklimov jimklimov merged commit f5022a1 into networkupstools:master Aug 11, 2024
@jimklimov
Copy link
Member Author

jimklimov commented Aug 11, 2024

Failed builds: 32-bit libs missing after update on an agent, addressed by defining a separate agent for this aspect on NUT CI

@jimklimov jimklimov deleted the issue-2585-2588 branch August 11, 2024 18:07
@jimklimov jimklimov restored the issue-2585-2588 branch April 15, 2025 09:55
@jimklimov jimklimov deleted the issue-2585-2588 branch April 15, 2025 10:41
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 nut-scanner portability We want NUT to build and run everywhere possible

Projects

None yet

2 participants