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:
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 -->
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 -->
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 -->
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 -->
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 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
what's your swig version and perl version?
swig is not installed, perl v5.32.1
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.
Having noticed this recently as well (similarly while building ZNC for a RHEL-9.6 clone), it looks like
newAV_alloc_xwas 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.
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
@tmzullinger thanks for finding, btw
I'll take a stab at it. It looks like it should be a trivial replacement:
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. ;)