Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtUtils-ParseXS can redefine croak_xs_usage #18040

Closed
atoomic opened this issue Aug 7, 2020 · 8 comments
Closed

ExtUtils-ParseXS can redefine croak_xs_usage #18040

atoomic opened this issue Aug 7, 2020 · 8 comments

Comments

@atoomic
Copy link
Member

atoomic commented Aug 7, 2020

I noticed this issue while compiling Devel-PPPort-3.58 using Perl 5.8.8

ExtUtils::ParseXS::Utilities provides a definition of croak_xs_usage
which can conflict with the definition provided by Devel-PPPort.

It defines #define croak_xs_usage S_croak_xs_usage without checking if it's already define or undef it.

This leads to warnings like this when generating RealPPPort.c
RealPPPort.c:458:1: warning: "croak_xs_usage" redefined

In truth fixing this issue without publishing a new version of the dual life module ExtUtils-ParseXS
has a low value, but this does not mean we should not fix this issue in blead.

Note that Devel-PPPort is already using a protection for #ifndef croak_xs_usage

atoomic added a commit to atoomic/perl5 that referenced this issue Aug 7, 2020
Fix Perl#18040

Do not redefine croak_xs_usage when already set.
@tonycoz
Copy link
Contributor

tonycoz commented Aug 10, 2020

EU::PXS already protects against redefining over the core definition of croak_xs_usage() by checking for PERL_ARGS_ASSERT_CROAK_XS_USAGE, could Devel::PPPort do the same?

@atoomic
Copy link
Member Author

atoomic commented Aug 10, 2020

This would work too, view Dual-Life/Devel-PPPort#196

@jkeenan
Copy link
Contributor

jkeenan commented Sep 1, 2020

This would work too, view Dual-Life/Devel-PPPort#196

@atoomic , @tonycoz, Are there any more issues to be handled in this ticket?

Thank you very much.
Jim Keenan

@jkeenan jkeenan added the Closable? We might be able to close this ticket, but we need to check with the reporter label Sep 1, 2020
@atoomic
Copy link
Member Author

atoomic commented Sep 1, 2020

I do not think we should close this ticket, we should merge at least one of these two:

Right now both are stale, I'm not sure what action to do at this stage.

@tonycoz
Copy link
Contributor

tonycoz commented Sep 2, 2020

The #196 change should be applied to blead (blead is upstream, not Dual-Life).

It should probably include a comment to indicate why it is the way it is.

@tonycoz tonycoz removed the Closable? We might be able to close this ticket, but we need to check with the reporter label Sep 2, 2020
jkeenan added a commit that referenced this issue Feb 12, 2021
@jkeenan
Copy link
Contributor

jkeenan commented Feb 12, 2021

The #196 change should be applied to blead (blead is upstream, not Dual-Life).

I have done so in this branch:
smoke-me/jkeenan/gh-18040-parts-inc-mess

@tonycoz, @atoomic, Please review.

It should probably include a comment to indicate why it is the way it is.

@tonycoz
Copy link
Contributor

tonycoz commented Feb 15, 2021

The commit message should be the one from Dual-Life/Devel-PPPort#196 (except referencing #18040).

jkeenan added a commit that referenced this issue Feb 16, 2021
Apply patch already applied to Dual-Life/Devel-PPPort:
https://github.com/Dual-Life/Devel-PPPort/pull/196.patch

This is matching what's done in ExtUtils::ParseXS::Utilities
and avoids need to redefine croak_xs_usage later.

For: #18040
@jkeenan
Copy link
Contributor

jkeenan commented Feb 16, 2021

Applied to blead in 3b75ef9. Closing ticket.

@jkeenan jkeenan closed this as completed Feb 16, 2021
Corion pushed a commit to Corion/perl5 that referenced this issue Jun 20, 2021
Apply patch already applied to Dual-Life/Devel-PPPort:
https://github.com/Dual-Life/Devel-PPPort/pull/196.patch

This is matching what's done in ExtUtils::ParseXS::Utilities
and avoids need to redefine croak_xs_usage later.

For: Perl#18040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants