This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

perl with cygwin 1.5, need help


Hallo ,

I need some help to track this down.

Some details to illustrate the problem with perl when building with
cygwin-1.5.1.  I can compile everything up to miniperl, then the basic
test fails and also using any script which uses 'my' fails., so it is
impossible to build the perl library and modules.  I just realized
that perl doesn't treat my $var in the right way.  Writing:
my $i = $^O; does the right thing, but when I use the $i later it is
not the same $i which was used before (but it should be exactly this
$i as long as I'm in the same scope).



In the first example, 'my' is used, the value $^O is assigned correct
(see the full -Dtls output below):

"(test.pl:2)     sassign
    =>  PVMG("cygwin"\0)"

Later for the print main::i is referenced which is empty:
"(test.pl:3)     gvsv(main::i)
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  UNDEF  "


First case:

$ cat test.pl

my $i = $^O;
print "my \$i should be 'cygwin', but it is: $i\n";

$ ./miniperl.exe -Dtls test.pl
(test.pl:0)     ENTER scope 2 at perly.c:1428
(test.pl:3)     ENTER scope 3 at toke.c:1028
(test.pl:3)     LEAVE scope 3 at toke.c:1128
(test.pl:3)     ENTER scope 3 at opmini.c:6308
(test.pl:3)     LEAVE scope 3 at opmini.c:6659
(test.pl:3)     LEAVE scope 2 at perly.c:2526
(test.pl:0)     LEAVE scope 1 at perl.c:1697
(test.pl:0)     ENTER scope 1 at perl.c:1705
(test.pl:0)     Setting up jumplevel 22fdb0, was a040694

EXECUTING...

    =>  
(test.pl:0)     enter
(test.pl:0)     ENTER scope 2 at pp_hot.c:1648
Entering block 0, type BLOCK
    =>  
(test.pl:0)     nextstate
    =>  
(test.pl:2)     gvsv(main::)
    =>  PVMG()  
(test.pl:2)     padsv($i)
    =>  PVMG()  UNDEF  
(test.pl:2)     sassign
    =>  PVMG("cygwin"\0)  
(test.pl:2)     nextstate
    =>  
(test.pl:3)     pushmark
    =>  *  
(test.pl:3)     const(PV("my $i should be 'cygwin', but it is: "\0))
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  
(test.pl:3)     gvsv(main::i)
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  UNDEF  
(test.pl:3)     concat
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  
(test.pl:3)     const(PV("\12"\0))
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  PV("\12"\0)  
(test.pl:3)     concat
    =>  *  PV("my $i should be 'cygwin', but it is: \12"\0)  
(test.pl:3)     print
my $i should be 'cygwin', but it is: 
    =>  SV_YES  
(test.pl:3)     leave
(test.pl:0)     POPBLOCK scope 2 at pp_hot.c:1760
Leaving block 0, type BLOCK
(test.pl:0)     LEAVE scope 2 at pp_hot.c:1797
(test.pl:0)     Setting up jumplevel 22fda0, was a040694
(test.pl:0)     LEAVE scope 1 at perl.c:453




The 2nd case is working, at (test.pl:3) the correct scalar is
referenced: 
"(test.pl:3)     gvsv(main::i)
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)
                                                  PVMG("cygwin"\0)  "

$ cat test.pl

$i = $^O;
print "my \$i should be 'cygwin', but it is: $i\n";


$ ./miniperl.exe -Dtls test.pl
(test.pl:0)     ENTER scope 2 at perly.c:1428
(test.pl:3)     ENTER scope 3 at toke.c:1028
(test.pl:3)     LEAVE scope 3 at toke.c:1128
(test.pl:3)     ENTER scope 3 at opmini.c:6308
(test.pl:3)     LEAVE scope 3 at opmini.c:6659
(test.pl:3)     LEAVE scope 2 at perly.c:2526
(test.pl:0)     LEAVE scope 1 at perl.c:1697
(test.pl:0)     ENTER scope 1 at perl.c:1705
(test.pl:0)     Setting up jumplevel 22fdb0, was a040694

EXECUTING...

    =>  
(test.pl:0)     enter
(test.pl:0)     ENTER scope 2 at pp_hot.c:1648
Entering block 0, type BLOCK
    =>  
(test.pl:0)     nextstate
    =>  
(test.pl:2)     gvsv(main::)
    =>  PVMG()  
(test.pl:2)     gvsv(main::i)
    =>  PVMG()  UNDEF  
(test.pl:2)     sassign
    =>  PVMG("cygwin"\0)  
(test.pl:2)     nextstate
    =>  
(test.pl:3)     pushmark
    =>  *  
(test.pl:3)     const(PV("my $i should be 'cygwin', but it is: "\0))
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  
(test.pl:3)     gvsv(main::i)
    =>  *  PV("my $i should be 'cygwin', but it is: "\0)  PVMG("cygwin"\0)  
(test.pl:3)     concat
    =>  *  PV("my $i should be 'cygwin', but it is: cygwin"\0)  
(test.pl:3)     const(PV("\12"\0))
    =>  *  PV("my $i should be 'cygwin', but it is: cygwin"\0)  PV("\12"\0)  
(test.pl:3)     concat
    =>  *  PV("my $i should be 'cygwin', but it is: cygwin\12"\0)  
(test.pl:3)     print
my $i should be 'cygwin', but it is: cygwin
    =>  SV_YES  
(test.pl:3)     leave
(test.pl:0)     POPBLOCK scope 2 at pp_hot.c:1760
Leaving block 0, type BLOCK
(test.pl:0)     LEAVE scope 2 at pp_hot.c:1797
(test.pl:0)     Setting up jumplevel 22fda0, was a040694
(test.pl:0)     LEAVE scope 1 at perl.c:453





Does someone have an idea what I can do else to track this down?


Some information about Cygwin 1.5:
The following functions/types have changed:

Functions:

  acl 
  aclcheck 
  aclfrommode 
  aclfrompbits 
  aclfromtext 
  aclsort 
  acltomode 
  acltopbits 
  acltotext 
  chown 
  facl 
  fchown
  fdopen
  fgetpos 
  fopen 
  freopen 
  fseeko 
  fsetpos 
  fstat 
  ftello 
  ftruncate 
  getegid 
  geteuid 
  getgid 
  getgrent 
  getgrgid 
  getgrnam 
  getgroups 
  getpwuid 
  getpwuid_r 
  getuid 
  initgroups 
  lchown 
  lseek 
  lstat 
  mknod 
  mmap 
  open 
  seekdir 
  setegid 
  seteuid 
  setgid 
  setgroups 
  setregid 
  setreuid 
  setuid 
  stat 
  telldir 
  truncate 

Types:

  blkcnt_t
  dev_t
  gid_t
  ino_t
  off_t
  uid_t
  struct acl
  struct dirent
  struct group
  struct stat


Probably also interesting is that using the new <inttypes.h> header
with cygwin-1.3.22-x causes (mini)perl to show the same behaviour.
Since there are only some macros defined in <inttypes.h> I thought
evtually s.th. is missing in inttypes.h which perl (Configure) expects
to be there?  However, removing the header resolves the problem for
cygwin-1.3.22 but NOT for cygwin-1.5.  Sigh. 


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]