Subject: | Compilation error with threaded perls |
Does not compile with threaded perls:
...
x86_64-linux-gnu-gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wdeclaration-after-statement -Wcomment -O2 -g -DVERSION=\"0.000003\" -DXS_VERSION=\"0.000003\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.24/CORE" probe.c
In file included from probe.xs:3:0:
probe.xs: In function 'probe_invoke_callback':
/usr/lib/x86_64-linux-gnu/perl/5.24/CORE/perl.h:166:16: error: 'my_perl' undeclared (first use in this function)
# define aTHX my_perl
^
/usr/lib/x86_64-linux-gnu/perl/5.24/CORE/embedvar.h:38:18: note: in expansion of macro 'aTHX'
# define vTHX aTHX
^~~~
/usr/lib/x86_64-linux-gnu/perl/5.24/CORE/embedvar.h:295:23: note: in expansion of macro 'vTHX'
#define PL_stack_sp (vTHX->Istack_sp)
^~~~
/usr/lib/x86_64-linux-gnu/perl/5.24/CORE/pp.h:111:24: note: in expansion of macro 'PL_stack_sp'
#define dSP SV **sp = PL_stack_sp
^~~~~~~~~~~
probe.xs:37:5: note: in expansion of macro 'dSP'
dSP;
^~~
... (etc) ...