develooper Front page | perl.perl5.porters | Postings from February 2015

Re: OP_SIGNATURE

Thread Previous | Thread Next
From:
Steve Hay
Date:
February 23, 2015 09:44
Subject:
Re: OP_SIGNATURE
Message ID:
CADED=K7t57=2S3jVA95q63037aCqUL1KCsi5L99VDXw2PkMQjA@mail.gmail.com
On 23 February 2015 at 09:27, Steve Hay <steve.m.hay@googlemail.com> wrote:
> On 23 February 2015 at 09:04, Dave Mitchell <davem@iabyn.com> wrote:
>> On Sun, Feb 22, 2015 at 10:00:23PM +0000, Dave Mitchell wrote:
>>> On Sun, Feb 22, 2015 at 08:49:54PM +0000, Dave Mitchell wrote:
>>> > The branch smoke-me/davem/op_signature, currently being smoked
>>>
>>> and now a hopefully more win32-compilable revision pushed as
>>> smoke-me/davem/op_signature2
>>
>> Hmmm, still failing to build on non-useithreads win32 builds:
>>
>> perldll.def : error LNK2001: unresolved external symbol Perl_op_relocate_sv
>> ..\perl521.lib : fatal error LNK1120: 1 unresolved externals
>>
>> Can anyone advise me on this? I made a threads-only static function
>> into a non-static function because I needed to access it from another
>> source file.
>>
>> In embed.fnc I have:
>>
>>     #if defined(USE_ITHREADS)
>>     pXo |void   |op_relocate_sv |NN SV** svp|NN PADOFFSET* targp
>>     #endif
>>
>> In op.c I have
>>
>>     #ifdef USE_ITHREADS
>>     void
>>     Perl_op_relocate_sv(pTHX_ SV** svp, PADOFFSET* targp)
>>     {
>>         ....
>>     }
>>     #endif
>>
>> then in various places in op.c and toke.c I have lines like:
>>
>>     #ifdef USE_ITHREADS
>>         Perl_op_relocate_sv(aTHX_ &cSVOPo->op_sv, &o->op_targ);
>>     #endif
>>
>> So everything is protected by ifdefs. The only generated file it appears
>> in, proto.h, is also protected.
>>
>
> The symbol appears in win32\perldll.def, but isn't defined in the object files.
>
> I haven't tested, but I think you need to add it to the list
>
> unless ($define{'USE_ITHREADS'}) {
> ...
>
> in makedef.pl to stop it appearing in win32\perldll.def.

Yes, this diff fixes both threaded and non-threaded:

diff --git a/makedef.pl b/makedef.pl
index b31d8a0..dc528fa 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -384,6 +384,7 @@ unless ($define{'USE_ITHREADS'}) {
                    Perl_gp_dup
                    Perl_he_dup
                    Perl_mg_dup
+                   Perl_op_relocate_sv
                    Perl_re_dup_guts
                    Perl_sv_dup
                    Perl_sv_dup_inc

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About