On 31/08/2021 17.29, David Bremner wrote:
This package fails to build from source with Perl 5.34 (currently
in experimental). I don't presently understand why; I'm not aware of
changes to Perl_pp_keys or Perl_pp_rv2hv. So the root issue might also
be on the Perl side. At least it seems to reliably fail the same way.

There is a new upstream release, which I should try packaging before we
get too far in debugging this.

That issue should be fixed in polymake 4.4. For polymake 4.3 you can try the attached patch. There were no real changes to these macros, but they were moved into some ifdef restricting their use to the perl core.

Best
Benjamin
diff --git a/lib/core/src/perl/RefHash.xxs b/lib/core/src/perl/RefHash.xxs
index 60a4d75481..ceb3735087 100644
--- a/lib/core/src/perl/RefHash.xxs
+++ b/lib/core/src/perl/RefHash.xxs
@@ -437,7 +437,7 @@ OP* intercept_pp_keys(pTHX)
    I32 gimme = GIMME_V;
    if (gimme == G_ARRAY && (stash==my_pkg || (stash && ref_key_allowed(stash)))) {
       SSize_t sp_dist = SP - PL_stack_base;
-      OP* ret = Perl_pp_keys(aTHX);
+      OP* ret = def_pp_KEYS(aTHX);
       SV** last = PL_stack_sp;
       for (sp = PL_stack_base + sp_dist; sp <= last; ++sp)
          key2ref(aTHX_ *sp);
@@ -445,7 +445,7 @@ OP* intercept_pp_keys(pTHX)
    }
    if (gimme == G_SCALAR && (mg = hash_is_cpp_class(hv, stash)))
       return cpp_keycnt(aTHX_ hv, mg);
-   return Perl_pp_keys(aTHX);
+   return def_pp_KEYS(aTHX);
 }
 
 // aassign isn't intercepted directly, since it is used very often and not only with hashes.
@@ -576,7 +576,7 @@ OP* pp_rv2hv_ref_retrieve(pTHX)
 {
    dSP;
    SSize_t sp_dist = SP - PL_stack_base;
-   OP* ret = Perl_pp_rv2hv(aTHX);
+   OP* ret = def_pp_RV2HV(aTHX);
    SV** last = PL_stack_sp;
    for (SP = PL_stack_base + sp_dist; SP < last; SP += 2)
       key2ref(aTHX_ *SP);
@@ -601,7 +601,7 @@ OP* intercept_pp_rv2hv(pTHX)
    HV* stash;
    if (PL_op->op_flags & OPf_REF) {
       if (PL_op->op_next->op_type == OP_AASSIGN) {
-         PL_op = Perl_pp_rv2hv(aTHX);
+         PL_op = def_pp_RV2HV(aTHX);
          return ref_assign(aTHX);
       }
       if (SvROK(hv)) {
@@ -621,18 +621,18 @@ OP* intercept_pp_rv2hv(pTHX)
          if (stash == my_pkg || (stash && ref_key_allowed(stash)))
             return pp_rv2hv_ref_retrieve(aTHX);
          else
-            return Perl_pp_rv2hv(aTHX);
+            return def_pp_RV2HV(aTHX);
       }
       SAVEI8(PL_op->op_flags);  // just for the case the op dies
       PL_op->op_flags ^= OPf_REF;
-      Perl_pp_rv2hv(aTHX);               // get the hash
+      def_pp_RV2HV(aTHX);               // get the hash
       PL_op->op_flags ^= OPf_REF;
       hv = TOPs;
       stash = SvSTASH(hv);
       if (stash == my_pkg || (stash && ref_key_allowed(stash)))
          return pp_rv2hv_ref_retrieve(aTHX);
    }
-   return Perl_pp_rv2hv(aTHX);
+   return def_pp_RV2HV(aTHX);
 }
 
 OP* intercept_pp_padhv(pTHX)

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to