Skip to content

API changes breaking CPANs modules with ld errors are not caught by BBC #23918

Open

Description

@ericherman

Description
0351a62 hides symbols, some of which were used by CPAN modules.

We noticed that Algorithm-Heapify-XS depends upon Perl_do_ncmp.

And it seems FreeBSD dropped support for other distributions related to this commit:

  • Data-Swap
  • Devel-BeginLift
  • Text-ClearSilver
  • Apache-DB

(Note that some had other issues before.)

Steps to Reproduce

If we look at cpantesters, we see the ld failures are "UNKNOWN", and not "FAIL".

To see an example of the kind of failure we'd expect caught, clone demerphq/Algorithm-Heapify-XS and type perl Makefile.PL && make

Expected behavior

Changes made to the API don't break CPAN.
It would be expected that BBC would have caught these.

Activity

  1. added a commit that references this issue on Jan 4, 2026
  2. jkeenan commented on Feb 22, 2026

    @jkeenan
    Contributor

    @tonycoz can we get an update on the status of this ticket? Thanks.

  3. tonycoz commented on Feb 22, 2026

    @tonycoz
    Contributor

    @tonycoz can we get an update on the status of this ticket? Thanks.

    The numeric APIs are done and merged.

    The string APIs are less directly related to this issue, but still related.

    I'll self-assign.

  4. self-assigned this
    on Feb 22, 2026
  5. tonycoz commented on Feb 22, 2026

    @tonycoz
    Contributor

    I want to add them to ppport.h too, though that has its complications.

  6. leonerd commented on Mar 30, 2026

    @leonerd
    Contributor

    This feels like it has multiple parts to it (and also overlaps with other issues not just this one); some parts of which may be a release blocker. We will tag it for now and come back later.

  7. Leont commented on Mar 31, 2026

    @Leont
    Contributor

    All of these have been failing since 5.37, so this is not a new regression and should not be a release blocker.

  8. demerphq commented on Jun 29, 2026

    @demerphq
    Collaborator

    Am I correct in thinking that the general plan at this point is to produce a "proper" XS-API for this and then provide a replacement for Perl_do_ncmp() using those functions in PPPORT? @tonycoz ?

  9. demerphq commented on Jun 29, 2026

    @demerphq
    Collaborator

    @tonycoz:

    Note that Algorithm::Heapify::XS always failed on Win32:

    C:/strawberry/c/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: XS.o:XS.c:(.text+0x1b2): undefined reference to `_imp__Perl_do_ncmp'

    Hmm, I don't think anyone ever told me about this or I'd have tried to fix it. :-)

  10. sisyphus commented on Jun 29, 2026

    @sisyphus
    Contributor

    Hmm, I don't think anyone ever told me about this or I'd have tried to fix it. :-)

    FWIW, Algorithm-Heapify-XS-0.05 builds and tests ok for me on Windows with perl-5.42.0.
    There is, however, one compilation warning:

    XS.xs:36:1: warning: 'Perl_do_ncmp' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
       36 | Perl_do_ncmp(pTHX_ SV* const left, SV * const right)
          | ^~~~~~~~~~~~
    
  11. demerphq commented on Jun 29, 2026

    @demerphq
    Collaborator

    @sisyphus wrote:

    There is, however, one compilation warning:

    Which is now fixed (hopefully) with a v0.06 that i just now pushed to PAUSE, thanks!

  12. sisyphus commented on Jun 29, 2026

    @sisyphus
    Contributor

    Yep - 0.06 builds cleanly and tests and installs fine.

  13. tonycoz commented on Jun 29, 2026

    @tonycoz
    Contributor

    Hmm, I don't think anyone ever told me about this or I'd have tried to fix it. :-)

    IIRC it was coming back as UNKNOWN (generally a build failure) on CPAN testers , unfortunately CPAN testers is unhappy today so I can't look at individual reports.

  14. jkeenan commented on Jul 2, 2026

    @jkeenan
    Contributor

    Hmm, I don't think anyone ever told me about this or I'd have tried to fix it. :-)

    IIRC it was coming back as UNKNOWN (generally a build failure) on CPAN testers , unfortunately CPAN testers is unhappy today so I can't look at individual reports.

    FWIW, Algorithm-Heapify-XS-0.08 was released to CPAN two days ago and is doing well on CPANtesters. However, it has not yet been CPANtested on Windows -- a condition it shares with many CPAN distros.

  15. demerphq commented on Jul 2, 2026

    @demerphq
    Collaborator

    @jkeenan wrote:

    FWIW, Algorithm-Heapify-XS-0.08 was released to CPAN two days ago and is doing well on CPANtesters. However, it has not yet been CPANtested on Windows -- a condition it shares with many CPAN distros.

    Yeah. It would be nice (at some level) to know that it works everywhere, although if nobody wants to use it on Windows I can understand, its approach to Heaps is kinda niche (but imo perlish). :-)

    FWIW. I've tried to make sure it builds correctly now on everything since 5.18.4.

  16. tonycoz commented on Jul 2, 2026

    @tonycoz
    Contributor

    Yeah. It would be nice (at some level) to know that it works everywhere, although if nobody wants to use it on Windows I can understand, its approach to Heaps is kinda niche (but imo perlish). :-)

    github actions can test your module on Windows, eg. https://github.com/tonycoz/imager/blob/master/.github/workflows/os-mswin32-mingw64.yml (you'll need to change the "on" clause)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions