I'm trying to install some extra modules in the git bash perl on windows. I got stuck trying to get ExtUtils::ParseXS
installed. I was able to get the C part compiled (that's the hard part), but then it stops with this error: make: *** No rule to make target '/usr/lib/perl5/core_perl/Config.pm', needed by 'makefile'. Stop.
The strange thing is, that /usr/lib/perl5/core_perl/Config.pm
exists!
Here are the parts of the (generated) Makefile that's failing (full Makefile is too large for stackoverflow):
# This Makefile is for the ExtUtils::ParseXS extension to perl.
...
DIRFILESEP = /
DFSEP = $(DIRFILESEP)
PERL_ARCHLIBDEP = /usr/lib/perl5/core_perl
FIRST_MAKEFILE = Makefile
...
# Where is the Config information that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h
...
# We take a very conservative approach here, but it's worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.
$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
$(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
$(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
$(PERLRUN) Makefile.PL
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
$(FALSE)
I'm running the make command in git bash. Any help would be appreciated!
"Git bash" is a bash built using MSYS, a unix emulation environment.
You are using a Windows build of make
, and you expect it to interact with that virtual unix environment. Only programs built using MSYS can do that.
As such, you need to figure out how to install a make
built using MSYS.
Unless you have a particular reason to use the bash provided by git, I suggest using an alternative. I suspect it will be a lot easier.
It looks like MSYS2 has a package manager, and might be a lot more usable. But I know nothing about it.
You could use Cygwin. It's unix emulation environment just like MSYS. It provides bash. But not just bash. It provides git, perl, make, python, and a whole lot more through its package manager. The package manager has an easy-to-use Windows GUI interface (as well as a command-line interface). (The Cygwin installer itself is the package manager. Re-run it any time to update, remove or add packages.) I've used this for a long time, and I still do a little.
I now use Ubuntu installed under Windows Subsystem for Linux v2. Think of WSL as a VM for Linux built into Windows. Relatively easy to install. (No need for partitions or anything like that.) The host can access the VM's files (through \\WSL$
) and vice-versa (through /mnt/c
), but the programs are native Linux programs; they will only run inside of the VM. A number of Linux distros are available.