in reply to Re^12: trying to build PAR-Packer-1.002
in thread trying to build PAR-Packer-1.002

Hi Rob

Please don't apologise for the time I am spending following your suggestions, I really appreciate the time you are spending thinking through and giving me suggestions. It should be me apologising to, you for having this weird problem that you are kindly helping me out with.

On to the results of those steps...

When I tried to make test in the newly created and unpacked C:/mybuild/PAR-Packer-1.002 folder, I got the same errors.

When I submitted the long g++ command, it did not report any errors and it had executed very quickly, having generated the following file:

20/03/2010  10:53            71,235 par.exe

So I re-did the dmake test and unfortunately got the same error.

Do you know if there is any way I can test the package that coffgen.c is in, outside of doing a full blown build of PAR-Packer?

If there is, do you think it's worth me trying that?

Thank you for all your help so far

Richard

Replies are listed 'Best First'.
Re^14: trying to build PAR-Packer-1.002
by syphilis (Archbishop) on Mar 21, 2010 at 07:54 UTC
    So I re-did the dmake test and unfortunately got the same error.

    Did it try to rebuild par.exe and throw the same error ? Or, this time, was it trying to build static.exe ? If it was trying to build static.exe, just apply the same workaround - ie 'cd' to myldr folder, run C:\Perl\site\bin\g++.exe static.o -L"C:\Perl\lib\CORE" C:\Perl\lib\CORE\perl510.lib  -o static.exe then 'cd ..' and rerun 'dmake test'.

    The only difference between the commands as I've written them, and the way they were originally run, is that I've removed the links to the standard libraries (as those links are unnecessary in this situation anyway). While I don't see that they should cause the breakage, their removal has apparently helped wrt building of par.exe.

    In the meantime I'll try to work out why linking to those libraries causes the breakage. When I build PAR-Packer-1.002, the building of par.exe and static.exe doesn't link to those standard libraries - which might be the only reason it's working for me. (I'll see if I can make the build process link to those libraries - maybe then I'll get to see the same failure as you.)

    What version of ExtUtils::MakeMaker are you running ? perl -MExtUtils::MakeMaker -e "print $ExtUtils::MakeMaker::VERSION" will tell you.

    Cheers
    Rob
      Hi Rob

      Thanks for that, I hadn't noticed that last set of errors were against static.exe instead of par.exe

      Which means we are making some progress !! :)

      So I did the workaround for static.exe "C:\Perl\site\bin\g++.exe static.o -L"C:\Perl\lib\CORE" C:\Perl\lib\CORE\perl510.lib -o static.exe"

      Then I did dmake test, which resulted in the below. It is getting a lot further, now that I have built par.exe and static.exe the longhand way.

      Here is what version of Makemaker I have

      C:\mybuild\PAR-Packer-1.002>perl -MExtUtils::MakeMaker -e "print $ExtU +tils::Make Maker::VERSION Set up gcc environment - 3.4.5 (mingw-vista special r3) 6.55_02

      Do you know what I can try now?

      Thank you

      Richard

      C:\mybuild\PAR-Packer-1.002>dmake test dmake.exe: Warning: -- Found file corresponding to virtual target [mk +tmpdir.h]. dmake.exe: Warning: -- Found file corresponding to virtual target [mk +tmpdir.c]. dmake.exe: Warning: -- Found file corresponding to virtual target [ma +in.c]. C:\Perl\bin\perl.exe -e "chmod(oct('0600'), '..\blib\lib\PAR\StrippedP +ARL\Static.pm');" C:\Perl\bin\perl.exe encode_append.pl static.exe ..\blib\lib\PAR\Strip +pedPARL\Static.pm C:\Perl\bin\perl.exe -e "chmod(oct('0444'), '..\blib\lib\PAR\StrippedP +ARL\Static.pm');" C:\Perl\bin\perl.exe -e "chmod(oct('0600'), '..\blib\lib\PAR\StrippedP +ARL\Dynamic.pm');" C:\Perl\bin\perl.exe encode_append.pl par.exe ..\blib\lib\PAR\Stripped +PARL\Dynamic.pm C:\Perl\bin\perl.exe -e "chmod(oct('0444'), '..\blib\lib\PAR\StrippedP +ARL\Dynamic.pm');" C:\Perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e "cp" -- script/par +ldyn.exe blib\script\parldyn.exe C:\Perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e "cp" -- script/par +l.exe blib\script\parl.exe C:\Perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e "cp" -- script/tkp +p blib\script\tkpp pl2bat.bat blib\script\tkpp C:\Perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e "cp" -- script/pp +blib\script\pp pl2bat.bat blib\script\pp C:\Perl\bin\perl.exe "-Iinc" -MExtUtils::Command -e "cp" -- script/par +.pl blib\script\par.pl pl2bat.bat blib\script\par.pl C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, ' +inc', 'blib\lib', 'blib\arch')" t/00-pod.t t/10-parl-generation.t t/ +20-pp.t t/30-current_ exec.t t/40-packer_cd_option.t t/00-pod.t ............... skipped: Set environment variable PERL_TEST +_POD=1 to test POD t/10-parl-generation.t ... ok t/20-pp.t ................ 31/34 Can't call method "remove" on an unde +fined value at C:/Perl/site/lib/Win32/Exe.pm line 220. # Failed test 'pp_gui_tests # amsg572: sub pp_gui_tests cannot system pp --gui --icon hi.ico -o he +llo.exe hello.pl:No such file or directory: # ' t/20-pp.t ................ 32/34 # at automated_pp_test.pl line 8445 +. t/20-pp.t ................ 34/34 # Looks like you failed 1 test of 34. t/20-pp.t ................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/34 subtests t/30-current_exec.t ...... # Please wait t/30-current_exec.t ...... ok t/40-packer_cd_option.t .. ok Test Summary Report ------------------- t/20-pp.t (Wstat: 256 Tests: 34 Failed: 1) Failed test: 32 Non-zero exit status: 1 Files=5, Tests=71, 811 wallclock secs ( 0.19 usr + 0.02 sys = 0.20 C +PU) Result: FAIL Failed 1/5 test programs. 1/71 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic'
        It's only one test that has failed (and it fails for me, too, btw) - looks like there's a problem locating PAR-Packer-1.002\contrib\automated_pp_test\hi.ico.

        I'd be tempted to just run 'dmake install' and then start using the module and see how it goes. If you don't mess around with icon files you may well find that your PAR-Packer works perfectly well for you.
        And if the problem that caused that test failure ever does jump up and bite you, then that's probably the time to investigate further.

        One thing you could try is to open contrib/automated_pp_test.pl and change:
        my $cmd = 'pp --gui --icon hi.ico -o ' . "$hello_executable $hello_pl_ +file";
        to:
        my $cmd = 'pp --gui --icon C:/mybuild/PAR-Packer-1.002/contrib/hi.ico +-o ' . "$hello_executable $hello_pl_file";
        Then re-run 'dmake test' and see if the failing test then passes. I'll give that a go myself, when I get a chance. (All we've done is specify the full path to hi.ico.)

        I should point out (the obvious) that you shouldn't have to engage in those silly hacks that we've used to get to this point - and I'll try to work out why they were necessary. But there aren't too many modules that venture into the areas that PAR-Packer visits, so it's quite likely that you won't ever come across the same problem again. (Please be sure to /msg me if you do.)

        Cheers,
        Rob