Hi!
I found two bugs while trying to compile 0.1.2
I solved the first one.
I had to change parrot-0.1.2\config\init\hints\mswin32.pl
this part:
elsif( $is_mingw ) {
$libs='' if $libs =~ /\.lib\s/i;
Configure::Data->set(
link => 'gcc',
libs => $libs,
slash => '/',
ar => 'ar',
o => '.o'
);
I added o => '.o'.
Otherwise, perl perl configure.pl fails becuse it says...
test.obj not found....
This forces the configure to look for .o
The second bug is:
I have windows xp, mingw 3.2.3, icu 2.8 v6 , activestate perl 5.6
my method:
set path=%path%;c:\mingw3\bin;D:\extracted\icu\icu\bin
d:
cd D:\extracted\parrot-0.1.2
perl configure.pl --cc=gcc --cxx=gcc --link=gcc --libs=""
--linkflags=-machine:x86 --ccflags="-O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT" --verbose
--icushared="D:\extracted\icu2\icu\lib\icudata.lib
D:\extracted\icu2\icu\lib\icuuc.lib"
--icuheaders="D:\extracted\icu2\icu\include"
then:
mingw32-make
then
I am stuck with the error.
gcc -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -g -Wall
-Wstrict-prototypes
-Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual
-Wcast-align
-Wwrite-strings -Waggregate-return -Winline -W -Wno-unused
-Wsign-compare -Wfor
mat-nonliteral -Wformat-security -Wpacked -Wdisabled-optimization
-mno-accumulat
e-outgoing-args -Wno-shadow -falign-functions=16 -I./include
-ID:\extracted\icu2
\icu\include -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c
ops/core_ops_switch.c
ops/experimental.ops: In function `switch_core':
ops/experimental.ops:263: unable to find a register to spill in class
`DIREG'
ops/experimental.ops:263: this is the insn:
(insn 8102 41009 8103 (parallel[
(set (reg:SI 2 ecx [2389])
(unspec:SI[
(mem:BLK (reg/f:SI 3 ebx [2391]) [0 A8])
(reg:QI 1 dl [2393])
(const_int 1 [0x1])
(reg:SI 2 ecx [2392])
] 0))
(use (reg:SI 19 dirflag))
(clobber (reg/f:SI 3 ebx [2391]))
(clobber (reg:CC 17 flags))
] ) 611 {strlenqi_1} (insn_list 8098 (insn_list 8099 (insn_list
8100 (in
sn_list 8101 (nil)))))
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:SI 2 ecx [2392])
(expr_list:REG_DEAD (reg:QI 1 dl [2393])
(expr_list:REG_DEAD (reg/f:SI 3 ebx [2391])
(expr_list:REG_UNUSED (reg/f:SI 3 ebx [2391])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))))))
ops/experimental.ops:263: confused by earlier errors, bailing out
mingw32-make: *** [ops/core_ops_switch.o] Error 1
Regards
Márton
Papp
> I found two bugs while trying to compile 0.1.2
Parrot is developing rapidly, please use always the CVS version for
submitting bugs and patches.
But as this one ...
> I added o => '.o'.
... is still the same - no problem here.
Strange anyway. Folks reported that MinGW builds Parrot 0.1.2 ok.
What setting for 'o' is correct?
> The second bug is:
> I have windows xp, mingw 3.2.3, icu 2.8 v6 , activestate perl 5.6
> my method:
> set path=%path%;c:\mingw3\bin;D:\extracted\icu\icu\bin
> d:
> cd D:\extracted\parrot-0.1.2
> perl configure.pl --cc=gcc --cxx=gcc --link=gcc --libs=""
> --linkflags=-machine:x86 --ccflags="-O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
^^^
This might have caused the problem. Can you try to build an unoptimized
version please.
> ops/experimental.ops: In function `switch_core':
> ops/experimental.ops:263: unable to find a register to spill in class
> `DIREG'
But in the long run, we have to get rid of a lot of opcodes. This is
just another example where compilers don't grok core_ops*.c any more.
leo
>Anteusz @ Freemail . Hu <parrotbug...@parrotcode.org> wrote:
>
>
>
>>I found two bugs while trying to compile 0.1.2
>>
>>
>
>Parrot is developing rapidly, please use always the CVS version for
>submitting bugs and patches.
>
>
>But as this one ...
>
>
>
>>I added o => '.o'.
>>
>>
>
>... is still the same - no problem here.
>
>
>Strange anyway. Folks reported that MinGW builds Parrot 0.1.2 ok.
>
>
What can I say? Not for me. Not for me. Maybe they did not report their
extra efforts to make it work?
Ok, it can be viewed as fun or leaning....
just typing perl configure.pl does not work as it uses the settings of
active perl installation which uses the Microsoft compiler.
How could it ever work for them out of box?
By the way, it is great that you replied so quickly.
Ok,.. so I ended up with:
set path=%path%;c:\mingw3\bin;D:\extracted\icu2\icu\bin
d:
cd D:\extracted\parrot-0.1.2
perl configure.pl --cc=gcc --cxx=gcc --link=gcc --libs="-lmoldname
-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32
-lole32 -loleaut32 -lnetapi32 -luuid -lwsock32 -lmpr -lwinmm -lversion
-lodbc32 -lodbccp32 -lmsvcrt" --linkflags=-machine:x86 --ccflags="-MD
-DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT" --verbose
--icushared="D:\extracted\icu2\icu\lib\icudata.lib
D:\extracted\icu2\icu\lib\icuuc.lib"
--icuheaders="D:\extracted\icu2\icu\include"
As you may see I had to add libraries as well as becausethe whole thing
would have not finished without them. .
Anyway, now I have a parrot.exe.
Ok, parrot.exe was created but the make stopped elsewhere.
D:\extracted\parrot-0.1.2>mingw32-make
Compiling with:
xx.c
gcc -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -g -Wall
-Wstrict-prototypes -Wm
issing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual
-Wcast-align -Ww
rite-strings -Waggregate-return -Winline -W -Wno-unused -Wsign-compare
-Wformat-
nonliteral -Wformat-security -Wpacked -Wdisabled-optimization
-mno-accumulate-ou
tgoing-args -Wno-shadow -falign-functions=16 -I./include
-ID:\extracted\icu2\icu
\include -DHAS_JIT -DI386 -DHAVE_COMPUTED_GOTO -I. -o xx.o -c xx.c
D:\m\Perl\bin\perl.exe -e "chdir shift @ARGV; system 'mingw32-make',
@ARGV; exit
$? >> 8;" docs
mingw32-make[1]: Entering directory `D:/extracted/parrot-0.1.2/docs'
D:\m\Perl\bin\perl.exe -e "-d or mkdir $_,0777 or die foreach @ARGV" ops
mingw32-make[1]: Leaving directory `D:/extracted/parrot-0.1.2/docs'
gcc -dll -L"D:\m\Perl\lib\CORE" -machine:x86 -lm
-def:src/libnci_test.def --m
achine:x86 -g \
-o runtime/parrot/dynext/libnci_test.dll src/nci_test.o -lmoldname
-lkernel3
2 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32
-loleaut32
-lnetapi32 -luuid -lwsock32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
-lmsvcr
t D:\extracted\icu2\icu\lib\icudata.lib D:\extracted\icu2\icu\lib\icuuc.lib
c:/mingw3/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmingw32.a(main.o)(.text+0
x97):main.c: undefined reference to `WinMain@16'
mingw32-make: *** [runtime/parrot/dynext/libnci_test.dll] Error 1
Ok, I cheated before runnning this. I modified the makefile as it
contained 'link' instead o gcc as a linker occasionally.
So I could not test....
Other (new) errors:
D:\extracted\parrot-0.1.2\languages\perl6>perl perl6 -k examples\bnf.p6
Undefined subroutine &P6C::Tree::concat_string called at P6C/Tree.pm
line 1199.
Well, this does not work. The rest of p6 worked for me.
I also tried languages\basic
I got:
D:\extracted\parrot-0.1.2\languages\BASIC\compiler>testrun.pl
Missing struct initializer
>What setting for 'o' is correct?
>
>
Well, '.o' is correct for o... That is what
I added o => '.o means.
>
>
>>The second bug is:
>>
>>
>
>
>
>>I have windows xp, mingw 3.2.3, icu 2.8 v6 , activestate perl 5.6
>>my method:
>>set path=%path%;c:\mingw3\bin;D:\extracted\icu\icu\bin
>>d:
>>cd D:\extracted\parrot-0.1.2
>>perl configure.pl --cc=gcc --cxx=gcc --link=gcc --libs=""
>>--linkflags=-machine:x86 --ccflags="-O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
>>
>>
> ^^^
>
>This might have caused the problem. Can you try to build an unoptimized
>version please.
>
>
Ok.. I will. Ok that part works now. Using -o1 was not my idea.
>
>
>>ops/experimental.ops: In function `switch_core':
>>ops/experimental.ops:263: unable to find a register to spill in class
>>`DIREG'
>>
>>
>
>But in the long run, we have to get rid of a lot of opcodes. This is
>just another example where compilers don't grok core_ops*.c any more.
>
>leo
>
>
>
>
>
>
Regards
Márton
>>Strange anyway. Folks reported that MinGW builds Parrot 0.1.2 ok.
> What can I say? Not for me. Not for me. Maybe they did not report their
> extra efforts to make it work?
Yeah, seems so. Can MinGW users please come up with a patch to get
things running out of the box, thanks.
> Other (new) errors:
> D:\extracted\parrot-0.1.2\languages\perl6>perl perl6 -k examples\bnf.p6
languages/* is partially outdated, sorry.
> Márton
leo