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

Re: MSWin32 seems lost again (18785)

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
February 28, 2003 05:35
Subject:
Re: MSWin32 seems lost again (18785)
Message ID:
200302281333.h1SDX3B16565@smtp3.ActiveState.com
On Fri, 28 Feb 2003 10:44:54 GMT, Nicholas Clark wrote:
>On Fri, Feb 28, 2003 at 03:08:13AM +0100, Abe Timmerman wrote:
>
>> Thanks, althoug it didn't apply, we're now back to an old failing:
>> 
>> g++ -mdll -o ..\perl59.dll -Wl,--base-file -Wl,perl.base  -g 
>> -L"c:\perl\lib\CORE
>> " -L"C:\MinGW\lib" \
>>             C:\DOCUME~1\abeltje\LOCALS~1\Temp\mk00022a
>> dlltool --output-lib ..\libperl59.a \
>>                 --dllname perl59.dll \
>>                 --def perldll.def \
>>                 --base-file perl.base \
>>                 --output-exp perl.exp
>> g++ -mdll -o ..\perl59.dll  -g -L"c:\perl\lib\CORE" -L"C:\MinGW\lib" \
>>             C:\DOCUME~1\abeltje\LOCALS~1\Temp\mk000304
>> perl.exp(.edata+0xff4):fake: undefined reference to `Perl_sv_setsv_cow'
>> dmake.exe:  Error code 1, while making '..\perl59.dll'
>
>That's in embed.fnc like this:
>
>#ifdef PERL_COPY_ON_WRITE
>Ap	|SV*	|sv_setsv_cow	|SV* dsv|SV* ssv
>#endif
>
>Why isn't it working?

That's not sufficient on platforms that need to be told which
symbols actually need to be exported (aix/os2/win*/macos/etc).
makedef.pl assumes by default that all symbols mentioned in
embed.fnc need exporting, so you need to tell it otherwise
since the above symbol is only conditionally available.  It
would be nice to make makedef.pl smarter (i.e. automatically
parse the #ifdefs in embed.fnc) but something like the
attached patch should take you past the above error.  The
patch is completely untested (sorry, ENOTUIT).


Sarathy
gsar@ActiveState.com
-----------------------------------8<-----------------------------------
Index: perl/makedef.pl
--- perl/makedef.pl.~1~	Fri Feb 28 05:27:52 2003
+++ perl/makedef.pl	Fri Feb 28 05:27:52 2003
@@ -560,6 +560,12 @@
 		    )];
 }
 
+unless ($define{'PERL_COPY_ON_WRITE'}) {
+    skip_symbols [qw(
+		    Perl_sv_setsv_cow
+		    )];
+}
+
 unless ($define{'PERL_FLEXIBLE_EXCEPTIONS'}) {
     skip_symbols [qw(
 		    PL_protect
End of Patch.

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