Error received after "make" command in version 1.10.1 #1072

Closed
opened 2026-10-05 05:01:44 +02:00 by adam · 7 comments
Owner

Hello, as I mentioned in the title, it returns an error after the make command (on RHEL9.6):

/home/ircds/znc-1.10.1/modules/modperl/modperl_biglib.cpp: In function ‘SV* std_set_Sl_CString_Sg__keys_(std::set)’:
/home/ircds/znc-1.10.1/modules/modperl/modperl_biglib.cpp:2296:26: error: ‘newAV_alloc_x’ was not declared in this scope
2296 | AV
av = newAV_alloc_x(self->size());
cc1plus: note: unrecognized command-line option ‘-Wno-reserved-user-defined-literal’ may have been intended to silence earlier diagnostics
make[2]: *** [modules/modperl/CMakeFiles/modperl_lib.dir/build.make:89: modules/modperl/CMakeFiles/modperl_lib.dir/modperl_biglib.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3847: modules/modperl/CMakeFiles/modperl_lib.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

My CMake command is also this and I have not received an error before:

cmake3 -DCMAKE_INSTALL_PREFIX="$HOME/.znc" -DWANT_PERL=YES -DWANT_PYTHON=YES -DWANT_TCL=YES -DWANT_IPV6=YES

Hello, as I mentioned in the title, it returns an error after the make command (on RHEL9.6): /home/ircds/znc-1.10.1/modules/modperl/modperl_biglib.cpp: In function ‘SV* std_set_Sl_CString_Sg__keys_(std::set<CString>*)’: /home/ircds/znc-1.10.1/modules/modperl/modperl_biglib.cpp:2296:26: error: ‘newAV_alloc_x’ was not declared in this scope 2296 | AV* av = newAV_alloc_x(self->size()); cc1plus: note: unrecognized command-line option ‘-Wno-reserved-user-defined-literal’ may have been intended to silence earlier diagnostics make[2]: *** [modules/modperl/CMakeFiles/modperl_lib.dir/build.make:89: modules/modperl/CMakeFiles/modperl_lib.dir/modperl_biglib.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:3847: modules/modperl/CMakeFiles/modperl_lib.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 My CMake command is also this and I have not received an error before: cmake3 -DCMAKE_INSTALL_PREFIX="$HOME/.znc" -DWANT_PERL=YES -DWANT_PYTHON=YES -DWANT_TCL=YES -DWANT_IPV6=YES <!-- github-sync-id:3212886424 -->
adam closed this issue 2026-10-05 05:01:44 +02:00
Author
Owner

what's your swig version and perl version?

what's your swig version and perl version? <!-- github-comment-id:3049874992 -->
Author
Owner

swig is not installed, perl v5.32.1

swig is not installed, perl v5.32.1 <!-- github-comment-id:3050156397 -->
Author
Owner

I also installed swig (swig-4.0.2-8.el9.x86_64) and tried again with the latest znc github version (gh repo clone znc/znc). But I got the same error again.

I also installed swig (swig-4.0.2-8.el9.x86_64) and tried again with the latest znc github version (gh repo clone znc/znc). But I got the same error again. <!-- github-comment-id:3050223898 -->
Author
Owner

Having noticed this recently as well (similarly while building ZNC for a RHEL-9.6 clone), it looks like newAV_alloc_x was added in perl5 commit 0b1c19ab1c (Add Perl_av_new_alloc() function and newAV_alloc_x/z() macros, 2021-04-19), first released with perl-5.35.1.

Whether that's old enough to require or not is up to the ZNC maintainers (of course), though perhaps it's worth documenting the requirement if it's decided to make that the minimum?

FWIW, the current Debian oldstable (bullseye) also has perl-5.32.1.

Having noticed this recently as well (similarly while building ZNC for a RHEL-9.6 clone), it looks like `newAV_alloc_x` was added in perl5 commit [0b1c19ab1c](https://github.com/Perl/perl5/commit/0b1c19a) `(Add Perl_av_new_alloc() function and newAV_alloc_x/z() macros, 2021-04-19)`, first released with perl-5.35.1. Whether that's old enough to require or not is up to the ZNC maintainers (of course), though perhaps it's worth documenting the requirement if it's decided to make that the minimum? FWIW, the current Debian oldstable (bullseye) also has perl-5.32.1. <!-- github-comment-id:3124759990 -->
Author
Owner

That wasn't intentional - the doc for that function didn't specify when it was added.

Who wants to make PR which replaces it with something more compatible with old perl? The change would be in modperl.i

That wasn't intentional - the doc for that function didn't specify when it was added. Who wants to make PR which replaces it with something more compatible with old perl? The change would be in modperl.i <!-- github-comment-id:3128826722 -->
Author
Owner

@tmzullinger thanks for finding, btw

@tmzullinger thanks for finding, btw <!-- github-comment-id:3128921101 -->
Author
Owner

I'll take a stab at it. It looks like it should be a trivial replacement:

-                AV* av = newAV_alloc_x(self->size());
+                AV *av = newAV();
+                av_extend(av, self->size());

But I'll build and test before I submit that, as I'm sure I'm not the only one to have been burned by "that should be a trivial change" before. ;)

I'll take a stab at it. It looks like it should be a trivial replacement: ```diff - AV* av = newAV_alloc_x(self->size()); + AV *av = newAV(); + av_extend(av, self->size()); ``` But I'll build and test before I submit that, as I'm sure I'm not the only one to have been burned by "that should be a trivial change" before. ;) <!-- github-comment-id:3130334701 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#1072