Barry Dick
Barry Dick

Reputation: 161

How do I install mod_perl using cpan for Apache httpd 2.4.41 (xampp) on windows?

I am trying to install a CPAN package (Apache::MP3), for which it requires a number of prerequisites including mod_perl-2.0.11 on Perl and Apache. According to previous question / answer, I may need Visual Studio (both previously compiled using VS) in order to even compile mod_perl module. Which doesn't make sense if perl is included with XAMPP.

But before I got to this point, I had to install dmake (C:\xampp\c\bin\dmake.exe) which I downloaded from CPAN, and extracted myself by placing it into the xampp directory in ...\c\bin... I also downloaded apxs.bat and placed it inside the xampp\apache\bin directory. Next I required a gcc compiler to build the library / modules according to previous errors.

I am now trying to follow the list of errors as I getting them, in order to be successful with the project. The original module (Apache::MP3) isn't important, as I just wanted to be sure that Perl worked in XAMPP. I can in fact use it as a cgi, but the mod_perl is not included with the installation.

The problem I am having is while trying to build while using gcc first with cygwin (which I placed all inside my PATH) ...

\xampp\perl\lib\CORE/win32.h:106:10: fatal error: direct.h: No such file or directory
  106 | #include <direct.h>
      |          ^~~~~~~~~~
compilation terminated.
dmake:  Error code 129, while making 'mod_perl.lo'
dmake.exe:  Error code 255, while making 'modperl_lib'

and then with C:\MinGW\bin, I am getting this error message ...

C:\xampp\apache\include/http_log.h:37:10: fatal error: syslog.h: No such file or directory
37 | #include <syslog.h>
      |          ^~~~~~~~~~
compilation terminated. dmake:  Error code 129, while making 'mod_perl.lo'
dmake.exe:  Error code 255, while making 'modperl_lib'

This error has to do with the compiler and access to its built-in headers that have to do with windows. I tried adding the libraries directory to the PATH (restarted cmd.exe) as well, which had 0 effect. The next thing I might have to do is actually open the Makefile.PL and append the parameters to tell gcc where to find its own header files. Would I be better off installing each component and getting a copy of VS compiler?

Upvotes: 4

Views: 720

Answers (0)

Related Questions