Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-03 Thread Ron Blaschke
Sriram Krishnan wrote:
> Thanks for the reply. Readme.Win32 should have a notice about building in
> anything other than Visual Studio 6. Since 'msdev' is hardcoded inside the
> ICU build stuff, it *won't build on anything other than Visual Studio 6*.
> For anyone interested, I've written step-by-step instructions on how to
> build it at
> http://dotnetjunkies.com/WebLog/sriram/archive/2005/01/28/49040.aspx

Right you are.  I'll update README.win32 accordingly.

>>Would you care to retrace your steps carefully from a clean CVS HEAD,
>>and provide a detailed description (eg, console in and output)?

[snip]

I've found the problem, hopefully someone can help me resolve the
details.

First what happens is this: In my configuration, I've got
#define DEFAULT_ICU_DATA_DIR ""
runtime_prefix = "/usr/local/parrot-0.1.1-devel"

string_init tries to grab the prefix, which checks if
/usr/local/parrot-0.1.1-devel is present; on my box it's not, which
causes the offendig section to be skipped.  All is well.

But if parrot it is installed (/usr/local/parrot-0.1.1-devel, via
'nmake install') it blows up.

What I don't understand is why parrot needs the ICU data directory.
Can someone please explain?

Ron





Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-03 Thread Ron Blaschke
Jonathan Worthington wrote:
> "Ron Blaschke" <[EMAIL PROTECTED]> wrote:
>> Leopold Toetsch wrote:
>>> Sriram Krishnan <[EMAIL PROTECTED]> wrote:

>> Failed TestStat Wstat Total Fail  Failed  List of Failed
>> ---
>> t\dynclass\pybuiltin.t5  1280 65  83.33%  1-2 4-6
>> t\dynclass\pyclass.t  6  1536 66 100.00%  1-6
>> t\dynclass\pycomplex.t1   256 11 100.00%  1
>> t\dynclass\pyfunc.t   4  1024 44 100.00%  1-4
>> t\dynclass\pyint.t   25  640025   25 100.00%  1-25
>> t\pmc\nci.t   5  1280565   8.93%  3 8 46 51-52
>> 7 tests and 64 subtests skipped.
>> Most, if not all, tests fail b/c of "Illegal PMC enum (0) in new".

