Bug 2093706 - polymake-4.6-7.fc37: FTBFS with Perl 5.36
Summary: polymake-4.6-7.fc37: FTBFS with Perl 5.36
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: polymake
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL: https://koji.fedoraproject.org/koji/t...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-05 13:09 UTC by Jitka Plesnikova
Modified: 2022-06-06 23:24 UTC (History)
2 users (show)

Fixed In Version: polymake-4.6-7.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-06 23:24:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jitka Plesnikova 2022-06-05 13:09:37 UTC
I am working on adding Perl 5.36 to Fedora Rawhide/37.

The rebuild of polymake failed with this version in side tag f37-perl:


Description of problem:
Package polymake fails to build from source in Fedora Rawhide.

/builddir/build/BUILD/polymake-4.6/lib/core/src/perl/RefHash.xxs: In member function ‘SV* pm::perl::glue::{anonymous}::tmp_keysv::set(SV*)’:
/builddir/build/BUILD/polymake-4.6/lib/core/src/perl/RefHash.xxs:74:22: error: ‘HVhek_UNSHARED’ was not declared in this scope; did you mean ‘HVhek_NOTSHARED’?
   74 |    HEK_FLAGS(hekp) = HVhek_UNSHARED;
      |                      ^~~~~~~~~~~~~~
      |                      HVhek_NOTSHARED
ninja: build stopped: subcommand failed.
make: *** [Makefile:35: all] Error 1

It is caused by this change in Perl:

commit 1db404fc7d10badcbca1c0f589d382fc79c57813
Author: Nicholas Clark <nick>
Date:   Mon Oct 18 19:56:09 2021 +0000

    Rename HVhek_UNSHARED to HVhek_NOTSHARED
    
    "HVhek_UNSHARED" marked unshared HEKs - allocated directly with malloc(),
    rather then from the shared string table, and released with free().
    
    But *shared* HEKs (in the shared string table) are released by calling
    unshare_hek(), whilst unshared HEKs should never go near this.
    
    So rename them to "not shared", to avoid this confusion. Change their flag
    bit from 0x08 to 0x04 to remove a gap. 0x04 had previously been used to
    flag "REHASH", which was removed before v5.18.0
    
    Move the definition of the macro HVhek_MASK from hv.h to hv.c

Solution: Replace HVhek_UNSHARED by HVhek_NOTSHARED in lib/core/src/perl/RefHash.xxs

Comment 1 Jitka Plesnikova 2022-06-05 13:11:21 UTC
I created PR with possible fix.

https://src.fedoraproject.org/rpms/polymake/pull-request/1

Comment 2 Jitka Plesnikova 2022-06-05 13:12:39 UTC
(In reply to Jitka Plesnikova from comment #1)
> I created PR with possible fix.
> 
> https://src.fedoraproject.org/rpms/polymake/pull-request/1

Build with the fix
https://koji.fedoraproject.org/koji/taskinfo?taskID=87834682

Comment 3 Jitka Plesnikova 2022-06-06 09:05:20 UTC
Updated the fix to work for older version:

https://src.fedoraproject.org/rpms/polymake/pull-request/2

Comment 4 Jerry James 2022-06-06 14:27:53 UTC
Thank you for investigating, Jitka.  I appreciate the fix.  I have merged your PR.  Do you want to take care of building in the side tag, or would you like me to do that?

Comment 5 Jitka Plesnikova 2022-06-06 14:33:07 UTC
Perl 5.36 has been merged to Fedora Rawhide, so you can build it here.

Comment 6 Jerry James 2022-06-06 14:36:10 UTC
Okay, will do.

Comment 7 Jerry James 2022-06-06 23:24:49 UTC
The patched version has been built in Rawhide.


Note You need to log in before you can comment on or make changes to this bug.