Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Compiling Tk::PNG on win32 (complications, more c/xs than perl)

by crazyinsomniac (Prior)
on Jul 15, 2002 at 08:59 UTC ( #181716=perlquestion: print w/ replies, xml ) Need Help??
crazyinsomniac has asked for the wisdom of the Perl Monks concerning the following question:

Hi. BUU wanted a ppm version of Tk-PNG-2.005, so I went downloaded it, downloaded and compiled zlib and libpng, and did like the readme suggests, so I do like
E:\dev\new\Tk-PNG-2.005>perl Makefile.PL -I./zlib -I./libpng -L./zlib +-L./libpng E:/dev/new/Tk-PNG-2.005 does not start with C:/Perl/site/lib i.e. building outside Tk itself Note (probably harmless): No library found for '-lpng' Note (probably harmless): No library found for '-lz' Finding dependancies for PNG.xs Finding dependancies for imgPNG.c Cannot find 'png.h' assume made Writing Makefile for Tk::PNG E:\dev\new\Tk-PNG-2.005>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. NMAKE : fatal error U1073: don't know how to make 'png.h' Stop.
I crack the makefile open, and search for png.h, and find
imgPNG$(OBJ_EXT) : imgPNG.c C:/Perl/site/lib/Tk/pTk/Lang.h \ C:/Perl/site/lib/Tk/pTk/Lang.m C:/Perl/site/lib/Tk/pTk/Lang.t \ C:/Perl/site/lib/Tk/pTk/LangIO.h C:/Perl/site/lib/Tk/pTk/Lang_f.h \ C:/Perl/site/lib/Tk/pTk/Xlib.h C:/Perl/site/lib/Tk/pTk/Xlib.m \ C:/Perl/site/lib/Tk/pTk/Xlib.t C:/Perl/site/lib/Tk/pTk/Xlib_f.h \ C:/Perl/site/lib/Tk/pTk/img.h C:/Perl/site/lib/Tk/pTk/imgInt.h \ C:/Perl/site/lib/Tk/pTk/imgInt.m C:/Perl/site/lib/Tk/pTk/imgInt.t \ C:/Perl/site/lib/Tk/pTk/imgInt_f.h C:/Perl/site/lib/Tk/pTk/tk.h \ C:/Perl/site/lib/Tk/pTk/tk.m C:/Perl/site/lib/Tk/pTk/tk.t \ C:/Perl/site/lib/Tk/pTk/tkConfig.h C:/Perl/site/lib/Tk/pTk/tkEvent.h +\ C:/Perl/site/lib/Tk/pTk/tkEvent.m C:/Perl/site/lib/Tk/pTk/tkEvent.t \ C:/Perl/site/lib/Tk/pTk/tkEvent_f.h C:/Perl/site/lib/Tk/pTk/tkInt.h \ C:/Perl/site/lib/Tk/pTk/tkInt.m C:/Perl/site/lib/Tk/pTk/tkInt.t \ C:/Perl/site/lib/Tk/pTk/tkInt_f.h C:/Perl/site/lib/Tk/pTk/tkPort.h \ C:/Perl/site/lib/Tk/pTk/tkVMacro.h C:/Perl/site/lib/Tk/pTk/tkWinPort. +h \ C:/Perl/site/lib/Tk/pTk/tk_f.h png.h
I change C:/Perl/site/lib/Tk/pTk/tk_f.h png.h to C:/Perl/site/lib/Tk/pTk/tk_f.h libpng/png.h
That don't help much so I crack open imgPNG.c and find
#ifdef MAC_TCL #include "libpng:png.h" #else #ifdef HAVE_IMG_H # include <png.h> #else # include "png.h" #endif #endif
SO I change the include "png.h" to include "libpng/png.h" and proceed from there.

And I get

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IC:/Perl/site/lib/Tk -I/usr/local/include -IC:/Perl/sit +e/lib/Tk/pTk/mTk/xlib -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPE +RL_IMPLICIT_CONTEXT -DPERL_IMP LICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"2.005\ +" -DXS_VERSION=\"800.023\" - IC:\Perl\lib\CORE imgPNG.c imgPNG.c libpng/png.h(324) : fatal error C1083: Cannot open include file: 'zlib +.h': No such file or directory NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. E:\dev\new\Tk-PNG-2.005>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -c -IC:/Perl/site/lib/Tk -I/usr/local/include -IC:/Perl/sit +e/lib/Tk/pTk/mTk/xlib -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPE +RL_IMPLICIT_CONTEXT -DPERL_IMP LICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\"2.005\ +" -DXS_VERSION=\"800.023\" - IC:\Perl\lib\CORE imgPNG.c imgPNG.c imgPNG.c(472) : warning C4550: expression evaluates to a function whic +h is missing an argument list imgPNG.c(661) : warning C4550: expression evaluates to a function whic +h is missing an argument list "Running Mkbootstrap for Tk::PNG ()" C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e chmod 644 PNG.bs C:\Perl\bin\perl.exe "-IC:\Perl\lib" "-IC:\Perl\lib" -MExtUtil +s::Mksymlists -e "Mksymlists( 'NAME' => 'Tk::PNG', 'DLBASE' => 'PNG', 'DL_FUNCS' => { }, 'FUNCLIST' + => [], 'IMPORTS' => { }, 'DL _VARS' => []);" link -out:blib\arch\auto\Tk\PNG\PNG.dll -dll -nologo -nodefaul +tlib -release -libpath:"C:/Pe rl\lib\CORE" -machine:x86 PNG.obj imgPNG.obj C:\Perl\lib\CORE\perl +56.lib "C:\Program Files\Micro soft Visual Studio\VC98\lib\oldnames.lib" "C:\Program Files\Microsoft +Visual Studio\VC98\lib\kernel3 2.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\user32.lib" +"C:\Program Files\Microsoft Vi sual Studio\VC98\lib\gdi32.lib" "C:\Program Files\Microsoft Visual Stu +dio\VC98\lib\winspool.lib" "C: \Program Files\Microsoft Visual Studio\VC98\lib\comdlg32.lib" "C:\Prog +ram Files\Microsoft Visual Stu dio\VC98\lib\advapi32.lib" "C:\Program Files\Microsoft Visual Studio\V +C98\lib\shell32.lib" "C:\Progr am Files\Microsoft Visual Studio\VC98\lib\ole32.lib" "C:\Program Files +\Microsoft Visual Studio\VC98\ lib\oleaut32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\n +etapi32.lib" "C:\Program Files \Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Program Files\Microsof +t Visual Studio\VC98\lib\wsock 32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\mpr.lib" "C +:\Program Files\Microsoft Visu al Studio\VC98\lib\winmm.lib" "C:\Program Files\Microsoft Visual Studi +o\VC98\lib\version.lib" "C:\Pr ogram Files\Microsoft Visual Studio\VC98\lib\odbc32.lib" "C:\Program F +iles\Microsoft Visual Studio\V C98\lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\l +ib\msvcrt.lib" -def:PNG.def Creating library blib\arch\auto\Tk\PNG\PNG.lib and object blib\arch +\auto\Tk\PNG\PNG.exp imgPNG.obj : error LNK2001: unresolved external symbol _png_set_read_f +n imgPNG.obj : error LNK2001: unresolved external symbol _png_create_rea +d_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_get_error_ +ptr imgPNG.obj : error LNK2001: unresolved external symbol _png_error imgPNG.obj : error LNK2001: unresolved external symbol _png_get_progre +ssive_ptr imgPNG.obj : error LNK2001: unresolved external symbol _png_read_image imgPNG.obj : error LNK2001: unresolved external symbol _png_set_gamma imgPNG.obj : error LNK2001: unresolved external symbol _png_get_gAMA imgPNG.obj : error LNK2001: unresolved external symbol _png_set_sRGB imgPNG.obj : error LNK2001: unresolved external symbol _png_get_sRGB imgPNG.obj : error LNK2001: unresolved external symbol _png_get_valid imgPNG.obj : error LNK2001: unresolved external symbol _png_get_rowbyt +es imgPNG.obj : error LNK2001: unresolved external symbol _png_get_channe +ls imgPNG.obj : error LNK2001: unresolved external symbol _png_read_updat +e_info imgPNG.obj : error LNK2001: unresolved external symbol _png_set_expand imgPNG.obj : error LNK2001: unresolved external symbol _png_set_strip_ +16 imgPNG.obj : error LNK2001: unresolved external symbol _png_get_IHDR imgPNG.obj : error LNK2001: unresolved external symbol _png_read_info imgPNG.obj : error LNK2001: unresolved external symbol _png_destroy_re +ad_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_create_inf +o_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_init_io imgPNG.obj : error LNK2001: unresolved external symbol _png_destroy_wr +ite_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_create_wri +te_struct imgPNG.obj : error LNK2001: unresolved external symbol _png_set_write_ +fn imgPNG.obj : error LNK2001: unresolved external symbol _png_write_end imgPNG.obj : error LNK2001: unresolved external symbol _png_write_row imgPNG.obj : error LNK2001: unresolved external symbol _png_set_interl +ace_handling imgPNG.obj : error LNK2001: unresolved external symbol _png_write_info imgPNG.obj : error LNK2001: unresolved external symbol _png_set_text imgPNG.obj : error LNK2001: unresolved external symbol _png_set_gAMA imgPNG.obj : error LNK2001: unresolved external symbol _png_set_IHDR blib\arch\auto\Tk\PNG\PNG.dll : fatal error LNK1120: 31 unresolved ext +ernals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.
What the heck am I doing? Do I have uncompatible versions of libpng and zlib? This is outside of my scope of knowledge.

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Comment on Compiling Tk::PNG on win32 (complications, more c/xs than perl)
Select or Download Code
Re: Compiling Tk::PNG on win32 (complications, more c/xs than perl)
by grummerX (Pilgrim) on Jul 15, 2002 at 09:33 UTC
    Not sure about your compiling issues, but a PPM of Tk-PNG-2.005 already exists. It only shows up when using the PPM3 command line interface, and it's apparently not in the repository that the original PPM interface uses.

    Update:
    This PPM is available for Linux only. The ActiveState build I was using (631) didn't display that information. After upgrading to build 633, PPM displays the following:

    Available Platforms: 1. i686-linux-thread-multi

    ++crazyinsomniac for pointing this out to me and prompting me to grab the latest build.

    -- grummerX

Re: Compiling Tk::PNG on win32 (complications, more c/xs than perl)
by Courage (Parson) on Jul 15, 2002 at 09:59 UTC
    As I see this situation, Makefile.PL warned you that it misses those libraries "png" and "z", so you really need to "show" them to Makefile.PL somehow. I suggest you editing Config.pm to add extra libraries path.

    Those unresolved externals that MSVC++ explains are symbols from those libraries.

    BTW what "perl -V" outputs in your case?

    Courage, the Cowardly Dog.

      Wouldn't passing -I and -L do that? (extra paths) Editing Config.pm is out of the question.
      Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip +licity=define useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DN +O_STRICT -DHAVE_DES_FCRYPT -D PERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:/ +Perl\lib\CORE" -machine:x86' libpth="C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib" "C: +\Program Files\Microsoft Visua l Studio\VC98\lib" "C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32.lib advapi32.lib sh ell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mp +r.lib winmm.lib version.lib o dbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib comdlg32.lib advapi32.li b shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.li +b mpr.lib winmm.lib version.l ib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -l +ibpath:"C:/Perl\lib\CORE" -ma chine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEX +T PERL_IMPLICIT_SYS Locally applied patches: ActivePerl Build 633 Built under MSWin32 Compiled at Jun 17 2002 21:33:05 @INC: C:/Perl/lib C:/Perl/site/lib . C:\>
      so you really need to "show" them to Makefile.PL somehow.

      I'm open for suggestions (I cracked open Makefile.PL at one point, added stuff to LIBS and INC, as well as cracking the Makefile itself open and doing that under CCFLAGS, but that didn't really solve anything I didn't by hardcoding the stuff myself as described in the original thread ~ I really disliked doing that)

      At this point I really am convinced (since i'm using zlib 1.1.4, cause I can't find no other) that this is mostly due to my zlib version ~ most likely the Tk::PNG stuff needs to be updated to work with the newer zlib/libpng (imgPNG.c is the heart'n'soul of the module ~ i'm not an xs hacker).

       
      ______crazyinsomniac_____________________________
      Of all the things I've lost, I miss my mind the most.
      perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

        Here is one of my diff files to gain similar things:
        --- D:\WORK\PerlCompile\perl-5.6.1-x\compile-extensions\XML-Parser-2.3 +0\xxx\Makefile.PL Thu Apr 19 22:01:23 2001 +++ Makefile.PL Thu Apr 19 21:50:10 2001 @@ -24,7 +24,7 @@ WriteMakefile( NAME => 'XML::Parser::Expat', C => ['Expat.c'], - LIBS => $libs, + LIBS => "-L$Config{libpth} -L$Config{libpth}\\Relea +se vcl.lib $libs", XSPROTOARG => '-noprototypes', VERSION_FROM => 'Expat.pm', @extras
        So add/edit Makefile.PL in a similar way.

        Courage, the Cowardly Dog.

Re: Compiling Tk::PNG on win32 (complications, more c/xs than perl)
by Courage (Parson) on Jul 15, 2002 at 16:13 UTC
    Finally I succeeded building it, here is a proof-log :)
    D:\WORK\PerlCompile\compile-modules\perl561\Tk-PNG-2.005>perl -w Makef +ile.PL d:/WORK/PerlCompile/compile-modules/perl561/Tk-PNG-2.005 does not star +t with D:/perl561/site/lib i.e. building outside Tk itself Finding dependancies for PNG.xs Finding dependancies for imgPNG.c Writing Makefile for Tk::PNG D:\WORK\PerlCompile\compile-modules\perl561\Tk-PNG-2.005>vc nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. "Running Mkbootstrap for Tk::PNG ()" D:\perl561\bin\perl.exe -Id:\perl561\lib -Id:\perl561\lib -MEx +tUtils::Command -e chmod 644 PNG.bs D:\perl561\bin\perl.exe "-Id:\perl561\lib" "-Id:\perl561\lib" +-MExtUtils::Mksymlists -e "Mksymlists('NAME' => 'Tk::PNG', 'DLBASE' +=> 'PNG', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'D +L_VARS' => []);" link -out:blib\arch\auto\Tk\PNG\PNG.dll -dll -nologo -nodefaul +tlib -release -libpath:"d:\perl561\lib\CORE" -machine:x86 PNG.obj +imgPNG.obj D:\perl561\lib\CORE\perl56.lib libpng.lib zlib.lib D:\MS +VStudio\VC98\LIB\oldnames.lib D:\MSVStudio\VC98\LIB\kernel32.lib D:\M +SVStudio\VC98\LIB\user32.lib D:\MSVStudio\VC98\LIB\gdi32.lib D:\MSVSt +udio\VC98\LIB\winspool.lib D:\MSVStudio\VC98\LIB\comdlg32.lib D:\MSVS +tudio\VC98\LIB\advapi32.lib D:\MSVStudio\VC98\LIB\shell32.lib D:\MSVS +tudio\VC98\LIB\ole32.lib D:\MSVStudio\VC98\LIB\oleaut32.lib D:\MSVStu +dio\VC98\LIB\netapi32.lib D:\MSVStudio\VC98\LIB\uuid.libD:\MSVStudio\ +VC98\LIB\wsock32.lib D:\MSVStudio\VC98\LIB\mpr.lib D:\MSVStudio\VC98\ +LIB\winmm.lib D:\MSVStudio\VC98\LIB\version.lib D:\MSVStudio\VC98\LIB +\odbc32.lib D:\MSVStudio\VC98\LIB\odbccp32.lib D:\MSVStudio\VC98\LIB\ +msvcrt.lib -def:PNG.def Creating library blib\arch\auto\Tk\PNG\PNG.lib and object blib\arch +\auto\Tk\PNG\PNG.exp D:\perl561\bin\perl.exe -Id:\perl561\lib -Id:\perl561\lib -MEx +tUtils::Command -e chmod 755 blib\arch\auto\Tk\PNG\PNG.dll D:\perl561\bin\perl.exe -Id:\perl561\lib -Id:\perl561\lib -MEx +tUtils::Command -e cp PNG.bs blib\arch\auto\Tk\PNG\PNG.bs D:\perl561\bin\perl.exe -Id:\perl561\lib -Id:\perl561\lib -MEx +tUtils::Command -e chmod 644 blib\arch\auto\Tk\PNG\PNG.bs D:\WORK\PerlCompile\compile-modules\perl561\Tk-PNG-2.005>vc nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. D:\perl561\bin\perl.exe -Mblib -Id:\perl561\lib -Id:\perl561\l +ib -e "use Test::Harness qw(&runtests $verbose); $verbose=0; runtests + @ARGV;" t\basic.t Using d:/WORK/PerlCompile/compile-modules/perl561/Tk-PNG-2.005/blib t\basic.............ok All tests successful. Files=1, Tests=4, 2 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 C +PU)
    and I even saw some picture on a screen. Honestly!

    A few tips what were of concern here.

    • I have installed Compress::Zlib, which is compiled by AS, but did not had "zlib.h" for *that* version (which is 1.0.4), so I've downloaded zlib113 and proceeded but very carefully not to confuse them ("zlib.dll" file is here and there, and it's important not to confuse them)
    • If you decide to build zlib, then unzip zlib into directory where you build your module but into subdirectory "zlib", go in there. "makefile.nt" in "nt" is which I used and succeeded.
    • Tk::PNG-2.005 has libpng in it, and it's good but be careful when building it, because (at least for me) ./libpng/makefile.vc was confusing and I lost about a hour trying to figure out what was wrong, and found "right" file which was okay for that configuration and it's name is -- ./libpng/scripts/makefile.vcwin32.
      Needless to say but important to do that you must copy it to ".." once and call it as "nmake /f makefile.vcwin32". Hmm. now I realised that "nmake /f scripts\makefile.vcwin32" will also work. Okay. A single touch at the very end of that file right before "libpng.lib" was created -del ... instead of just del ....
    • after that go to right place, do "perl Makefile.PL" and you should be okay if freshly created libs are in their right place. When installing your module, remember that perl should "see" right zlib.dll when running it. Probably there exists a way (right rule for right makefile) to create static lib to not confuse different zlib.dll-s.

    update: some HTML formating cleanup

    Courage, the Cowardly Dog.

      Ok, I see what you're doing there, I get there, and then it goes downhill again,
      E:\dev\new\Tk-PNG-2.005>perl Makefile.PL E:/dev/new/Tk-PNG-2.005 does not start with C:/Perl/site/lib i.e. building outside Tk itself Finding dependancies for PNG.xs Finding dependancies for imgPNG.c Missing ')' trailing: x500) at C:/Perl/site/lib/Tk/MakeDepend.pm line 102, <./zlib +/zconf.h> line 95. Missing ')' trailing: x0500) && defined (WIN32) at C:/Perl/site/lib/Tk/MakeDepend. +pm line 102, <./zlib/zconf.h> line 178. Writing Makefile for Tk::PNG E:\dev\new\Tk-PNG-2.005>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. "Running Mkbootstrap for Tk::PNG ()" C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e chmod 644 PNG.bs C:\Perl\bin\perl.exe "-IC:\Perl\lib" "-IC:\Perl\lib" -MExtUtil +s::Mksymlists -e "Mksymlists( 'NAME' => 'Tk::PNG', 'DLBASE' => 'PNG', 'DL_FUNCS' => { }, 'FUNCLIST' + => [], 'IMPORTS' => { }, 'DL _VARS' => []);" link -out:blib\arch\auto\Tk\PNG\PNG.dll -dll -nologo -nodefaul +tlib -release -libpath:"C:/Pe rl\lib\CORE" -machine:x86 PNG.obj imgPNG.obj C:\Perl\lib\CORE\perl +56.lib libpng.lib zlib.lib "C: \Program Files\Microsoft Visual Studio\VC98\lib\oldnames.lib" "C:\Prog +ram Files\Microsoft Visual Stu dio\VC98\lib\kernel32.lib" "C:\Program Files\Microsoft Visual Studio\V +C98\lib\user32.lib" "C:\Progra m Files\Microsoft Visual Studio\VC98\lib\gdi32.lib" "C:\Program Files\ +Microsoft Visual Studio\VC98\l ib\winspool.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\co +mdlg32.lib" "C:\Program Files\ Microsoft Visual Studio\VC98\lib\advapi32.lib" "C:\Program Files\Micro +soft Visual Studio\VC98\lib\sh ell32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\ole32.li +b" "C:\Program Files\Microsoft Visual Studio\VC98\lib\oleaut32.lib" "C:\Program Files\Microsoft Visu +al Studio\VC98\lib\netapi32.li b" "C:\Program Files\Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Pr +ogram Files\Microsoft Visual S tudio\VC98\lib\wsock32.lib" "C:\Program Files\Microsoft Visual Studio\ +VC98\lib\mpr.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\winmm.lib" "C:\Program Files\Mi +crosoft Visual Studio\VC98\lib \version.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\odbc3 +2.lib" "C:\Program Files\Micro soft Visual Studio\VC98\lib\odbccp32.lib" "C:\Program Files\Microsoft +Visual Studio\VC98\lib\msvcrt. lib" -def:PNG.def Creating library blib\arch\auto\Tk\PNG\PNG.lib and object blib\arch +\auto\Tk\PNG\PNG.exp C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e chmod 755 blib\arch\ auto\Tk\PNG\PNG.dll C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e cp PNG.bs blib\arch\ auto\Tk\PNG\PNG.bs C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::C +ommand -e chmod 644 blib\arch\ auto\Tk\PNG\PNG.bs E:\dev\new\Tk-PNG-2.005>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. C:\Perl\bin\perl.exe -Mblib -IC:\Perl\lib -IC:\Perl\lib -e "us +e Test::Harness qw(&runtests $ verbose); $verbose=0; runtests @ARGV;" t\basic.t Using E:/dev/new/Tk-PNG-2.005/blib t\basic....dubious Test returned status 5 (wstat 1280, 0x500) DIED. FAILED tests 2-4 Failed 3/4 tests, 25.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t\basic.t 5 1280 4 3 75.00% 2-4 Failed 1/1 test scripts, 0.00% okay. 3/4 subtests failed, 25.00% okay. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2' Stop. E:\dev\new\Tk-PNG-2.005>
      at nmake test I get a stupid application error ( blah blah, the memory could not be read) </CODE>

       
      ______crazyinsomniac_____________________________
      Of all the things I've lost, I miss my mind the most.
      perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

        Indeed, there were two exactly same places with that incompatibilities between Borland C++ and MSVC++ compilers, and I forgot to mention them earlier. In order to compile, I edited that file in error (zconf.h) in two places just to throw away a couple of lines for Borland compiler some version, so I stepped forward, and that was like a right direction.

        Seems to me like "MakeMaker" is to blame here. Although I saw following places:

        #if (defined(__BORLANDC__)&&(__BORLANDC__<=0x520)) \ || (defined(__MINGW32__) && !defined(_ANONYMOUS_UNION)) ....... #endif
        in perl source code distribution, which are essentially same as we faced.

        BTW do you wish for me to email my build directory for reference? It's ~1Mb in size.

        addition: may be we should prepare compatibility patch for miscellaneous compilers on win32 systems and sent it to author of a module?

        Courage, the Cowardly Dog

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2014-11-29 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls