Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

[email protected] (Steve Hay) Tue, 23 Mar 2004 16:21:53 +0000
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
Nicholas Clark wrote:

>On Tue, Mar 23, 2004 at 12:42:41PM +0000, Steve Hay wrote:
>
>  
>
>>Sadly win32 doesn't start out with a config.h (neither parrot's one, nor 
>>perl's one (which actually resides in win32/ on Win32)).
>>    
>>
>
>So how does win32 make a config.h?
>
It's copied from win32/config_H.vc -- see .\config.h target in 
win32/Makefile.

>
>  
>
>>I can't build parrot first because it requires a perl with which to run 
>>parrot's Configure.pl (which creates parrot's config.h);
>>and I can't build perl first because it #includes various parrot header 
>>files and complains that parrot/config.h doesn't (yet) exist!
>>    
>>
>
>Aha, I don't think I was clear - ponie's Configure.PL uses the perl that
>ran it to run parrot's Configure.PL, not the "perl" it is about to build.
>So you're actually doing just what Unix does.
>
Ah.  I thought there was a bit of a parrot-or-the-egg problem there ;)

>
>
>  
>
>>The line on which it crashed is this:
>>
>>    if (Parrot_base_vtables[base_type]->flags & VTABLE_PMC_IS_SINGLETON) {
>>
>>but the debugger is showing Parrot_base_vtables[base_type] is 
>>0x00000000, hence the access violation.
>>
>>Any ideas where to go next?  Is this a genuine flaw, or a symptom of my 
>>having used the wrong perl to run parrot's Configure.pl?
>>    
>>
>
>I think it means that the 3 PMC classes supplied with ponie didn't get
>built into parrot.
>
>If you look at ponie's Configure.pl currently it symlinks these in
>(the lines
>     system('ln','-s','../../src/pmc/perl5lv.pmc') && die "error";
>)
>
>I can see why symlinks are useful here (to make it clear that these PMCs
>injected into the parrot source tree don't belong there) but I guess that
>for Win32 that's going to need to be a copy.
>
Indeed.  I'd forgotten the rest of what ponie's Configure.pl was doing.

So now I've copied the 3 .pmc's files into parrot/classes and tried 
building parrot again.  It complains that it can't find the perl header 
files -- perl5av.c #includes "EXTERN.h", "config.h" and "perl.h", but 
parrot presumably isn't being compiled with appropriate -I flags to find 
them.

I changed them all to "../../perl/<filename.h>".  Is that right, or 
should I have directed it towards the headers of the installed perl 
(i.e. the one that I ran parrot's Configure.pl with)?  It complained 
again, of course, because I haven't got a perl/config.h...

So then I copied perl/win32/config_H.vc to perl/config.h, but now it 
whines about missing arpa/inet.h which perl.h includes.  Grr.  It really 
isn't going to work unless an -I flag gets set properly somewhere when 
building parrot.

I see that parrot/classes has its own Makefile, so I reset the #include 
lines that I'd changed and instead appended " -I..\..\perl 
-I..\..\perl\win32 -I..\..\perl\win32\include" to the CFLAGS in it.

Now I get the mess at the foot of this mail.  I get much the same result 
if I use the "installed perl"s header files instead (by appending " 
-IC:/perl/lib/CORE" to the CFLAGS in parrot/classes' Makefile).

I'm at a loss what to do to fix this.  Looks like I won't be getting a 
ponie just yet :(

- Steve

=====

        C:\perl\bin\perl.exe pmc2c2.pl --dump *.pmc
'classes\perl5av.c'
perl5av.c
c:\progra~1\micros~2\vc98\include\winsock.h(800) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(800) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(800) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(800) : error C2059: syntax 
error : ')'
c:\progra~1\micros~2\vc98\include\winsock.h(804) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(804) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(804) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(804) : error C2059: syntax 
error : ')'
c:\progra~1\micros~2\vc98\include\winsock.h(808) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(808) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(808) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(808) : error C2059: syntax 
error : ')'
c:\progra~1\micros~2\vc98\include\winsock.h(812) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(812) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(812) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(812) : error C2059: syntax 
error : ')'
c:\progra~1\micros~2\vc98\include\winsock.h(816) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(816) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(816) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(816) : error C2059: syntax 
error : ')'
c:\progra~1\micros~2\vc98\include\winsock.h(820) : error C2143: syntax 
error : missing ')' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(820) : error C2143: syntax 
error : missing '{' before '.'
c:\progra~1\micros~2\vc98\include\winsock.h(820) : error C2059: syntax 
error : '.'
c:\progra~1\micros~2\vc98\include\winsock.h(820) : error C2059: syntax 
error : ')'
c:\temp\ponie-2\perl\win32\win32thread.h(17) : warning C4005: 
'MUTEX_INIT' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(32) : see 
previous definition of 'MUTEX_INIT'
c:\temp\ponie-2\perl\win32\win32thread.h(20) : warning C4005: 
'MUTEX_DESTROY' :macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(33) : see 
previous definition of 'MUTEX_DESTROY'
c:\temp\ponie-2\perl\win32\win32thread.h(61) : warning C4005: 
'COND_INIT' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(35) : see 
previous definition of 'COND_INIT'
c:\temp\ponie-2\perl\win32\win32thread.h(68) : warning C4005: 
'COND_SIGNAL' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(29) : see 
previous definition of 'COND_SIGNAL'
c:\temp\ponie-2\perl\win32\win32thread.h(75) : warning C4005: 
'COND_BROADCAST' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(30) : see 
previous definition of 'COND_BROADCAST'
c:\temp\ponie-2\perl\win32\win32thread.h(89) : warning C4005: 
'COND_WAIT' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(27) : see 
previous definition of 'COND_WAIT'
c:\temp\ponie-2\perl\win32\win32thread.h(96) : warning C4005: 
'COND_DESTROY' : macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(36) : see 
previous definition of 'COND_DESTROY'
c:\temp\ponie-2\perl\win32\win32thread.h(104) : warning C4005: 'DETACH' 
: macroredefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(42) : see 
previous definition of 'DETACH'
c:\temp\ponie-2\perl\win32\win32thread.h(191) : warning C4005: 'JOIN' : 
macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(41) : see 
previous definition of 'JOIN'
c:\temp\ponie-2\perl\win32\win32thread.h(194) : warning C4005: 'YIELD' : 
macro redefinition
        c:\temp\ponie-2\parrot\include\parrot\thread.h(64) : see 
previous definition of 'YIELD'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\perl\bin\perl.exe' : return code '0x2'
Stop.

=====

If it helps at all, the relevant lines (797-820) of winsock.h are:

=====
HANDLE PASCAL FAR WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
                                        const char FAR * name,
                                        const char FAR * proto,
                                        char FAR * buf, int buflen);

HANDLE PASCAL FAR WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port,
                                        const char FAR * proto, char FAR 
* buf,
                                        int buflen);

HANDLE PASCAL FAR WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
                                         const char FAR * name, char FAR 
* buf,
                                         int buflen);

HANDLE PASCAL FAR WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
                                           int number, char FAR * buf,
                                           int buflen);

HANDLE PASCAL FAR WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
                                        const char FAR * name, char FAR 
* buf,
                                        int buflen);

HANDLE PASCAL FAR WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
                                        const char FAR * addr, int len, 
int type,
                                        char FAR * buf, int buflen);
=====




------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.