> the Parrot interpreter so things work as they should.  I got the first bit
> done then the RSI monster came and ate my hands, so I've had to stop working
> on fun stuff for a while.  :-(   So the second remains undone.

I am sorry to hear about that.  Get well soon!

> I think you need to build a .def file for the main Parrot executable that
> has all the names of functions that can be used from dynclasses in it, then
> give it to the linker when you link parrot.exe.  Then, linking the 
> dynclasses with the correct options, whatever they are, should give the
> desired effect.  No promises it will work - somebody may know better - but
> it was what I was going to try next.

Thanks a lot, I'll start with that.

Ron





Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-02 Thread Jonathan Worthington
"Ron Blaschke" <[EMAIL PROTECTED]> wrote:
Leopold Toetsch wrote:
Sriram Krishnan <[EMAIL PROTECTED]> wrote:

I'm trying to build Parrot (from CVS) on Win XP Sp2 with VS.-NET 2003.
Please folks with Windows installed: have a look at these issues.
I'm running Windows XP, VS.NET 2003 and (precompiled) ICU 3.0, and can
confirm the offending "nci_dlvar_vv" and the failed tests.
Failed TestStat Wstat Total Fail  Failed  List of Failed
---
t\dynclass\pybuiltin.t5  1280 65  83.33%  1-2 4-6
t\dynclass\pyclass.t  6  1536 66 100.00%  1-6
t\dynclass\pycomplex.t1   256 11 100.00%  1
t\dynclass\pyfunc.t   4  1024 44 100.00%  1-4
t\dynclass\pyint.t   25  640025   25 100.00%  1-25
t\pmc\nci.t   5  1280565   8.93%  3 8 46 51-52
7 tests and 64 subtests skipped.
Most, if not all, tests fail b/c of "Illegal PMC enum (0) in new".
Pretty much all of the dynclasses tests fail with that error, yes.  I was 
working on this a while back.  The first step of the work was to just get 
dynclasses to build on Win32.  The second is getting them to call back into 
the Parrot interpreter so things work as they should.  I got the first bit 
done then the RSI monster came and ate my hands, so I've had to stop working 
on fun stuff for a while.  :-(   So the second remains undone.

I think you need to build a .def file for the main Parrot executable that 
has all the names of functions that can be used from dynclasses in it, then 
give it to the linker when you link parrot.exe.  Then, linking the 
dynclasses with the correct options, whatever they are, should give the 
desired effect.  No promises it will work - somebody may know better - but 
it was what I was going to try next.

Jonathan 



RE: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-02 Thread Sriram Krishnan

 
Thanks for the reply. Readme.Win32 should have a notice about building in
anything other than Visual Studio 6. Since 'msdev' is hardcoded inside the
ICU build stuff, it *won't build on anything other than Visual Studio 6*.
For anyone interested, I've written step-by-step instructions on how to
build it at
http://dotnetjunkies.com/WebLog/sriram/archive/2005/01/28/49040.aspx .

>Would you care to retrace your steps carefully from a clean CVS HEAD, 
>and provide a detailed description (eg, console in and output)?

Doing so.I have Windows XP SP2 with Visual Studio 2003. My ICU binaries are
at D:/lib/icu/bin and /lib respectively. Parrot is at D:/parrot/parrot. For
anyone building ICU from source on Win32, make sure you do a release build
as the filenames are different for the debug build.

Attempt #1
---

First, Readme.Win32 asks us to use " perl Configure.pl
--icushared="C:\usr\lib\icu\lib\icudata.lib C:\usr\lib\icu\lib\icuuc.lib"
--icuheaders="C:\usr\lib\icu\include""

So I run

  D:\parrot\parrot>perl Configure.pl --icushared="D:\lib\icu\lib\icudata.lib
D:\lib\icu\lib\icuuc.lib" --icuheaders="D:\lib\icu\include"

After configuring, I run nmake.

D:\parrot\parrot\nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C)
Microsoft Corporation.  All rights reserved.

Compiling with:
xx.c
cl -nologo -GF -W3 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT
-DNO_HASH_SE D -Zi -I./include -ID:\lib\icu\include -DHAS_JIT -DI386 -I. -Fo
xx.obj -c xx.c

A bunch of warnings later (about unreferenced local variables,etc), I get
this

.\parrot -o runtime\parrot\include\parrotlib.pbc
runtime\parrot\library\ parrotlib.imc

This throws an access violation and lands me in the debugger. The problem
here  is in string.c

   data_dir = Parrot_getenv("PARROT_ICU_DATA_DIR", &free_data_dir);
if (data_dir == NULL) {
const char *prefix;
char *p, *build_path;
build_path = data_dir = const_cast(DEFAULT_ICU_DATA_DIR);
/*
 * if the installed --prefix directory exists then use it
 */
prefix = Parrot_get_runtime_prefix(interpreter, NULL);
if (prefix) {
p = strstr(build_path, "blib");/* .../blib/lib/...
*/
assert(p);
--p;/* slash or backslash */
data_dir = mem_sys_allocate(strlen(prefix) + strlen(p) + 1);
strcpy(data_dir, prefix);
strcat(data_dir, p);
free_data_dir = 1;
}
}
The problem is that data_dir is a blank string - PARROT_ICU_DATA_DIR seems
to have a null string which causes it to finally blow up in the strlen(p)
call. What is interesting is that the assert doesn't get called at all - so
there's something wrong with the compiler switches as well.

Attempt #2
--

Now, the next attempt I made was by passing --icudatadir also (as
D:/lib/icu/source/data/out). This time, PARROT_ICU_DATA_DIR gets assigned
properly but the code blows up in the same section. The reason this time is
that there is no "blib" anywhere in the path of the datadir - which causes
the strstr to return 0x0 which becomes 0xF after p--. I'm not really
sure why the data directory must be under "blib" though - and if so, what is
the point of a command line paramter to specify where it should be?

Attempt #3
---

This time, I copied the contents of my data directory into the blib folder
and configured it like this

D:/parrot/parrot>perl Configure.pl --icushared="D:\lib\icu\lib\icudata.lib
D:\lib\icu\lib\icuuc.lib" --icuheaders="D:\lib\icu\include"
--icudatadir="D:\parrot\parrot\blib\lib" 

This time, the build succeeds (as "blib" is present in the datadir path).
However, the linking during the 'nmake test' fails with the same error you
saw.

Attempt #4
---

I removed nci_dlvar_vv  from libnci_test.def and built again.This lets me
actually run the tests. My output for the tests are identical to yours (with
the nci tests failing).

Thanks,
Sriram






Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-02 Thread Ron Blaschke
Sriram Krishnan wrote:
> Post #1
> Post #2
> I managed to get it to build finally. I built ICU 2.8 and co-py-pasted
> the data output to the blib folder.I don't think this is the- way to do
> it - but hey..it works :) 
> Post #3
[snip]

