rich_d_thomas has asked for the wisdom of the Perl Monks concerning the following question:


Hi,

I have a similar problem to the one I had in trying to build PAR-Packer-1.002 but on a new install of Activestate perl (v5.14.2) 32-bit.

My dmake is at version 4.11.20080107 and MinGW is at version 5.1.4.1

The problem I have is at the dmake stage of PAR-Packer-1.012, below is the output of my PAR-Packer build process.

I have also reminded myself what I've done in the past by reading the advice that's in the thread link above. I think the reason is that my problem is not exacly the same as previous problems I have encountered.

Does anybody have any thoughts about this that could help me.

Thanks in advance,

Richard.


C:\mybuild\PAR-Packer-1.012>perl Makefile.PL Set up gcc environment - 3.4.5 (mingw-vista special r3) Checking if your kit is complete... Looks good Prototype mismatch: sub main::prompt: none vs ($;$) at C:/Perl/lib/Ext +Utils/Make Maker.pm line 218 Writing Makefile for par.exe Writing MYMETA.yml Writing Makefile for PAR::Packer Writing MYMETA.yml C:\mybuild\PAR-Packer-1.012>dmake Set up gcc environment - 3.4.5 (mingw-vista special r3) cp lib/App/Packer/PAR.pm blib\lib\App\Packer\PAR.pm cp lib/PAR/Packer.pm blib\lib\PAR\Packer.pm cp lib/PAR/Filter/Obfuscate.pm blib\lib\PAR\Filter\Obfuscate.pm cp lib/PAR/Filter/PodStrip.pm blib\lib\PAR\Filter\PodStrip.pm cp lib/PAR/StrippedPARL/Base.pm blib\lib\PAR\StrippedPARL\Base.pm cp lib/PAR/Filter.pm blib\lib\PAR\Filter.pm cp lib/PAR/Filter/PatchContent.pm blib\lib\PAR\Filter\PatchContent.pm cp lib/PAR/Filter/Bytecode.pm blib\lib\PAR\Filter\Bytecode.pm cp lib/pp.pm blib\lib\pp.pm cp lib/PAR/Filter/Bleach.pm blib\lib\PAR\Filter\Bleach.pm C:\Perl\bin\perl.exe file2c.pl -s ..\script\par.pl my_par_pl.c load_my +_par_pl C:\Perl\bin\perl.exe sha1.c.PL C:/Perl/site/bin/gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -D +PERL_TEXTM ODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICI +T_SYS -DUS E_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-aliasing -mms- +bitfields -I"C:\Perl\lib\CORE" -DPARL_EXE=\"parl.exe\" -O2 main.c C:\Perl\site\bin\g++.exe main.o win32.coff -s -L"C:\Perl\lib\CORE" +C:\Perl\li b\CORE\perl514.lib C:\Perl\site\lib\auto\MinGW\lib\libkernel32.a C:\Pe +rl\site\li b\auto\MinGW\lib\libuser32.a C:\Perl\site\lib\auto\MinGW\lib\libgdi32. +a C:\Perl\ site\lib\auto\MinGW\lib\libwinspool.a C:\Perl\site\lib\auto\MinGW\lib\ +libcomdlg3 2.a C:\Perl\site\lib\auto\MinGW\lib\libadvapi32.a C:\Perl\site\lib\aut +o\MinGW\li b\libshell32.a C:\Perl\site\lib\auto\MinGW\lib\libole32.a C:\Perl\site +\lib\auto\ MinGW\lib\liboleaut32.a C:\Perl\site\lib\auto\MinGW\lib\libnetapi32.a +C:\Perl\si te\lib\auto\MinGW\lib\libuuid.a C:\Perl\site\lib\auto\MinGW\lib\libws2 +_32.a C:\P erl\site\lib\auto\MinGW\lib\libmpr.a C:\Perl\site\lib\auto\MinGW\lib\l +ibwinmm.a C:\Perl\site\lib\auto\MinGW\lib\libversion.a C:\Perl\site\lib\auto\Min +GW\lib\lib odbc32.a C:\Perl\site\lib\auto\MinGW\lib\libodbccp32.a C:\Perl\site\li +b\auto\Min GW\lib\libcomctl32.a C:\Perl\site\lib\auto\MinGW\lib\libmsvcrt.a -o pa +r.exe C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\m +ingw32\bin \ld.exe: warning: C:\Perl\site\lib\auto\MinGW\lib\libmsvcrt.a(dcfls006 +33.o): loc al symbol ` ' has no section C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\m +ingw32\bin \ld.exe: warning: C:\Perl\site\lib\auto\MinGW\lib\libmsvcrt.a(dcfls006 +33.o): loc al symbol `5has_denorm_lossE' has no section C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\m +ingw32\bin \ld.exe: final link failed: Bad value collect2: ld returned 1 exit status dmake.exe: Error code 129, while making 'par.exe' dmake.exe: Error code 255, while making 'subdirs' C:\mybuild\PAR-Packer-1.012>

