I've found the problem with "make test" not working. The problem is
the pathname not being cygpath'ed. Basically, every call to
doesFileExist needs to be cygpath'ed. Unfortunately, I have no idea
how to do that. All the calls to doesFileExist seem to be in
src/Pugs/Prim.hs lines 204,1250,1256. The one on line 204 is for
require, which is what's preventing "use Test;" from working. I don't
know where fileTestExists and fileTestIsFile are used, but they should
be modified as well.

As for pugscc, the only changes that need to be made are:
1) Use of the cygpath() function on $core and $base.
sub cygpath {
    my $in = shift;
    return $in if $^O ne 'cygwin';
    open my $path, "cygpath -m $in |"
        or die "Cannot fork to 'cygpath $in': $!\n";
    chomp( my $val = <$path> );
    return $val;
}
2) Any use of backticks needs to have all \r stripped out. This is
primarily seen on line 75, where you have "my $archlib = `pugs
-V:archlib`;" Personally, I would convert that to named pipes, but
cygpath() could also be converted to backticks with \r stripped.

I am afraid to commit because with those changes, I get to Pugs, but I
receive the following errors and I don't know enough about Pugs to get
it working. (This is with r2765, built about 2 hours ago.)

Rob

$ ./script/pugscc -e 'say 123'                                        
                                                                      
 *** Using the 'Pugs' backend.                                        
                                                                      
  ghc -v0 -o a.out --make -main-is MainCC.mainCC
-LC:/cygwin/home/Customer/pugs
-LC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs
-LC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/pcre
-LC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck
-IC:/cygwin/home/Customer/pugs
-IC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs
-IC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/pcre
-IC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck
-iC:/cygwin/home/Customer/pugs
-iC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs
-iC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/pcre
-iC:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck -static
-Wall -fno-warn-unused-imports -fno-warn-unused-binds
-fno-warn-missing-signatures -fno-warn-name-shadowing
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/pcre/pcre.o
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/UnicodeC.o
C:/cygwin/home/Customer/pugs/MainCC.hs

C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x1326):ghc3916.hc:
undefined reference to `pge_gen'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x145d):ghc3916.hc:
undefined reference to `pge_parse_new'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x159f):ghc3916.hc:
undefined reference to `pge_parse_free'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x5a06):ghc3916.hc:
undefined reference to `pge_init'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x5b0a):ghc3916.hc:
undefined reference to `pge_parse_free'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Text/PGE.o(.text+0x5ba8):ghc3916.hc:
undefined reference to `pge_parse'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Data/Yaml/Syck.o(.text+0x1965):ghc3916.hc:
undefined reference to `syck_map_read'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Data/Yaml/Syck.o(.text+0x1a44):ghc3916.hc:
undefined reference to `syck_map_read'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Data/Yaml/Syck.o(.text+0x1c51):ghc3916.hc:
undefined reference to `syck_seq_read'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/Data/Yaml/Syck.o(.text+0x1ef1):ghc3916.hc:
undefined reference to `syck_str_read'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x302):syck.c:
undefined reference to `st_init_numtable'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x319):syck.c:
undefined reference to `st_insert'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x349):syck.c:
undefined reference to `st_lookup'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x364):syck.c:
undefined reference to `syck_free_node'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x392):syck.c:
undefined reference to `st_foreach'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x39d):syck.c:
undefined reference to `st_free_table'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x3bf):syck.c:
undefined reference to `st_foreach'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x3ca):syck.c:
undefined reference to `st_free_table'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x3f6):syck.c:
undefined reference to `st_free_table'
C:/cygwin/lib/perl6/cygwin-thread-multi-64int/CORE/pugs/syck/syck.o(.text+0x862):syck.c:
undefined reference to `syckparse'
Died at ./script/pugscc line 111.

Reply via email to