I have set up the things as described in README.win32 (actually, I am
the one to blame for the suggestions) and things work fine for me.

Would you care to retrace your steps carefully from a clean CVS HEAD,
and provide a detailed description (eg, console in and output)?

I'll look into this issue.

Ron





Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-02 Thread Ron Blaschke
Leopold Toetsch wrote:
> Ron Blaschke <[EMAIL PROTECTED]> wrote:

>> I am not sure what things are known (expected?) to broken,
> The normal CVS state is that "make test" succeeds on linux and OS X.
> Intermittent expected failures are announced here.

Great, that will do for me.


>> ... or who else
>> is already working on which problem
> Just drop a note on the list for coordination.

I'll do.

Thanks,
Ron




Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-02 Thread Leopold Toetsch
Ron Blaschke <[EMAIL PROTECTED]> wrote:

> On a personal note, I (still) really like to help in win32, though
> it's quite hard for me to get a grip on this collaboration thingy.

Great, thanks.

> I am not sure what things are known (expected?) to broken,

The normal CVS state is that "make test" succeeds on linux and OS X.
Intermittent expected failures are announced here.

> ... or who else
> is already working on which problem

Just drop a note on the list for coordination.

> Ron

leo


Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-01 Thread Ron Blaschke
Leopold Toetsch wrote:
> Sriram Krishnan <[EMAIL PROTECTED]> wrote:

>> I'm trying to build Parrot (from CVS) on Win XP Sp2 with VS.-NET 2003.
> Please folks with Windows installed: have a look at these issues.

I'm running Windows XP, VS.NET 2003 and (precompiled) ICU 3.0, and can
confirm the offending "nci_dlvar_vv" and the failed tests.

Failed TestStat Wstat Total Fail  Failed  List of Failed
---
t\dynclass\pybuiltin.t5  1280 65  83.33%  1-2 4-6
t\dynclass\pyclass.t  6  1536 66 100.00%  1-6
t\dynclass\pycomplex.t1   256 11 100.00%  1
t\dynclass\pyfunc.t   4  1024 44 100.00%  1-4
t\dynclass\pyint.t   25  640025   25 100.00%  1-25
t\pmc\nci.t   5  1280565   8.93%  3 8 46 51-52
7 tests and 64 subtests skipped.

Most, if not all, tests fail b/c of "Illegal PMC enum (0) in new".

Should I file bug reports for every different looking problem, and
start looking for what's going wrong?


On a personal note, I (still) really like to help in win32, though
it's quite hard for me to get a grip on this collaboration thingy.
I am not sure what things are known (expected?) to broken, or who else
is already working on which problem (avoid racing for patches, or
patching something someone is already working on).  I guess I am
asking for a gentle push in the right direction here, to bring
me up to speed.

Ron




