develooper Front page | perl.perl5.porters | Postings from August 2009

Re: Smoke [5.11.0] blead-1964-g2adbc9b FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
August 28, 2009 10:15
Subject:
Re: Smoke [5.11.0] blead-1964-g2adbc9b FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)
Message ID:
20090828171451.GW60303@plum.flirble.org
On Fri, Aug 28, 2009 at 05:26:07PM +0100, Steve Hay wrote:
> Nicholas Clark wrote on 2009-08-28:
> > On Fri, Aug 28, 2009 at 01:38:42PM +0100, Steve Hay wrote:
> >> Nicholas Clark wrote on 2009-08-28:
> > 
> >>> Does anyone have convenient access to Win32 to run this and display
> >>> the output?
> >>> 
> >>> Right now you might need to run it as (the Win32 transcription) of
> cd
> >>> ext/DynaLoader && ../../perl -I../../t -MTestInit=U2T,NC -T
> >>> t/DynaLoader.t
> >>> 
> >>> (or cd t && ./perl harness ../ext/DynaLoader/DynaLoader.t )
> >>> 
> >>  C:\gitclients\perl\t>..\perl .\harness -v
> >> ..\ext\DynaLoader\t\DynaLoader.t Not enough arguments for
> >> DynaLoader::dl_load_file at t/DynaLoader.t line 90, near "() " BEGIN
> >> not safe after errors--compilation aborted at t/DynaLoader.t line 94.
> >> ../ext/DynaLoader/t/DynaLoader.t .. No subtests run
> > 
> > Thanks. Why on earth is it unhappy? On Linux I see this
> > 
> > ./perl -Ilib -MDynaLoader -lwe 'eval {DynaLoader::dl_load_file()};
> > print "The error was $@"'
> > The error was Usage: DynaLoader::dl_load_file(filename, flags=0) at -e
> > line 1.
> > 
> > What is causing DynaLoader::dl_load_file() to have a prototype, all of
> a
> > sudden? The line "MODULE = DynaLoader	PACKAGE = DynaLoader" in
> > win32/dl_win32.xs dates from 1997.
> 
> FWIW, the output of the equivalent one-liner on my system is:
> 
> .\perl -Ilib -MDynaLoader -lwe "eval {DynaLoader::dl_load_file()}; print
> 'The error was $@'"
> Not enough arguments for DynaLoader::dl_load_file at -e line 1, near
> "()"
> Execution of -e aborted due to compilation errors.
> 
> and that hasn't changed--all the perls I have lying around (5.8s, 5.10s
> and blead) do that.
> 
> So actually, it is more of a mystery why the test ever *didn't* do that
> in the first place, than why it's suddently doing it now.

True. But it remains a mystery to me as to why...

Ah, *nix:

# --- MakeMaker tool_xsubpp section:

XSUBPPDIR = ../../lib/ExtUtils
XSUBPP = $(XSUBPPDIR)$(DFSEP)xsubpp
XSUBPPRUN = $(PERLRUN) $(XSUBPP)
XSPROTOARG = -noprototypes
XSUBPPDEPS = ../../lib/ExtUtils/typemap $(XSUBPP)
XSUBPPARGS = -typemap ../../lib/ExtUtils/typemap
XSUBPP_EXTRA_ARGS = 


which leads to this:

        newXS("DynaLoader::dl_load_file", XS_DynaLoader_dl_load_file, file);


whereas the Win32 Makefiles have:


XSUBPP		= ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
		-C++ -prototypes

$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
	if not exist $(AUTODIR) mkdir $(AUTODIR)
	cd $(EXTDIR)\$(*B)
	..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
	..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
	cd ..\..\win32
	$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
	$(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
	cd $(EXTDIR)\$(*B)
	$(XSUBPP) dl_win32.xs > $(*B).c
	cd ..\..\win32


so I infer that in Win32 your DynaLoader.c has newXSproto()


So, I think that we should standardise on one for 5.12. But which?

Also, why do the Win32 makefiles "insist" on building DynaLoader by hand,
rather than outsourcing the problem to MakeMaker, like every other XS
extension?

That's not one I can simplify. (Or even work out if it is simplifyable.
Is it because miniperl and perl might have different architectures?)

Nicholas Clark

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