Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^6: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location

by bulk88 (Priest)
on Dec 04, 2012 at 22:43 UTC ( [id://1007168]=note: print w/replies, xml ) Need Help??


in reply to Re^5: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
in thread if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location

Open perl.exe, not somexsmodule.dll. Then it will not be greyed out.

Replies are listed 'Best First'.
Re^7: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
by Anonymous Monk on Dec 05, 2012 at 04:04 UTC

    Aha, now that is more interesting -- taking your advice from earlier enabling debugging info  perl -pi.orig -le " if( m{^\s*(OPTIMIZE|CCFLAGS|LDDLFLAGS|LDFLAGS)\s*=}i ){ s{ -s }{   }g } " Makefile

    And now I'm cooking with gas :) The relevant snippet from depends.exe

    GetProcAddress(0x674C0000 [auto\io\IO.DLL], "boot_IO") called from "PE +RL516.DLL" at address 0x713DD74F and returned 0x674C2670. LoadLibraryExA("blib\arch\auto\XML\LibXML\LibXML.dll", 0x00000000, LOA +D_WITH_ALTERED_SEARCH_PATH) called from "PERL516.DLL" at address 0x71 +3DA0DE. LDR: LdrRelocateImageWithBias() failed 0xc000007b LDR: OldBase : 6E400000 LDR: NewBase : 010A0000 LDR: Diff : 0xffffffff92ca0000 LDR: NextOffset : 012D9F88 LDR: *NextOffset : 0x302e LDR: SizeOfBlock : 0x5c LoadLibraryExA("blib\arch\auto\XML\LibXML\LibXML.dll", 0x00000000, LOA +D_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: %1 is not a valid W +in32 application (193).

    now Dynaloader also spits out for module XML::LibXML: load_file:%1 is not a valid Win32 application ...

      Google (http://groups.google.com/group/microsoft.public.win32.programmer.kernel/msg/4e96409329944018?dmode=source) says you have a non-relocatable DLL. I think you messed up a different compiler flag when you removed -s, or there is a bug in your Mingw. Look for a PE .reloc section (looking at mingw produced dlls, they all have .reloc sections), or for a by the book answer 100% accurate answer, look in the Data Directory, then at IMAGE_DIRECTORY_ENTRY_BASERELOC entry ("Relocation Table") and make the RVA and size aren't 0. I use StudPE. There are other tools out there ("dumpbin mydll.dll" will show section names and sizes, I also know of PE Explorer (shareware)). Try running dependency walker on a dll that was compiled with "-s" and the makefile unchanged.
        "dumpbin mydll.dll" will show section names and sizes

        I have 2 builds of PLplot.dll - both are the same size (3,327,028 bytes). I have named one of them PLplot_broken.dll, and the other PLplot_ok.dll. They can be obtained from:
        http://www.sisyphusion.tk/junk/PLplot_broken.dll and http://www.sisyphusion.tk/junk/PLplot_ok.dll
        Both were built using the same compiler, and against the same plplot static library.
        Running 'dumpbin PLplot_broken.dll' and 'dumpbin PLplot_ok.dll produces identical results (except of course, for the file name that is reported):
        Microsoft (R) COFF/PE Dumper Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file PLplot_ok.dll File Type: DLL Summary 1000 .CRT B000 .bss 6000 .data 1000 .debug_abbrev 1000 .debug_aranges B3000 .debug_info 1B000 .debug_line 92000 .debug_loc A000 .debug_ranges 2000 .debug_str C000 .edata 16000 .eh_frame 2000 .idata 16000 .rdata 4E000 .reloc 10E000 .text 1000 .tls
        If I use PLplot_ok.dll as the PLplot.dll I get:
        C:\>pmver PDL::Graphics::PLplot 0.61
        If I use PLplot_broken.dll as the PLplot.dll I get:
        C:\>pmver PDL::Graphics::PLplot Can't load 'C:/MinGW/perl589/site/lib/auto/PDL/Graphics/PLplot/PLplot. +dll' for module PDL::Graphics::PLplot: load_file:%1 is not a valid Wi +n32 application at C:/MinGW/perl589/lib/DynaLoader.pm line 226. at -e line 1 Compilation failed in require at -e line 1.
        Any advice on how I might be able to come to an understanding of why one is ok, but the other not, would be most welcome.

        Cheers,
        Rob

        I think you messed up a different compiler flag when you removed -s

        I did the first time and it wouldn't compile, but not this time, I'm sure :)

        or there is a bug in your Mingw

        This could very well be, but the message is the same with both my perls and compilers -- one is everything compiled with  gcc version 4.6.3 (gcc-4.6.3 release with patches [build 20121012 by perlmingw.sf.net]) the other is a mix of gcc versions ( perl compiled with 4.5.2, maybe (probably not) some modules with 4.6 something, xml2 with 4.7.0 ), but the errors messages are identical

        I've also got filealyzer and gcc comes with dumpbin-alike objdump, and there is a reloc section listed with a "RVA" entry size aren't 0

        $ ack -in size 2 |head SizeOfCode 0010f000 SizeOfInitializedData 00288800 SizeOfUninitializedData 00001a00 SizeOfImage 005d0000 SizeOfHeaders 00000600 SizeOfStackReserve 00200000 SizeOfStackCommit 00001000 SizeOfHeapReserve 00100000 SizeOfHeapCommit 00001000 NumberOfRvaAndSizes 00000010 $ ack -n RVA 2 [ 0] +base[ 1] 2b500 Export RVA [ 1] +base[ 2] 2b500 Export RVA

        My search for that error message yielded http://stackoverflow.com/questions/2622607/windows-loader-problem-turn-on-verbose-mode which I don't understand :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1007168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-19 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found