Re: [Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-01 Thread Leopold Toetsch
Sriram Krishnan <[EMAIL PROTECTED]> wrote:

> I'm trying to build Parrot (from CVS) on Win XP Sp2 with VS.-NET 2003.

Please folks with Windows installed: have a look at these issues.

leo


[Repost] Building with VS.NET 2003 and ICU 2.8 on Win32

2005-02-01 Thread Sriram Krishnan


If you've already seen this through the Google Groups interface, sorry! I'm
kind of confused about the syncing between the Google interface and this
list - and it seems that my posts never made it here.  The original is here
(http://groups-beta.google.com/group/perl.perl6.internals/browse_thread/thre
ad/dd3cb5e94f1eb835/74b248bf61c2f1f6?_done=%2Fgroup%2Fperl.perl6.internals%3
F&_doneTitle=Back+to+topics&_doneTitle=Back&&d#74b248bf61c2f1f6).

 I'm reproducing all 3 posts below
 
Post #1
---
 
 
I'm a Parrot newbie so forgive me if this has already been a-ddressed. 
I'm trying to build Parrot (from CVS) on Win XP Sp2 with VS.-NET 2003. 


1.The current build scripts for ICU refer to 'msdev'. 'msdev-' was the
executable for Visual Studio 6 . The executable, the command-line switches
as well as the file format have changed for VS.NET -2002 and
2003.Unfortunately, my unfamiliarity with Perl means that I -cannot submit a
patch :( 


2. After downloading the latest ICU source from IBM's site, -I built that
from source (they have updated their src distribution t-o support building
using VS 2003). 


Now, the Readme files says that you have to set icushared an-d icuheader -
but even after I set both to point to my ICU bui-ld, the build broke the
first time it tried to run parrot.exe (durin-g the nmake itself). 


The offending piece of code is this (in string.c) 


data_dir = Parrot_getenv("PARROT_ICU_DATA_DIR", &free_data_d-ir); 
if (data_dir == NULL) { 
const char *prefix; 
char *p, *build_path; 
build_path = data_dir = const_cast(DEFAULT_ICU_D-ATA_DIR); 
/* 
 * if the installed --prefix directory exists th-en use it 
 */ 
prefix = Parrot_get_runtime_prefix(interpreter, -NULL); 
if (prefix) { 
p = strstr(build_path, "blib"); 
   assert(p); 
--p;/* slash or backslash */ 
data_dir = mem_sys_allocate(strlen(prefix) +- strlen(p) 
+ 1);
strcpy(data_dir, prefix); 
strcat(data_dir, p); 
free_data_dir = 1; 
} 


The first time I tried building it, the strstr call returned- a bad pointer.
Some investigation showed that the ICU data directo-ry was an empty string.
So this time, I tried building again, by passi-ng icudatadir to
Configure.pl. 


The assert call wasn't being executed at all - must be somet-hing with the
compiler options. 


It again crashed at the same spot - this time because the bu-ild_path 
variable contained the ICU data dir -but there is no "blib" -anywhere 
in it, making the strstr call fail. 


Am I missing something pretty basic here? 


Post #2


I managed to get it to build finally. I built ICU 2.8 and co-py-pasted 
the data output to the blib folder.I don't think this is the- way to do 
it - but hey..it works :) 

Post #3
--

Yet another Win32 + VS 2003 update. 


My 'nmake test' was failing with a liner error about nci_dlv-ar_vv. 
After removing that from libnci_test.def, I was able to atle-ast run the 
tests. Dynclass and nci tests failed - and at the end, got a- weird 
error about perl.exe. Here's the output 


Failed TestStat Wstat Total Fail  Failed  List o-f Failed 


t\dynclass\pybuiltin.t5  1280 65  83.33%  1-2 4--6 
t\dynclass\pyclass.t  6  1536 66 100.00%  1-6 
t\dynclass\pycomplex.t1   256 11 100.00%  1 
t\dynclass\pyfunc.t   4  1024 44 100.00%  1-4 
t\dynclass\pyint.t   25  640025   25 100.00%  1-25 
t\pmc\nci.t  55 1408056   55  98.21%  1-55 
7 tests and 64 subtests skipped. 
Failed 6/133 test scripts, 95.49% okay. 96/2166 subtests fai-led, 95.57% 
oka 
NMAKE : fatal error U1077: 'D:\Perl\bin\perl.exe' : return c-ode '0xff' 
Stop. 



Thanks,
Sriram