Problems locating C++ compiler / linker / make during installation of a module via CPAN

N

Niall

I am running ActiveState Perl 5.8.3 on windows 2000.

I have tried to install the DBI module and appear to have problems du
to spaces in the pathname of nmake.exe and the compiler / linker.

I have both Visual Studio 6 and Visual Studio .Net installed and on
trying

cpan> install DBI

I get the following (after the extraction / copying of the files)

<snip>
Extracted dbiproxy from dbiproxy.PL with variable substitutions.
C:\Perl\bin\perl.exe -MExtUtils::Command -e cp dbiproxy
blib\script\dbiproxy
pl2bat.bat blib\script\dbiproxy
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE -- OK
Running make test
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE test --
NOT OK
Running make install
make test had returned bad status, won't install without force
<end>

Can someone please give advice as to how I pick up the correct
environment for the make / linker / compiler etc ?

Perl -V returns me the following

<snip>
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Perl\lib\CORE" -machine:x86'
libpth=C:\PROGRA~1\MICROS~3\VC98\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.
lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86
'
<end>

Thanks
 
N

Niall

Sorry - forgot to mention I have checked the FAQ , the CPAN FAQ and all
the O'Reilly books (Perl CD Bookshelf) but have been unable to find the
answer so far .
 
S

Sisyphus

Niall said:
I am running ActiveState Perl 5.8.3 on windows 2000.

I have tried to install the DBI module and appear to have problems du
to spaces in the pathname of nmake.exe and the compiler / linker.

I have both Visual Studio 6 and Visual Studio .Net installed and on
trying

Use VS 6 with ActiveState perl. (.Net will often work ok with AS perl, but
there's a potential for conflict. If you want to use .Net with perl, it's
recommended that you build perl from source using that compiler.)

If you want to save yourself some trouble you can:
ppm install http://theoryx5.uwinnipeg.ca/ppms/DBI.ppd

[snip]
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE -- OK
Running make test
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

[snip]

