I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-02-17 21:08:25.967156-08 by alluckyone
Cannot build PAR-Packer-1.002 using Visual C++ on Windows
Cannot build PAR-Packer-1.002 using Visual C++ (2003 or 2007 the same) on Windows and perl 5.8.6. Here is the log. Also, there is a report online on that at http://trouchelle.com/perl/ppmrepview.pl?id=52106&v=8 (not mine). C:\Perl\bin\perl.exe "-Minc::Module::Install" -e "extract_par(q(PAR-Packer-1.002-MSWin32-x86-multi-thread-5.8.6.par))" nmake -f Makefile all -nologo cl -c -Zm1000 -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_C ONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -I"C:\Perl\lib\CORE" -DPARL_EXE=\"parl.exe\" -MD -Zi -DNDEBUG -O1 main.c main.c c1 : warning C4349: /Gf is deprecated and will not be supported in future versions of Visual C++; remove /Gf or use /GF instead c:\Downloads\par\PAR-Packer-1.002\myldr\mktmpdir.c(178) : warning C4013: 'strcasecmp' undefined; assuming extern returning int main.c(115) : error C2143: syntax error : missing ';' before 'type' main.c(116) : error C2065: 'argno' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN\nmake.exe"' : return code '0x2' Stop.
Direct Responses: 12797 | Write a response
Posted on 2010-06-23 14:09:39.519032-07 by kheila in response to 12424
Re: Cannot build PAR-Packer-1.002 using Visual C++ on Windows
After spending hours trying to get PAR-Packer installed using Visual Studio on Windows 7, here's the magic formula that finally worked for me. Hopefully this will help someone else with the same problem.

1) First you need to fix some source files. Open main.c from the "myldr" directory in the PAR-Packer directory you extracted from the tar.gz archive (here). Remove the declaration "int argno = 0" from line 116, and put it just after the "main" definition, like this:
int main ( int argc, char **argv, char **env ) { int exitstatus; int i; int argno = 0; ...

Next, add the following block just after the first line in myldr/mktmpdir.c :
#ifdef _MSC_VER #define snprintf _snprintf #if _MSC_VER < 1500 #define vsnprintf _vsnprintf #else #define ssize_t SSIZE_T #define uint32_t UINT32 #endif #define strncasecmp _strnicmp #define strcasecmp _stricmp #else #ifdef __MINGW32__ #define WINSOCK_VERSION MAKEWORD(2,0) #else #define strncasecmp strnicmp #define strcasecmp stricmp #endif /* __MINGW32__ */ #endif /* _MSC_VER */

Remember to save both files.
(thanks to this for both of these tips)

2) Open up the command prompt from the Visual Studio directory, NOT the normal command prompt. There should be a link under Start-->All Programs-->Microsoft Visual Studio 2005-->Visual Studio Tools-->Visual Studio 2005 Command Prompt.
3) From this command prompt, navigate to the PAR-Packer directory.
4) Enter the following command: 'perl Makefile.pl'
5) Enter the following command: 'nmake'
This will result in an error.
6) Enter the following command: 'nmake test'
7) Enter the following command again: 'nmake'
8) Enter the following command: 'nmake install'

Once again, this worked for me while using Visual Studio 8, Windows 7, and Perl 5.10.0. It might work for other versions.
Direct Responses: 12809 | Write a response
Posted on 2010-07-05 06:07:00.331133-07 by roderich in response to 12797
Re: Cannot build PAR-Packer-1.002 using Visual C++ on Windows

FYI: Step 1 of the above is not necessary anymore for PAR::Packer 1.006 and above (the changes have been incorporated).

Ad step 2: What you really need is that your PATH must include the directory where the actual C compiler (cl.exe IIRC) lives (Visual Studio's, but the same advice holds when using MingW as well). If you then run the CPAN shell with this PATH, it will correctly detect your installed C compiler and the will try to use that when build PAR::Packer. Also, nmake (or dmake) must be found in your PATH.

Maybe the Visual Studio C compiler itself needs some additional environment settings, in old times (when I had access to Visual Whatever) there was a .bat script somewhere that set up PATH and all other variables.
Steps 3-8 are just the sequence of commands that the CPAN shell runs when you do "install PAR::Packer", except for the strange error in step 5 (that seems to magically disappear when repeated). If this error is still there, the CPAN shell will stop at this point. PAR::Packer 1.001 - 1.005 contained a bug that might have triggered this behaviour which is fixed in 1.006 (can't tell, because the actual error message isn't in the above post).
So my advice is: after you set up your PATH as described above, just try installing PAR::Packer >= 1.006 via the CPAN shell.
Oh, and another thing: Perl 5.10.0 breaks PAR::Packer. Any Perl version below or above is fine, but 5.10.0 breaks PAR::Packer's method to intercept the loading of "glue" DLLs. Your PAR::Packer may appear to work as long as you run your packed executables on the same machine where you generated them (or on a machine with the exact same Perl installation). The trouble starts when you run the packed executable on a machine that has no Perl installed or a different version of Perl than on the build machine.
Direct Responses: 12930 | Write a response
Posted on 2010-09-09 01:46:13.80077-07 by caminac in response to 12809
Re: Cannot build PAR-Packer-1.002 using Visual C++ on Windows
Hi the problem is still present in PAR::Packer 1.006 anyway using VC++ 6 with perl 5.10.1 it can be fixed with the 2 patches described above C.
Direct Responses: 12931 | Write a response
Posted on 2010-09-09 02:00:22.642716-07 by roderich in response to 12930
Re: Cannot build PAR-Packer-1.002 using Visual C++ on Windows
Me bad, theses patches were committed after 1.006 was released, but will definitely be in 1.007.
Direct Responses: Write a response