jffry has asked for the wisdom of the Perl Monks concerning the following question:
EDIT: While I use dmake to illustrate the problem in the examples below, I originally got these results from simply running cpan <module name>. That is, I am not doing anything unusual (that I know of) when trying to download/build/install these modules.
The initial error looks like this:
C:\strawberry\cpan\build\Math-Pari-2.01080605-0ZIRgM > dmake dmake: Error: -- `C:\strawberry\perl\libConfig.pm' not found, and can +'t be made
It doesn't matter too much which module it is. This happen in a few other modules. For example:
C:\strawberry\cpan\build\IO-React-1.03-52FBIM > dmake dmake: Error: -- `C:\strawberry\perl\libConfig.pm' not found, and can +'t be made
I did find a discussion on this topic, which mirrors my own struggle (except I don't have nmake). However, our problems diverge right at the "I've found the problem..." post. That is, his fix in ActivePerl's Config.pm doesn't look anything like the Config.pm in Strawberry.
What I did to attempt to solve this...
It seems fairly clear that the backslash is missing. There is no file C:\strawberry\perl\libConfig.pm but there certainly is a file C:\strawberry\perl\lib\Config.pm
Taking a look at IO::React's Makefile (with line numbers) where it references Config.pm, I see:
162 # Where is the Config information that we are using/depend on 163 CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)co +nfig.
Where DFSEP gets defined earlier in the file, I see:
52 DIRFILESEP = \ 53 DFSEP = $(DIRFILESEP)
I tried a few modifications, but making it equal to double-backslash seemed to be the fix.
52 DIRFILESEP = \\ 53 DFSEP = $(DIRFILESEP)
But that creates a new problem all together.
C:\strawberry\cpan\build\IO-React-1.03-52FBIM > dmake CreateProcess failed (2). dmake: Error executing 'rem': No such file or directory dmake: Error code -1, while making 'blibdirs'
So let's look at the blibdirs target.
310 # --- MakeMaker blibdirs section: 311 blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).e +xists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exis +ts $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MA +N1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists 312 $(NOECHO) $(NOOP)
Looking at value of NOECHO and NOOP variables:
205 NOOP = rem 206 NOECHO = @
So I'm guessing that these 2 variables together are supposed to be a DOS comment statement with a do-not-echo-to-terminal flag. So I guess that means they are being evaluated in the wrong context somehow. But I can still type that command at the prompt and get no errors:
C:\strawberry\cpan\build\IO-React-1.03-52FBIM > @rem C:\strawberry\cpan\build\IO-React-1.03-52FBIM >
So at this point, I don't know where to go next. Additionally, I am highly suspicious of the entire Makefile output. It feels like something more fundamental is broken, and that no amount of Makefile tweaking will fix this.
So, any ideas?
UPDATE: 2012-02-16, I still can't get a single CPAN module to build even when using a clean installation of Strawberry Perl. I'll document any new steps I take to debug this problem.
UPDATE: 2012-02-17, Solved. Thanks everyone and especially Anonymous.
UPDATE: 2012-02-17, And root cause found. Some ThinkPad software created a Make env var for me.
|
|---|