Replies are listed 'Best First'.
Re: Trying to use MinGW
by marto (Cardinal) on Feb 15, 2012 at 13:04 UTC

    Have you considered using Strawberry Perl rather than ActiveState? A combination of Strawberry Perl and a portable minicpan I find makes working on Windows much easier. Alternatively have you searched additional repositories (see PPM::Repositories) for this version of PAR::Packer?

Re: Trying to use MinGW
by moritz (Cardinal) on Feb 15, 2012 at 12:47 UTC

    I'm really not an expert for Perl on Windows, but I think it's a bad idea to combine ActivePerl and MinGW.

    If I remember correctly, ActivePerl is built with Microsoft's Visual C, and Strawberry Perl is built with MinGW.

    Deviating from the those compiler+Perl combinations is a certain recipe for desaster, so don't do that.

      Actually, if you install the MinGW and dmake packages from the default PPM repository for that install of ActivePerl, you'll be fine.

      Here's a cut & paste from ActiveState's documentation on ActivePerl 5.14 (link to doc):

      Building modules from source requires the following components:

      Windows:

      I think it's a bad idea to combine ActivePerl and MinGW.

      ActivePerl will actively install MinGW if needed. Seems to speak to the contrary.

      If I remember correctly, ActivePerl is built with Microsoft's Visual C, and Strawberry Perl is built with MinGW.

      Perl gives MinGW an option to create objects compatible with MS's compiler. (IIRC, it's almost entirely compatible without this flag too.)

      Then why does activestate provide MinGW via ppm?

Re: Trying to use MinGW
by dasgar (Priest) on Feb 15, 2012 at 18:46 UTC

    Personally, I haven't really seen any issues installing Par::Packer on various builds of ActivePerl 5.12 & 5.14. However, it looks like you're trying to download the tarball from CPAN, uncompress it and manually trying to build and install the module. Since I have not tried that process myself on this module, I really can't offer any pointers on going that route.

    Here's the steps that I would take to install Par::Packer after a fresh install of ActivePerl:

    • Using PPM, install MinGW and dmake. (I typically use the GUI version of PPM, but I don't see why the line command version wouldn't work.)
    • Install Par::Packer from CPAN by running the following from a command prompt: cpan install Par::Packer

    That's pretty much it. If you're behind web proxy, you might need to configure the http_proxy setting for the CPAN module or add the http_proxy environment variable to the OS.

    I believe that for some reason that a dependency or two failed to install for me in a few cases. When that happened, I installed those via PPM (if they were available from there) or via CPAN and then retried to install Par::Packer via CPAN.

    Give the above steps a shot. If you run into any problems with that, come back and post what happened along with the error messages.

      Give the above steps a shot.

      Those are the same steps. cpan runs perl Makefile.PL ... for you

      Hi

      Thank you all for all your replies

      The first thing I tried from all the suggestions was to install Par-Packer by using the cpan shell.

      This worked absolutely fine, so I'm now a happy bunny :)

      Thanks again

      Richard
Re: Trying to use MinGW
by ikegami (Patriarch) on Feb 15, 2012 at 20:15 UTC
    It says it's using 3.4.5, not 5.1.4.1. It's picking up the mingw it installed itself, not any you might have installed independently. I don't know if that makes any difference to you.
        ah ok. Thanks