This is the mail archive of the cygwin 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]

Re: More Weird Perl .dll Errors


2011/1/15 Rafael Kitover:
> Hi Reini,
>
> I'm not having any luck:
>
> $ perl -MClass::XSAccessor -le 1
> Can't load
> '/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll'
> for module Class::X
> SAccessor: No such file or directory at
> /usr/lib/perl5/5.10/i686-cygwin/XSLoader.pm line 70.
> ?at /usr/lib/perl5/site_perl/5.10/i686-cygwin/Class/XSAccessor.pm line 11
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
> $ perlrebase
> ...
> ReBaseImage
> (/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll)
> failed with last e
> rror = 6

bad, not loadable.

> $ ls -l
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
> -rwxr-xrwx 1 rkitover None 500002 Jan 15 15:41

The o+w perm will fail for -T taint mode, but this is not the problem here.

> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/
> XSAccessor.dll
>
> $ peflags
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll:
> coff(0x2106) pe(0x8000)

good

> $ imagebase
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
> 68640000

good.

> $ ldd
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
> ? ? ? ?ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77480000)
> ? ? ? ?kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll
> (0x75530000)
> ? ? ? ?KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll
> (0x74d70000)

bad.
This is all?
If so you have a mingw perl dll here, which cannot be loaded by cygwin perl.

mine:
$ ldd /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
        ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x77990000)
        kernel32.dll => /cygdrive/c/Windows/system32/kernel32.dll (0x77120000)
        KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll
(0x75b90000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        ADVAPI32.DLL => /cygdrive/c/Windows/system32/ADVAPI32.DLL (0x76e20000)
        msvcrt.dll => /cygdrive/c/Windows/system32/msvcrt.dll (0x75de0000)
        sechost.dll => /cygdrive/c/Windows/SYSTEM32/sechost.dll (0x76190000)
        RPCRT4.dll => /cygdrive/c/Windows/system32/RPCRT4.dll (0x77020000)
        cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x67f00000)
        cygperl5_10.dll => /usr/bin/cygperl5_10.dll (0x56010000)
        cygcrypt-0.dll => /usr/bin/cygcrypt-0.dll (0x72fe0000)
        cygssp-0.dll => /usr/bin/cygssp-0.dll (0x67280000)
        SspiCli.dll => /cygdrive/c/Windows/system32/SspiCli.dll (0x759f0000)

> On 1/14/2011 12:00 PM, Reini Urban wrote:
>>
>> 2011/1/14 Rafael Kitover:
>>>
>>> I tried both peflagsall and rebaseall with a -T list including all .dlls
>>> under /usr/lib/perl5 as well as /usr/bin/cygperl5_10.dll
>>>
>>> But the error for MOP.dll persists.
>>
>> The Class::MOP and Sub::Name dll's are different beasts.
>> If they do not load, (even windows refuses to load them apparently)
>> you'll have to recompile them, followed by a perlrebase.
>>
>>> I'm not sure that when I tried the rebaseall it ran through to
>>> completion,
>>> because it gave me this error:
>>>
>>> FixImage (/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll)
>>> failed with last error = 13
>>
>> You have to exclude all mingw dll's from rebaseall.
>> This will be fixed in the next rebase package.
>>
>>> This is Windows 7 64bit
>>>
>>> On 1/14/2011 4:35 AM, Matthias Andree wrote:
>>>>
>>>> Am 14.01.2011 10:21, schrieb Rafael Kitover:
>>>>>
>>>>> Something weird happened to my Class::MOP .dll :
>>>>>
>>>>> $ perl -MClass::MOP -le 1
>>>>> Can't load
>>>>> '/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/MOP/MOP.dll' for
>>>>> module Class::MOP: No such fi
>>>>> le or directory at /usr/lib/perl5/5.10/i686-cygwin/XSLoader.pm line 70.
>>>>> ? at /usr/lib/perl5/site_perl/5.10/i686-cygwin/Class/MOP.pm line 38
>>>>> Compilation failed in require.
>>>>> BEGIN failed--compilation aborted.
>>>>>
>>>>> If I try to run perlrebase, I get this:
>>>>>
>>>>> ...
>>>>> /usr/lib/perl5/5.10/i686-cygwin/auto/Time/Piece/Piece.dll: new base =
>>>>> 57900000, new size = 10000
>>>>> /usr/lib/perl5/5.10/i686-cygwin/auto/Unicode/Normalize/Normalize.dll:
>>>>> new base = 57910000, new size = 50000
>>>>> /usr/lib/perl5/5.10/i686-cygwin/auto/Win32/Win32.dll: new base =
>>>>> 57960000, new size = 20000
>>>>> /usr/lib/perl5/5.10/i686-cygwin/auto/Win32API/File/File.dll: new base =
>>>>> 57980000, new size = 30000
>>>>> ReBaseImage
>>>>> (/usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/MOP/MOP.dll)
>>>>> failed with last error = 6
>>
>> Either no write+exec permission or broken dependency.
>>
>>>>> I tried doing a "notest force install Class::MOP" in CPAN shell, same
>>>>> error after the installation finishes.
>>
>> If it's not the perm (unlikely), check the imagebase of your new dll:
>>
>> $ cat ~/bin/imagebase
>> #!/bin/sh
>> objdump -p $1 |grep ImageBase |cut -c12-
>>
>> $ imagebase
>> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/MOP/MOP.dll
>> 66c00000
>>
>> And check the bases of the dependant dll's also: Anything below
>> 0x4000_0000 is broken.
>>
>> $ ldd /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/MOP/MOP.dll
>> ? ? ? ? ntdll.dll => ?/cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x778b0000)
>> ? ? ? ? kernel32.dll => ?/cygdrive/c/Windows/system32/kernel32.dll
>> (0x777d0000)
>> ? ? ? ? KERNELBASE.dll => ?/cygdrive/c/Windows/system32/KERNELBASE.dll
>> (0x75cb0000)
>> ? ? ? ? cygwin1.dll => ?/usr/bin/cygwin1.dll (0x61000000)
>> ? ? ? ? ADVAPI32.DLL => ?/cygdrive/c/Windows/system32/ADVAPI32.DLL
>> (0x77730000)
>> ? ? ? ? msvcrt.dll => ?/cygdrive/c/Windows/system32/msvcrt.dll
>> (0x76600000)
>> ? ? ? ? sechost.dll => ?/cygdrive/c/Windows/SYSTEM32/sechost.dll
>> (0x767e0000)
>> ? ? ? ? RPCRT4.dll => ?/cygdrive/c/Windows/system32/RPCRT4.dll
>> (0x766b0000)
>> ? ? ? ? cyggcc_s-1.dll => ?/usr/bin/cyggcc_s-1.dll (0x67f00000)
>> ? ? ? ? cygperl5_10.dll => ?/usr/bin/cygperl5_10.dll (0x56010000)
>> ? ? ? ? cygcrypt-0.dll => ?/usr/bin/cygcrypt-0.dll (0x694d0000)
>> ? ? ? ? cygssp-0.dll => ?/usr/bin/cygssp-0.dll (0x67280000)
>> ? ? ? ? SspiCli.dll => ?/cygdrive/c/Windows/system32/SspiCli.dll
>> (0x75910000)
>>
>>>>> I tried rebooting and running perlrebase again, same error.
>>>>
>>>> Try rebaseall, or if you're under Vista or 7, peflagsall.
-- 
Reini Urban
http://phpwiki.org/? ? ? ? ?? http://murbreak.at/

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


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