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.