Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Devel-PPPort CPAN distribution.

Report information
The Basics
Id: 67130
Status: rejected
Priority: 0/
Queue: Devel-PPPort

People
Owner: Nobody in particular
Requestors: justincase [...] yopmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SvPVbyte fails with perl 5.6.2
Using SvPVbyte with perl 5.6.2 and ppport.h version 3.19 on Mac OS X 10.6.7 produces the following error: t/00_compile....dyld: NSLinkModule() error dyld: Symbol not found: _DPPP_my_sv_2pvbyte If I switch SvPVbyte in my XS to SvPV, there are no problems.
From: justincase [...] yopmail.com
On Thu Mar 31 19:39:06 2011, justincase wrote: Show quoted text
> Using SvPVbyte with perl 5.6.2 and ppport.h version 3.19 on Mac OS X > 10.6.7 produces the > following error: > > t/00_compile....dyld: NSLinkModule() error > dyld: Symbol not found: _DPPP_my_sv_2pvbyte > > If I switch SvPVbyte in my XS to SvPV, there are no problems.
Found this in Digest::SHA1 and it works: #ifdef SvPVbyte #if PERL_REVISION == 5 && PERL_VERSION < 7 /* SvPVbyte does not work in perl-5.6.1, borrowed version for 5.7.3 */ #undef SvPVbyte #define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp)) static char * my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); } #endif #else #define SvPVbyte SvPV #endif
On Thu Mar 31 19:39:06 2011, justincase wrote: Show quoted text
> Using SvPVbyte with perl 5.6.2 and ppport.h version 3.19 on Mac OS X > 10.6.7 produces the > following error: > > t/00_compile....dyld: NSLinkModule() error > dyld: Symbol not found: _DPPP_my_sv_2pvbyte > > If I switch SvPVbyte in my XS to SvPV, there are no problems.
You've most probably just forgotten to define NEED_sv_2pvbyte before including ppport.h. Have you tried running ppport.h on your source? It is usually quite good at fixing your source automatically: $ perl ppport.h test.xs Scanning test.xs ... === Analyzing test.xs === Uses SvPVbyte, which depends on SVf_UTF8, SvCUR, SvPV, SvPVX, sv_2pvbyte, sv_2pv, sv_utf8_downgrade Show quoted text
--- hint for SvPVbyte --- Does not work in perl-5.6.1, ppport.h implements a version borrowed from perl-5.7.3. File needs sv_2pvbyte, adding static request Needs to include 'ppport.h' Analysis completed Suggested changes: --- test.xs +++ test.xs.patched @@ -1 +1,3 @@ +#define NEED_sv_2pvbyte +#include "ppport.h" SvPVbyte Feel free to reopen this ticket if that doesn't fix your problem.