More Weird Perl .dll Errors

Rafael Kitover rkitover@cpan.org
Wed Jan 19 19:36:00 GMT 2011


So I did this:

mkdir ~/.cpan/CPAN
cp /usr/lib/perl5/5.10/CPAN/Config.pm ~/.cpan/CPAN/MyConfig.pm

Then in MyConfig.pm I did this:

'make_install_arg' => q[UNINST=1],
'mbuild_install_arg' => q[uninst=1],
'makepl_arg' => q[INSTALLDIRS=vendor],
'mbuildpl_arg' => q[--installdirs vendor],

Now everything seems to work OK.

Thanks very much again Reini for your quick fix to the Win7 perlrebase 
bug and for helping me debug this!

I'm going to continue playing with Cygwin Perl and submitting patches to 
CPAN modules for it :)

Also very happy that my perl utils like App::Nopaste now work.

On 1/18/2011 1:10 PM, Rafael Kitover wrote:
> On 1/17/2011 2:28 PM, Reini Urban wrote:
>> 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.
>
> So the question becomes, how did I get a mingw dll? I used the CPAN
> shell to install this module just like any other module.
>
> The modules that work give me correct output:
>
> $ perl -MSub::Name -le 1
>
> rkitover@eeebox ~
> $ ldd /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Sub/Name/Name.dll
> ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77100000)
> kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76670000)
> KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75690000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
> ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x74d00000)
> msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x74910000)
> sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x75370000)
> RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x74f90000)
> SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x74750000)
> CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x74740000)
> cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x70e20000)
> cygperl5_10.dll => /usr/bin/cygperl5_10.dll (0x57010000)
> cygcrypt-0.dll => /usr/bin/cygcrypt-0.dll (0x6fb70000)
> cygssp-0.dll => /usr/bin/cygssp-0.dll (0x70220000)
>
> After 'look'ing into Class::XSAccessor:
>
> perl Makefile.PL
> make
> ...
>
> $ ldd blib/arch/auto/Class/XSAccessor/XSAccessor.dll
> ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77100000)
> kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76670000)
> KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75690000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
> ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x74d00000)
> msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x74910000)
> sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x75370000)
> RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x74f90000)
> SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x74750000)
> CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x74740000)
> cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x70e20000)
> cygperl5_10.dll => /usr/bin/cygperl5_10.dll (0x57010000)
> cygcrypt-0.dll => /usr/bin/cygcrypt-0.dll (0x6fb70000)
> cygssp-0.dll => /usr/bin/cygssp-0.dll (0x70220000)
>
> That all looks good.
>
> $ make test
> PERL_DL_NONLAZY=1 /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t
> /*.t
> ...
> ...
> All tests successful.
> Files=23, Tests=451, 14 wallclock secs ( 0.75 usr 0.45 sys + 6.36 cusr
> 5.55 csys = 13.12 CPU)
> Result: PASS
>
> So that one works.
>
> $ make install
> Files found in blib/arch: installing files in blib/lib into architecture
> dependent library tree
> Installing
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
>
> Appending installation info to
> /usr/lib/perl5/5.10/i686-cygwin/perllocal.pod
>
> $ ldd
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
>
> ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77100000)
> kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76670000)
> KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75690000)
>
> What the fuck just happened there?
>
> On the theory that EU::MM is doing something weird that breaks it, I
> tried this:
>
> $ rm -f
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
>
>
> $ cp blib/arch/auto/Class/XSAccessor/XSAccessor.dll
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAcc
> essor/XSAccessor.dll
>
> $ ldd
> /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Class/XSAccessor/XSAccessor.dll
>
> ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77100000)
> kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76670000)
> KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75690000)
>
> How do you explain this? I just made a copy of the .dll, and that breaks
> it!
>
> And it's only a copy into that specific location.
>
> $ cp blib/arch/auto/Class/XSAccessor/XSAccessor.dll .
> $ ldd ./XSAccessor.dll
> ntdll.dll => /cygdrive/c/Windows/SysWOW64/ntdll.dll (0x77100000)
> kernel32.dll => /cygdrive/c/Windows/syswow64/kernel32.dll (0x76670000)
> KERNELBASE.dll => /cygdrive/c/Windows/syswow64/KERNELBASE.dll (0x75690000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
> ADVAPI32.DLL => /cygdrive/c/Windows/syswow64/ADVAPI32.DLL (0x74d00000)
> msvcrt.dll => /cygdrive/c/Windows/syswow64/msvcrt.dll (0x74910000)
> sechost.dll => /cygdrive/c/Windows/SysWOW64/sechost.dll (0x75370000)
> RPCRT4.dll => /cygdrive/c/Windows/syswow64/RPCRT4.dll (0x74f90000)
> SspiCli.dll => /cygdrive/c/Windows/syswow64/SspiCli.dll (0x74750000)
> CRYPTBASE.dll => /cygdrive/c/Windows/syswow64/CRYPTBASE.dll (0x74740000)
> cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x70e20000)
> cygperl5_10.dll => /usr/bin/cygperl5_10.dll (0x57010000)
> cygcrypt-0.dll => /usr/bin/cygcrypt-0.dll (0x6fb70000)
> cygssp-0.dll => /usr/bin/cygssp-0.dll (0x70220000)
>
>>
>> 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.
>
> --
> 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
>

--
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



More information about the Cygwin mailing list