The problem here is that you've installed the compiler into a path that
contains spaces. Best not to do that.
However, on one machine I, too, have Visual Studio installed in a path
containing spaces - but it's not causing me any problems when it comes to
building perl modules. Either that's because I don't use CPAN.pm, or it's
because I always set the build environment by running VC98\bin\vcvars32.bat
(and you're doing it some other way). So ... if you *are* doing it "some
other way", try running vcvars32.bat instead - and see if that helps.

Otoh, if CPAN.pm (or the way you've configured it) has some involvement in
the problem, then you'll have to stay tuned for advice from someone familiar
with it.

Cheers,
Rob
 
N

Niall

Thanks for the advice Sisyphus -

I tried using ppm to install the module and it worked like a dream.

I will use this in future instead of CPAN since it seems it is a far
easier option when using Active Perl (I have previously only ever used
CPAN in a Solaris / Linux environment)
 
N

Niall Macpherson

Niall said:
Thanks for the advice Sisyphus -

I tried using ppm to install the module and it worked like a dream.

I will use this in future instead of CPAN since it seems it is a far
easier option when using Active Perl (I have previously only ever used
CPAN in a Solaris / Linux environment)

ppm worked very well for the DBD module, however I was unable to get
the DBI::Informix module and once I had enquired via the
comp.databases.informix group I was advised by Jonathan Leffler to
revert to using CPAN.

I have run the script C:\PROGRA~1\MICROS~1.NET\Vc7\bin\vcvars32.bat
before attempting the CPAN install and I now have an environment which
contains the path as follows -

Path=C:\Program Files\Microsoft Visual Studio
..NET\Common7\IDE;C:\Program Files\Microsoft Visual Studio
..NET\VC7\BIN;C:\
Program Files\Microsoft Visual Studio .NET\Common7\Tools;C:\Program
Files\Microsoft Visual Studio .NET\Common7\Tools\bin
\prerelease;C:\Program Files\Microsoft Visual Studio
..NET\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio .NE
T\FrameworkSDK\bin;C:\WINNT\Microsoft.NET\Framework\v1.0.3705;c:\PROGRA~1\informix\bin;C:\Perl\bin\;C:\WINNT\system32;C:
\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Informix\bin;C:\Program
Files\Informix\lib\bin;C:\Program Files\Microsoft
Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual
Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft
Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual
Studio\VC98\bin;

However when I try to install the DBI::Informix module get a message
saying

CPAN.pm: Going to build J/JO/JOHNL/DBD-Informix-2005.01.tar.gz

==> ExtUtils::AutoInstall 0.4 required. Install it from CPAN? [Y/n]
*** Installing ExtUtils::AutoInstall

It is then after the extraction of all the AutoInstall files that I get
the message

*** ExtUtils::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for ExtUtils::AutoInstall

Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/ExtUtils/AutoInstall.pm blib\lib\ExtUtils\AutoInstall.pm
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE -- OK
Running make test
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE test --
NOT OK
Running make install


Do I need to set up my environment so that my entire path contains the
short directory names rather than those with spaces , or is there an
easier way ?

Also why is it picking up the VC98 path (VS6) rather than the VS .NET
path (Microsoft Visual Studio .NET)

Am I likely to see this problem repeated every time I try to install
using CPAN ?

Sorry if I am sounding a bit dense here and have missed something
obvious but I have been battling with this for some time now and seem
to keep hitting brick walls :(

Thanks

Niall
 
S

Sisyphus

Niall Macpherson said:
However when I try to install the DBI::Informix module get a message
saying

CPAN.pm: Going to build J/JO/JOHNL/DBD-Informix-2005.01.tar.gz

==> ExtUtils::AutoInstall 0.4 required. Install it from CPAN? [Y/n]
*** Installing ExtUtils::AutoInstall

It is then after the extraction of all the AutoInstall files that I get
the message

*** ExtUtils::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for ExtUtils::AutoInstall

Microsoft (R) Program Maintenance Utility Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/ExtUtils/AutoInstall.pm blib\lib\ExtUtils\AutoInstall.pm
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE -- OK
Running make test
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE test --
NOT OK
Running make install


Do I need to set up my environment so that my entire path contains the
short directory names rather than those with spaces , or is there an
easier way ?

Possibly (not sure whether that will help). What happens when you try to
build without using CPAN.pm ? (ie download
http://search.cpan.org/CPAN/authors/id/J/JO/JOHNL/DBD-Informix-2005.01.tar.gz ,
extract it, cd to the folder that contains the Makefile.PL, and run,
successively:
perl Makefile.PL
nmake test
nmake install (if 'nmake test' went ok).

If you get errors, let us know what they were.
Also why is it picking up the VC98 path (VS6) rather than the VS .NET
path (Microsoft Visual Studio .NET)

Don't know exactly - but with ActiveState perl it's better that you use VS6
anyway.
You could just reset the path to whatever you want. (It may be something in
your CPAN.pm configuration that's causing VS6 to be found.)
Am I likely to see this problem repeated every time I try to install
using CPAN ?

Possibly (again, not sure). The fix is probably simple, but I don't use
CPAN.pm so I don't know what that fix is.
All I really know for certain is that spaces in the directory name (of the
compiler) is not a problem for me.
Sorry if I am sounding a bit dense here and have missed something
obvious but I have been battling with this for some time now and seem
to keep hitting brick walls :(

I note that version 2003.03.0401 built successfully on Win32 perl5.6.1 (no
test reports at all for the latest version), so there's a good chance you'll
succeed eventually :)

Cheers,
Rob
 
A

Andy Hassall

Extracted dbiproxy from dbiproxy.PL with variable substitutions.
C:\Perl\bin\perl.exe -MExtUtils::Command -e cp dbiproxy
blib\script\dbiproxy
pl2bat.bat blib\script\dbiproxy
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE -- OK
Running make test
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE test --
NOT OK
Running make install
make test had returned bad status, won't install without force
<end>

Can someone please give advice as to how I pick up the correct
environment for the make / linker / compiler etc ?

Start a CPAN shell and change the make config option to use an 8.3 path
instead of the path with spaces.

e.g. on my system:

cpan> o conf make d:/PROGRA~1/MICROS~2.NET/Vc7/bin/nmake.exe
make d:/PROGRA~1/MICROS~2.NET/Vc7/bin/nmake.exe

cpan> o conf commit
commit: wrote C:/Perl/lib/CPAN/Config.pm

(You have to either reverse the slashes or double them, else they're
interpreted as escapes)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top