Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^7: Problem Installing DBD::Informix on Windows 7 using AS Perl 5.8.9

by roho (Monsignor)
on Aug 18, 2012 at 03:21 UTC ( #988136=note: print w/ replies, xml ) Need Help??


in reply to Re^6: Problem Installing DBD::Informix on Windows 7 using AS Perl 5.8.9
in thread Problem Installing DBD::Informix on Windows 7 using AS Perl 5.8.9

It runs Perl program esqlld, which defaults the compiler name to "cc", which of course is not found. I changed the default compiler name to "cl" in esqlld (to get it to run) and got the following output:

C:\Perl\bin\perl.exe esqlld ESQLLD='link -dll -nologo -nodefaultlib -d +ebug -opt:ref,icf -libpath:"C:/Perl/lib/CORE" -machine:x86' -out:b +lib/arch/auto/DBD/Informix/Informix.dll -dll -nologo -nodefaultlib -d +ebug -opt:ref,icf -libpath:"C:/Perl/lib/CORE" -machine:x86 Informix +.obj dbdimp.obj dbdattr.obj sqltoken.obj sqltype.obj ixblob.obj odbct +ype.obj kludge.obj link.obj esqlcver.obj esqlc_v6.obj /LIBPATH:C:/PRO +GRA~2/IBM/Informix/11.70/lib /LIBPATH:C:/PROGRA~2/IBM/Informix/11.70/ +lib/esql "C:/PROGRA~2/IBM/Informix/11.70/lib/isqlt09a.lib" "C:/ +PROGRA~2/IBM/Informix/11.70/lib/igl4n304.lib" "C:/PROGRA~2/IBM/Inform +ix/11.70/lib/iglxn304.lib" "C:/PROGRA~2/IBM/Informix/11.70/lib/igo4n3 +04.lib" netapi32.lib wsock32.lib user32.lib winmm.lib advapi32.lib C +:/Perl/lib/CORE/perl58.lib oldnames.lib kernel32.lib user32.lib gdi32 +.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib ol +eaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib versi +on.lib odbc32.lib odbccp32.lib msvcrt.lib -def:Informix.def cl : Command line warning D9035 : option 'o' has been deprecated and w +ill be removed in a future release cl : Command line warning D9035 : option 'o' has been deprecated and w +ill be removed in a future release cl : Command line warning D9035 : option 'o' has been deprecated and w +ill be removed in a future release cl : Command line warning D9002 : ignoring unknown option '-dll' cl : Command line warning D9002 : ignoring unknown option '-nodefaultl +ib' cl : Command line warning D9002 : ignoring unknown option '-debug' cl : Command line warning D9002 : ignoring unknown option '-libpath:C: +/Perl/lib/CORE' cl : Command line warning D9002 : ignoring unknown option '-machine:x8 +6'' cl : Command line warning D9002 : ignoring unknown option '-dll' cl : Command line warning D9002 : ignoring unknown option '-nodefaultl +ib' cl : Command line warning D9002 : ignoring unknown option '-debug' cl : Command line warning D9002 : ignoring unknown option '-libpath:C: +/Perl/lib/CORE' cl : Command line warning D9002 : ignoring unknown option '-machine:x8 +6' cl : Command line warning D9002 : ignoring unknown option '/LIBPATH:C: +/PROGRA~2/IBM/Informix/11.70/lib' cl : Command line warning D9002 : ignoring unknown option '/LIBPATH:C: +/PROGRA~2/IBM/Informix/11.70/lib/esql' cl : Command line warning D9002 : ignoring unknown option '-def:Inform +ix.def' cl : Command line warning D9002 : ignoring unknown option '-lc' cl : Command line warning D9024 : unrecognized source file type 'ESQLL +D='link', object file assumed LINK : fatal error LNK1181: cannot open input file 'ESQLLD='link.obj'

It doesn't like the way the command line is set up. It's treating 'ESQLLD='link.obj' is an input file. This is quickly getting way beyond my pay grade. :) Now I remember why I wince every time I'm faced with installing a CPAN mdule that is not pure Perl. I'm not giving up, but I'm going to sleep on it and take another look tomorrow.

"Its not how hard you work, its how much you get done."


Comment on Re^7: Problem Installing DBD::Informix on Windows 7 using AS Perl 5.8.9
Download Code
Re^8: Problem Installing DBD::Informix on Windows 7 using AS Perl 5.8.9
by Anonymous Monk on Aug 18, 2012 at 04:23 UTC

    It runs Perl program esqlld,...

    Actually it doesn't :) I understand its supposed to, but thats wishful thinking, nmake doesn't work like that

    I have a very low opinion of that whole Makefile.PL and the esqld program ( the word garbage comes to mind)

    On nmake, doing program .. FOO=BAR doesn't set environment variable FOO to the value BAR -- I don't think any version of make does that

    Here is what I would try, delete all that esqld malarky, and replace the whole thing with whatever its actually supposed to be, instead of

    $opts{LD} = "INFORMIXC='\$(FULLPERL) esqlld' " . "ESQLLD='$Config{ld} \$(LDDLFLAGS)' \$(ESQL)";

    Try something like

    delete $opts{LD} ;
    And do it right before WriteMakefile

    Actually what I would do is Data::Dumper to dump \%opts right before WriteMakefile, and along with a copy of postamble from Makefile, write a new Makefile.PL by hand

    Actually it looks like that mess shouldn't happen on win32, what is the output of perl -V:archname

    Try setting $NTConfiguration to true manually

    Yeah, I'd try $NTConfiguration first, then delete $opts{LD} ;, then writing my own Makefile.PL

      The output of perl -V:archname is archname='MSWin32-x86-multi-thread'; so $NTConfiguration is set to true. I deleted $opt{LD} right before WriteMakefile. When I re-ran perl Makefile.PL and nmake I got the following linker errors:

      link -out:blib\arch\auto\DBD\Informix\Informix.dll -dll -nologo -nodef +aultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x8 +6 Informix.obj dbdimp.obj dbdattr.obj sqltoken.obj sqltype.obj ixblob +.obj odbctype.obj kludge.obj link.obj esqlcver.obj esqlc_v6.obj /LIBP +ATH:C:\PROGRA~2\IBM\Informix\11.70/lib /LIBPATH:C:\PROGRA~2\IBM\Infor +mix\11.70/lib/esql "C:/PROGRA~2/IBM/Informix/11.70\lib\isqlt09a +.lib" "C:/PROGRA~2/IBM/Informix/11.70\lib\igl4n304.lib" "C:/PROGRA~2/ +IBM/Informix/11.70\lib\iglxn304.lib" "C:/PROGRA~2/IBM/Informix/11.70\ +lib\igo4n304.lib" netapi32.lib wsock32.lib user32.lib winmm.lib advap +i32.lib C:\Perl\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32 +.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ol +e32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm. +lib version.lib odbc32.lib odbccp32.lib msvcrt.lib -def:Informix.def Informix.def : error LNK2001: unresolved external symbol ifx_checkAPI Informix.def : error LNK2001: unresolved external symbol ifx_checkAPI blib\arch\auto\DBD\Informix\Informix.lib : fatal error LNK1120: 2 unre +solved externals NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual S +tudio 10.0\VC\BIN\link.EXE"' : return code '0x460' Stop.

      I checked Informix.def and its contents are:

      LIBRARY "Informix" EXPORTS ifx_checkAPI _ifx_checkAPI = ifx_checkAPI boot_DBD__Informix _boot_DBD__Informix = boot_DBD__Informix

      I have no idea what this file and its contents are supposed to do. You're right. This is a mess. I would like to clean it up but writing a new Makefile.PL is beyond my expertise. All I want to do is install the module and get on with my work.

      "Its not how hard you work, its how much you get done."

        I am writing generically here. https://bugs.php.net/bug.php?id=3386. Do a grep on the folder with the library included .lib/.a/.o/.obj/etc, or do a start-search-files, inside files, inside subfolders, (plus you probably need some registry editing to add (I did) those file extensions to windows search, see http://support.microsoft.com/kb/309173). You are going to have to find where ifx_checkAPI lives. Some googling leaks to this, http://publib.boulder.ibm.com/infocenter/idshelp/v111/index.jsp?topic=/com.ibm.esqlc.doc/sii-13-10773.htm. The other more experimental choice is get ifx_checkAPI out of your XS module, I dont know why it needs to be exported from the XS module (and I dont know your XS module either). http://msdn.microsoft.com/en-us/library/756as972.aspx Dumpbin is a very useful tool. It works on .obj/.o and .a/lib and on .exe/.dll files. Not all the files have all classes of info, a .obj/.o exports and imports nothing for example, but it does have plenty of symbols which some people say are "exported" since they are public and not static/private symbols and you can link with them from oter compliands. Another tool to try is StudPE. It works on exe and dlls, not sure if it will open a .obj/.lib.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-12-20 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls