This question already has an answer here:
dmake not found when installing Perl module using CPAN
(1 answer)
Closed 2 years ago.
When trying to install Win32::API from CPAN using Active Perl, the installation isn't successful. The problems stem from the following error:
'dmake' is not recognized as an internal or external command,
How can I resolve this problem?
Full output of cpan Win32::API:
Loading internal logger. Log::Log4perl recommended for better logging
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Sat, 21 Mar 2020 04:17:03 GMT
CPAN: LWP::UserAgent loaded ok (v6.31)
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.69)
Reading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.092)
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
Database was generated on Sun, 22 Mar 2020 05:41:03 GMT
.............
New CPAN.pm version (v2.27) available.
[Currently running version is v2.20]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Reading 'C:\Perl64\cpan\sources\modules\03modlist.data.gz'
DONE
Writing C:\Perl64\cpan\Metadata
Running install for module 'Win32::API'
CPAN: Digest::SHA loaded ok (v6.01)
Checksum for C:\Perl64\cpan\sources\authors\id\B\BU\BULKDD\Win32\Win32-API-0.84.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
Win32-API-0.84/
....
Win32-API-0.84/Type.pm
Win32-API-0.84/TYPEMAP
Win32-API-0.84/typemap56
Win32-API-0.84/W32ATest.pm
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20181129_28)
Configuring B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Encode::compat 0 not found.
Warning: prerequisite Math::Int64 0 not found.
Writing MYMETA.yml and MYMETA.json
Generating a dmake-style Makefile
Writing Makefile for Win32::API
Writing MYMETA.yml and MYMETA.json
BULKDD/Win32/Win32-API-0.84.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
---- Unsatisfied dependencies detected during ----
---- BULKDD/Win32/Win32-API-0.84.tar.gz ----
Encode::compat [build_requires]
Math::Int64 [build_requires]
Running install for module 'Encode::compat'
Checksum for C:\Perl64\cpan\sources\authors\id\A\AU\AUTRIJUS\Encode-compat-0.07.tar.gz ok
....
Encode-compat-0.07/META.yml
Encode-compat-0.07/Changes
Encode-compat-0.07/t/
Encode-compat-0.07/t/1-basic.t
Encode-compat-0.07/t/0-signature.t
Encode-compat-0.07/MANIFEST
Encode-compat-0.07/SIGNATURE
Encode-compat-0.07/Makefile.PL
Encode-compat-0.07/README
Configuring A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Encode::compat
Writing MYMETA.yml and MYMETA.json
AUTRIJUS/Encode-compat-0.07.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz
'dmake' is not recognized as an internal or external command,
operable program or batch file.
AUTRIJUS/Encode-compat-0.07.tar.gz
dmake -- NOT OK
Running install for module 'Math::Int64'
Checksum for C:\Perl64\cpan\sources\authors\id\S\SA\SALVA\Math-Int64-0.54.tar.gz ok
Math-Int64-0.54/
Math-Int64-0.54/COPYING
Math-Int64-0.54/Changes
.....
Configuring S/SA/SALVA/Math-Int64-0.54.tar.gz with Makefile.PL
Using IV backend
fileparse(): need a valid pathname at C:/Perl64/site/lib/ExtUtils/CBuilder/Base.pm line 50.
Checking for stdlib.h... Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
SALVA/Math-Int64-0.54.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
BULKDD/Win32/Win32-API-0.84.tar.gz
Has already been unwrapped into directory C:\Perl64\cpan\build\Win32-API-0.84-2
BULKDD/Win32/Win32-API-0.84.tar.gz
Has already been prepared
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
Warning: Prerequisite 'Encode::compat => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'AUTRIJUS/Encode-compat-0.07.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Math::Int64 => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'SALVA/Math-Int64-0.54.tar.gz' with 'writemakefile => NO 'C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 6400'. Continuing, but chances to succeed are limited.
'dmake' is not recognized as an internal or external command,
operable program or batch file.
BULKDD/Win32/Win32-API-0.84.tar.gz
dmake -- NOT OK
I have ActivePerl and was able to install (some) modules. I am using MinGW, and all I had to do is to copy it's make and rename the copy dmake.exe. That did it for me.
Alternatively, there is a way to tell CPAN which make to use: in cpan, use the command
cpan> o conf make <your make path and executable>
I got this answer from this post. I did encounter a different problem with other modules.
This worked fine for me with Strawberry Perl, Windows 10:
> perl --version
This is perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x64-multi-thread
> cpan Win32::API
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
CPAN: LWP::UserAgent loaded ok (v6.42)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.80)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Creating database file ... Done!
CPAN: Module::CoreList loaded ok (v5.20191120)
Win32::API is up to date (0.84).
Then created script file p.pl:
use strict;
use warnings;
use Win32::API;
my $GetCommandLine = Win32::API->new('kernel32', 'LPTSTR GetCommandLine()');
my $val = $GetCommandLine->Call();
print "The command line of this program is: $val\n";
And run the test:
> perl p.pl
The command line of this program is: perl p.pl
Related
Hel lo, I'm actually trying to install a perl package called HMMCleaner
I ran for that the command:
cpan Bio::MUST::Apps::HmmCleaner
but during the process I got several messages telling : Warning: prerequisite something 0 not found.
Here is a head of the output :
(/beegfs/data/me/myconda) me#pbil-deb:/beegfs/data/me/TOOLS/Bio-MUST-Apps-HmmCleaner-0.180750/bin$ cpan Test::Harness::Straps
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Test::Harness::Straps'
Fetching with LWP:
http://www.cpan.org/authors/id/M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz
Fetching with LWP:
http://www.cpan.org/authors/id/M/MS/MSCHWERN/CHECKSUMS
Checksum for /beegfs/home/me/.cpan/sources/authors/id/M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz ok
Configuring M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz with Build.PL
Test::Harness::Straps is provided for backwards compatibility only.
No further development is planned. No bugs will be fixed.
For customizable TAP parsing please use L<TAP::Parser> instead.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Test-Harness-Straps' version '0.30'
MSCHWERN/Test-Harness-Straps-0.30.tar.gz
/beegfs/data/me/myconda/bin/perl Build.PL --installdirs site -- OK
Running Build for M/MS/MSCHWERN/Test-Harness-Straps-0.30.tar.gz
Building Test-Harness-Straps
MSCHWERN/Test-Harness-Straps-0.30.tar.gz
./Build -- OK
Running Build test
t/00compile.t ...... 1/5 # Testing Test::Harness::Straps 0.30 under Perl 5.026002 and Test::More 1.302073
t/00compile.t ...... ok
t/callback.t ....... ok
t/point-parse.t .... ok
t/point.t .......... ok
t/strap-analyze.t .. ok
t/strap.t .......... ok
All tests successful.
Files=6, Tests=425, 9 wallclock secs ( 0.12 usr 0.04 sys + 0.98 cusr 0.67 csys = 1.81 CPU)
Result: PASS
MSCHWERN/Test-Harness-Straps-0.30.tar.gz
./Build test -- OK
Running Build install
Building Test-Harness-Straps
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Assert.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Straps.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Results.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Point.pm
Installing /beegfs/home/me/perl5/lib/perl5/Test/Harness/Iterator.pm
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Point.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Assert.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Results.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Iterator.3
Installing /beegfs/home/me/perl5/man/man3/Test::Harness::Straps.3
MSCHWERN/Test-Harness-Straps-0.30.tar.gz
./Build install -- OK
(/beegfs/data/me/myconda) me#pbil-deb:/beegfs/data/me/TOOLS/Bio-MUST-Apps-HmmCleaner-0.180750/bin$ cpan Bio::MUST::Apps::HmmCleaner
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Bio::MUST::Apps::HmmCleaner'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz ok
Configuring A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Bio::FastParsers::Hmmer 0 not found.
Warning: prerequisite Bio::MUST::Core 0.180230 not found.
Warning: prerequisite Bio::MUST::Core::Ali 0 not found.
Warning: prerequisite Bio::MUST::Core::Constants 0 not found.
Warning: prerequisite Bio::MUST::Core::GeneticCode::Factory 0 not found.
Warning: prerequisite Bio::MUST::Core::IdList 0 not found.
Warning: prerequisite Bio::MUST::Core::Seq 0 not found.
Warning: prerequisite Bio::MUST::Core::SeqMask 0 not found.
Warning: prerequisite Bio::MUST::Core::Utils 0 not found.
Warning: prerequisite Bio::MUST::Drivers 0.180270 not found.
Warning: prerequisite Bio::MUST::Drivers::Hmmer::Model::Temporary 0 not found.
Warning: prerequisite IPC::System::Simple 0 not found.
Warning: prerequisite Smart::Comments 0 not found.
Warning: prerequisite aliased 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Bio::MUST::Apps::HmmCleaner
Writing MYMETA.yml and MYMETA.json
ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz
/beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for A/AR/ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz
---- Unsatisfied dependencies detected during ----
---- ARNODF/Bio-MUST-Apps-HmmCleaner-0.180750.tar.gz ----
Bio::FastParsers::Hmmer [requires]
Bio::MUST::Core [requires]
Bio::MUST::Core::Ali [requires]
Bio::MUST::Core::Constants [requires]
Bio::MUST::Core::GeneticCode::Factory [requires]
Bio::MUST::Core::IdList [requires]
Bio::MUST::Core::Seq [requires]
Bio::MUST::Core::SeqMask [requires]
Bio::MUST::Core::Utils [requires]
Bio::MUST::Drivers [requires]
Bio::MUST::Drivers::Hmmer::Model::Temporary [requires]
IPC::System::Simple [requires]
Smart::Comments [requires]
aliased [requires]
Running install for module 'Bio::FastParsers::Hmmer'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz ok
Configuring D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Const::Fast 0 not found.
Warning: prerequisite Exporter::Easy 0 not found.
Warning: prerequisite Smart::Comments 0 not found.
Warning: prerequisite XML::Bare 0.53 not found.
Warning: prerequisite aliased 0 not found.
Generating a Unix-style Makefile
Writing Makefile for Bio::FastParsers
Writing MYMETA.yml and MYMETA.json
DBAURAIN/Bio-FastParsers-0.180470.tar.gz
/beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for D/DB/DBAURAIN/Bio-FastParsers-0.180470.tar.gz
---- Unsatisfied dependencies detected during ----
---- DBAURAIN/Bio-FastParsers-0.180470.tar.gz ----
Const::Fast [requires]
Exporter::Easy [requires]
Smart::Comments [requires]
XML::Bare [requires]
aliased [requires]
Running install for module 'Const::Fast'
So I wondered if there were a possibility to direclty allow cpan to install all the dependency needed?
I ask because I get the following error message when trying to execute a script using Bio::MUST::Apps::HMMCleaner.
Can't locate Smart/Comments.pm in #INC (you may need to install the Smart::Comments module) (#INC contains:
/beegfs/home/me/perl5/lib/perl5/x86_64-linux-thread-multi
/beegfs/home/me/perl5/lib/perl5
/beegfs/data/me/myconda/lib/site_perl/5.26.2/x86_64-linux-thread-multi
/beegfs/data/me/myconda/lib/site_perl/5.26.2
/beegfs/data/me/myconda/lib/5.26.2/x86_64-linux-thread-multi
/beegfs/data/me/myconda/lib/5.26.2
.
) at HmmCleaner.pl line 16. BEGIN failed--compilation aborted at HmmCleaner.pl line 16.
(Line breaks added for readability.)
Some debugging information:
$ set | grep ^PERL
PERL5LIB=/beegfs/home/me/perl5/lib/perl5
PERL_LOCAL_LIB_ROOT=/beegfs/home/me/perl5
PERL_MB_OPT='--install_base "/beegfs/home/me/perl5"'
PERL_MM_OPT=INSTALL_BASE=/beegfs/home/me/perl5
$ echo 'o conf' | cpan | grep -P '^\s*(make|mbuild)'
Loading internal null logger. Install Log::Log4perl for logging messages
make [/usr/bin/X11/make]
make_arg []
make_install_arg []
make_install_make_command [/usr/bin/X11/make]
makepl_arg [INSTALLDIRS=site]
mbuild_arg []
mbuild_install_arg []
mbuild_install_build_command [./Build]
mbuildpl_arg [--installdirs site]
$ which cpan
/beegfs/data/me/myconda/bin/cpan
$ head -n 1 "$( which cpan )"
#!/beegfs/data/me/myconda/bin/perl
$ which perl
/beegfs/data/me/myconda/bin/perl
$ cpan Smart::Comments
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/beegfs/home/me/.cpan/Metadata'
Database was generated on Fri, 14 Feb 2020 09:41:03 GMT
Running install for module 'Smart::Comments'
Checksum for /beegfs/home/me/.cpan/sources/authors/id/N/NE/NEILB/Smart-Comments-1.06.tar.gz ok
Configuring N/NE/NEILB/Smart-Comments-1.06.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Smart::Comments
Writing MYMETA.yml and MYMETA.json
NEILB/Smart-Comments-1.06.tar.gz
/beegfs/data/me/myconda/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for N/NE/NEILB/Smart-Comments-1.06.tar.gz
cp lib/Smart/Comments.pm blib/lib/Smart/Comments.pm
Manifying 1 pod document
NEILB/Smart-Comments-1.06.tar.gz
/usr/bin/X11/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/beegfs/data/me/myconda/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.load.t ................. 1/1 # Testing Smart::Comments 1.06
t/00.load.t ................. ok
t/assert.t .................. ok
t/brackets.t ................ ok
t/c_like_for_loop.t ......... ok
t/check.t ................... ok
t/confirm.t ................. ok
t/ensure.t .................. ok
t/ENV_0.t ................... ok
t/ENV_1.t ................... ok
t/ENV_str.t ................. ok
t/insist.t .................. ok
t/labelled_perlish_loop.t ... ok
t/message.t ................. ok
t/perlish_for.t ............. ok
t/perlish_for_percentage.t .. ok
t/pod-coverage.t ............ skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
t/pod.t ..................... skipped: Test::Pod 1.14 required for testing POD
t/require.t ................. ok
t/selective.t ............... ok
t/simple_perlish_for.t ...... ok
t/var.t ..................... ok
t/verify.t .................. ok
t/while.t ................... ok
t/while_num.t ............... ok
All tests successful.
Files=24, Tests=119, 19 wallclock secs ( 0.13 usr 0.08 sys + 2.93 cusr 1.45 csys = 4.59 CPU)
Result: PASS
NEILB/Smart-Comments-1.06.tar.gz
/usr/bin/X11/make test -- OK
Running make install
Manifying 1 pod document
Installing /beegfs/home/me/perl5/lib/perl5/Smart/Comments.pm
Installing /beegfs/home/me/perl5/man/man3/Smart::Comments.3
Appending installation info to /beegfs/home/me/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
NEILB/Smart-Comments-1.06.tar.gz
/usr/bin/X11/make install -- OK
$ perl -e'use Smart::Comments; print "ok\n"'
ok
Thank you for your help.
That's exactly what it does.
For example, Warning: prerequisite Bio::FastParsers::Hmmer 0 not found. means an unsatisfied dependency for version 0 or higher of the Bio::FastParsers::Hmmer module was encountered. The Bio::MUST::Apps::HmmCleaner module is provided by the Bio-FastParsers distribution, and you can clearly see Bio-FastParsers being installed.
Technically, this is configurable.
$ echo 'o conf init prerequisites_policy' | cpan
...
The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Choosing
'follow' also sets PERL_AUTOINSTALL and PERL_EXTUTILS_AUTOINSTALL for
"--defaultdeps" if not already set.
Please set your policy to one of the three values.
<prerequisites_policy>
Policy on building prerequisites (follow, ask or ignore)? [follow] follow
...
But the default value is follow, and your output shows if it's following dependencies.
I downloaded and installed strawberry-perl-5.30.0.1-64bit.msi from strawberryperl.com on my Windows 10 and tried to install Tcl module using cpan, but it fails for missing tclsh. What could be the problem?
C:\Strawberry>cpan Tcl
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Thu, 24 Oct 2019 12:40:15 GMT
Running install for module 'Tcl'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.086)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\V\VK\VKON\Tcl-1.27.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.32)
CPAN: YAML::XS loaded ok (v0.78)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190522)
Configuring V/VK/VKON/Tcl-1.27.tar.gz with Makefile.PL
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created VKON/Tcl-1.27.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.
C:\Strawberry>dir C:\Strawberry\cpan\build\Tcl-1.27-0
Volume in drive C is OSDisk
Volume Serial Number is BCC0-703E
Directory of C:\Strawberry\cpan\build\Tcl-1.27-0
25.10.2019 13.05 <DIR> .
25.10.2019 13.05 <DIR> ..
14.07.2018 11.00 5 207 Changes
22.08.2018 11.21 10 139 Makefile.PL
22.08.2018 11.45 1 723 MANIFEST
22.08.2018 11.45 1 140 META.json
22.08.2018 11.44 617 META.yml
14.07.2018 20.26 1 246 README
25.10.2019 13.05 <DIR> t
25.10.2019 13.05 <DIR> tcl-core
22.08.2018 11.43 43 540 Tcl.pm
22.08.2018 10.57 46 049 Tcl.xs
16.06.2018 15.18 439 tclcfg.tcl
16.06.2018 15.18 48 typemap
10 File(s) 110 148 bytes
4 Dir(s) 316 953 681 920 bytes free
You can build the missing dependency tclsh by downloading the source distribution from https://prdownloads.sourceforge.net/tcl/tcl8420-src.zip. To compile the source you need a C compiler. I tried the community edition of visual studio:
https://visualstudio.microsoft.com/vs/
Click download community edition..
Then choose what to install
Then click "Install"
After installation, go to menu "Tools->Command Line->Developer Command Prompt" and run
nmake -f makefile.vc
from the win sub folder of the extracted Tcl source distribution (on my computer it was located at C:\Users\Bruker\tcl\tcl8.4.20\win)
The above nmake command creates a new folder Release_VC13 with an executable file tclsh84.exe. Note that the name of the executable is not tclsh.exe.
Now add the folder of the executable to the system PATH environment variable:
C:\Users\Bruker\tcl\tcl8.4.20\win\Release_VC13, then close the command prompt and reopen again to refresh the path settings.
Try type tclsh84, and you should get a tcl shell command prompt with a leading % prompt. Then type exit to exit the tcl shell.
The next problem is to install the Tcl module using Strawberry perl. Trying first to run:
> cpan Tcl
[...]
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created VKON/Tcl-1.27.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.
The problem is that the executable is not called tclsh but tclsh84 (see above).
The next thing I did was to download the source distribution for the Tcl module:
> cpan -g Tcl
Then extracted the downloaded file Tcl-1.27.tar.gz and changed to the source distribution directory. By inspecting the Makefile.PL I found that the Makefile.PL took a command line argument --tclsh that gave the name of the tcl shell command. So I tried:
> perl Makefile.PL --tclsh=tclsh84
and this worked fine now. Then I tried to compile with gmake (which comes with the Strawberry Perl distribution):
> gmake
This also worked, but running gmake test failed, and also installing and testing the module:
> gmake install
> perl -MTcl -e1
failed dlopen(C:/Users/Bruker/tcl/tcl8.4.20/win/Release_VC13/tcl84.dll,...);
failed dlopen(./tcl84.dll,...);
failed dlopen(tcl84.dll,...);
trying dlopen(tcl89.dll,...)
trying dlopen(tcl88.dll,...)
trying dlopen(tcl87.dll,...)
trying dlopen(tcl86.dll,...)
trying dlopen(tcl85.dll,...)
trying dlopen(tcl84.dll,...)
trying dlopen(tcl83.dll,...)
trying dlopen(tcl82.dll,...)
trying dlopen(tcl81.dll,...)
trying dlopen(tcl80.dll,...)
failed all posible tcl vers 8.x from 9 down to 0 at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Failed to load Tcl dll! at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Unable to initialize Tcl at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Compilation failed in require.
BEGIN failed--compilation aborted.
I plan to come back to this problem later and investigate further.
The command is failing to execute while trying to install package through below command. Please note that I'm trying to configure Bugzilla version 5.0.4 on Windows 10 using Perl version 5.26.
cpan DBD::mysql
Complete Command Response:
PS D:\Workspace\bugzilla-5.0.4> cpan DBD::mysql
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Term::ANSIColor loaded ok (v4.06)
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Mon, 15 Oct 2018 00:29:03 GMT
Running install for module 'DBD::mysql'
CPAN: Digest::SHA loaded ok (v5.98)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for C:\Perl64\cpan\sources\authors\id\M\MI\MICHIELB\DBD-mysql-4.048.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.26)
DBD-mysql-4.048/
DBD-mysql-4.048/MANIFEST.SKIP
DBD-mysql-4.048/Makefile.PL.embedded
DBD-mysql-4.048/myld
DBD-mysql-4.048/mysql.xs
DBD-mysql-4.048/constants.h
DBD-mysql-4.048/dbdimp.c
DBD-mysql-4.048/Changes
DBD-mysql-4.048/MANIFEST
DBD-mysql-4.048/lib/
DBD-mysql-4.048/lib/Bundle/
DBD-mysql-4.048/lib/Bundle/DBD/
DBD-mysql-4.048/lib/Bundle/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/
DBD-mysql-4.048/lib/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/mysql/
DBD-mysql-4.048/lib/DBD/mysql/INSTALL.pod
DBD-mysql-4.048/lib/DBD/mysql/GetInfo.pm
DBD-mysql-4.048/README.md
DBD-mysql-4.048/Makefile.PL
DBD-mysql-4.048/LICENSE
DBD-mysql-4.048/META.json
DBD-mysql-4.048/socket.c
DBD-mysql-4.048/dbdimp.h
DBD-mysql-4.048/META.yml
DBD-mysql-4.048/t/
DBD-mysql-4.048/t/87async.t
DBD-mysql-4.048/t/41bindparam.t
DBD-mysql-4.048/t/rt50304-column_info_parentheses.t
DBD-mysql-4.048/t/40bit.t
DBD-mysql-4.048/t/16dbi-get_info.t
DBD-mysql-4.048/t/99_bug_server_prepare_blob_null.t
DBD-mysql-4.048/t/41blobs_prepare.t
DBD-mysql-4.048/t/56connattr.t
DBD-mysql-4.048/t/65segfault.t
DBD-mysql-4.048/t/92ssl_riddle_vulnerability.t
DBD-mysql-4.048/t/40bindparam.t
DBD-mysql-4.048/t/35prepare.t
DBD-mysql-4.048/t/70takeimp.t
DBD-mysql-4.048/t/rt75353-innodb-lock-timeout.t
DBD-mysql-4.048/t/rt61849-bind-param-buffer-overflow.t
DBD-mysql-4.048/t/version.t
DBD-mysql-4.048/t/76multi_statement.t
DBD-mysql-4.048/t/40server_prepare_crash.t
DBD-mysql-4.048/t/40bindparam2.t
DBD-mysql-4.048/t/mysql.dbtest
DBD-mysql-4.048/t/53comment.t
DBD-mysql-4.048/t/29warnings.t
DBD-mysql-4.048/t/92ssl_optional.t
DBD-mysql-4.048/t/35limit.t
DBD-mysql-4.048/t/65types.t
DBD-mysql-4.048/t/40types.t
DBD-mysql-4.048/t/rt25389-bin-case.t
DBD-mysql-4.048/t/rt83494-quotes-comments.t
DBD-mysql-4.048/t/30insertfetch.t
DBD-mysql-4.048/t/05dbcreate.t
DBD-mysql-4.048/t/40blobs.t
DBD-mysql-4.048/t/40nulls_prepare.t
DBD-mysql-4.048/t/00base.t
DBD-mysql-4.048/t/80procs.t
DBD-mysql-4.048/t/55utf8mb4.t
DBD-mysql-4.048/t/rt118977-zerofill.t
DBD-mysql-4.048/t/89async-method-check.t
DBD-mysql-4.048/t/lib.pl
DBD-mysql-4.048/t/40nulls.t
DBD-mysql-4.048/t/rt91715.t
DBD-mysql-4.048/t/88async-multi-stmts.t
DBD-mysql-4.048/t/rt110983-valid-mysqlfd.t
DBD-mysql-4.048/t/86_bug_36972.t
DBD-mysql-4.048/t/42bindparam.t
DBD-mysql-4.048/t/32insert_error.t
DBD-mysql-4.048/t/40keyinfo.t
DBD-mysql-4.048/t/51bind_type_guessing.t
DBD-mysql-4.048/t/43count_params.t
DBD-mysql-4.048/t/50chopblanks.t
DBD-mysql-4.048/t/55utf8.t
DBD-mysql-4.048/t/40server_prepare_error.t
DBD-mysql-4.048/t/40server_prepare.t
DBD-mysql-4.048/t/40listfields.t
DBD-mysql-4.048/t/91errcheck.t
DBD-mysql-4.048/t/25lockunlock.t
DBD-mysql-4.048/t/15reconnect.t
DBD-mysql-4.048/t/52comment.t
DBD-mysql-4.048/t/75supported_sql.t
DBD-mysql-4.048/t/rt88006-bit-prepare.t
DBD-mysql-4.048/t/10connect.t
DBD-mysql-4.048/t/92ssl_backronym_vulnerability.t
DBD-mysql-4.048/t/manifest.t
DBD-mysql-4.048/t/60leaks.t
DBD-mysql-4.048/t/71impdata.t
DBD-mysql-4.048/t/rt86153-reconnect-fail-memory.t
DBD-mysql-4.048/t/40numrows.t
DBD-mysql-4.048/t/40catalog.t
DBD-mysql-4.048/t/rt85919-fetch-lost-connection.t
DBD-mysql-4.048/t/41int_min_max.t
DBD-mysql-4.048/t/pod.t
DBD-mysql-4.048/t/81procs.t
DBD-mysql-4.048/t/85init_command.t
DBD-mysql-4.048/t/31insertid.t
DBD-mysql-4.048/t/20createdrop.t
DBD-mysql-4.048/t/50commit.t
CPAN: YAML::XS loaded ok (v0.66)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20171120)
Configuring M/MI/MICHIELB/DBD-mysql-4.048.tar.gz with Makefile.PL
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to ''#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
MICHIELB/DBD-mysql-4.048.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
The error message is quite descriptive:
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
You don't have the MySQL client libraries installed, or at least the module installation could not find where you have the MySQL client libraries installed.
Both, Strawberry Perl and ActiveState Perl come with DBD::mysql included resp. ready to install. Are you sure you need to manually install them?
Alternatively, follow the instructions in the INSTALL file of the distribution. You can read it online at https://metacpan.org/pod/distribution/DBD-mysql/lib/DBD/mysql/INSTALL.pod
While attempting to install Qwizard via cpan I get errors resembling https://rt.cpan.org/Public/Bug/Display.html?id=121401
cpan[1]> install QWizard
Reading '/Users/haroldbennett/.cpan/Metadata'
Database was generated on Mon, 27 Aug 2018 02:17:02 GMT
Running install for module 'QWizard'
Checksum for
/Users/<username>/.cpan/sources/authors/id/H/HA/HARDAKER/QWizard-3.15.tar.gz ok
Scanning cache /Users/<username>/.cpan/build for sizes ....... DONE
Configuring H/HA/HARDAKER/QWizard-3.15.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
ERROR from evaluation of
/Users/<username>/.cpan/build/QWizard-3.15-1/Generator_base/Makefile.PL:
panic: attempt to copy freed scalar 7fabf00040b0 to 7fabf02a7e58 at
/opt/local/lib/perl5/5.26/Carp.pm line 229.
Warning: No success on command[/opt/local/bin/perl5.26 Makefile.PL]
HARDAKER/QWizard-3.15.tar.gz
/opt/local/bin/perl5.26 Makefile.PL -- NOT OK
Failed during this command:
HARDAKER/QWizard-3.15.tar.gz : writemakefile NO
'/opt/local/bin/perl5.26 Makefile.PL' returned status 512
I have attempted to use the force option (something I am not a fan of), however the module casts the appearance of still not being installed when I attempt to use it in code. 'Can't locate QWizard.pm in #INC', leading me to believe that the force option was a wasted effort.
My question is, in short, how can I get this module to install?
Mac OS X version 10.13.6 (17G65)
Perl version 5.26.2 built for darwin-thread-multi-2level
QWizard-3.15
C:\MyPerl>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
Reading '\c\Users\Locals\.cpan\Metadata'
Database was generated on Wed, 25 Jul 2018 22:55:14 GMT
Running install for module 'Parallel::ForkManager'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz ok
The system cannot find the path specified.
Uncompressed \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz successfully
Using Tar:/usr/bin/tar xf "Parallel-ForkManager-1.20.tar":
The system cannot find the path specified.
Couldn't untar Parallel-ForkManager-1.20.tar: child exited with value 1
CPAN: YAML loaded ok (v1.26)
YANICK/Parallel-ForkManager-1.20.tar.gz
Had problems unarchiving. Please build manually
What am I doing wrong? I have uninstalled and reinstalled Strawberry Perl multiple times, used the MSI installer, and now im trying to zip file. Why the hell is it creating a folder on my C drive called "C"? "C:\c\Users\Locals.cpan\"
I'm sad to be coming with an answer so late, but I ran into the exact same problem and, after some tinkering, have figured it out.
Notice something familiar about that path syntax? It's the one used by MSYS/MinGW/Git Bash. What happened is that, on MinGW, I replaced my home folder with a symlink to my Windows home folder in /c/Users/<username>/.cpan. Hence, when I launched CPAN in MinGW, it created my configuration in /c/Users/<username>/.cpan, and filled it with with paths in this format.
Now, from Strawberry Perl's point of view, this means I have an existing CPAN configuration in C:\Users\<username>\.cpan. Although this is not where CPAN for Strawberry Perl writes its configuration (at least not by default), if a CPAN configuration exists in this path, it will read and write to it instead of the default location. Of course, none of the paths in this configuration makes sense in a Windows context.
Therefore:
If you use MinGW, Git Bash, Cygwin or any other UNIX-like environment for
Windows and configured it to use your Windows home folder as your UNIX home folder, undo this configuration.
Rename, move, or if you're sure you don't need it anymore, delete
C:\Users\<username>\.cpan. You can probably move this directory from your Windows home folder to your UNIX home folder to as to preserve the configuration and modules in your UNIX-like environment. I would advise testing it out.
Run CPAN in Strawberry Perl again. It will auto-configure itself properly.
Here is sample output with the latest version of Strawberry Perl x64 which appears to have been successful:
C:\Strawberry\perl\bin>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.211)
CPAN: LWP::UserAgent loaded ok (v6.34)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.70)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Creating database file ...
Done!
Running install for module 'Parallel::ForkManager'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/Parallel-ForkManager-2.
tar.gz
CPAN: Digest::SHA loaded ok (v6.02)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkMan
r-2.02.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20180622)
Configuring Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Parallel::ForkManager
Writing MYMETA.yml and MYMETA.json
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz
cp lib/Parallel/ForkManager/Child.pm blib\lib\Parallel\ForkManager\Child.pm
cp lib/Parallel/ForkManager.pm blib\lib\Parallel\ForkManager.pm
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness"
e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')"
*.t
t/00-compile.t ............ ok
t/00-load.t ............... 1/4 # time: 1 seconds
t/00-load.t ............... 2/4 # time: 21 seconds
# time: 0 seconds
# time: 2 seconds
t/00-load.t ............... ok
t/00-report-prereqs.t ..... #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# ------------------- ---- --------
# ExtUtils::MakeMaker any 7.34
# File::Spec any 3.74
# IO::Handle any 1.39
# IPC::Open3 any 1.20
# Test::More 0.94 1.302136
# Test::Warn any 0.35
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
# Module Want Have
# ---------- ---- --------
# Carp any 1.50
# File::Path any 2.15
# File::Spec any 3.74
# File::Temp any 0.2304
# Moo any 2.003004
# Moo::Role any 2.003004
# POSIX any 1.84
# Storable any 3.11
# strict any 1.11
# warnings any 1.42
#
t/00-report-prereqs.t ..... ok
t/01-utf8-all.t ........... skipped: This is a bug in perl itself on Windows
t/02-callback.t ........... # This test can take 10-20 seconds, please wait.
rted at Wed Oct 17 12:28:28 2018
t/02-callback.t ........... ok
t/03-callback-data.t ...... # This test can take 2-6 seconds, please wait. St
ed at Wed Oct 17 12:28:45 2018
t/03-callback-data.t ...... ok
t/basic-methods.t ......... ok
t/changing-pids.t ......... ok
t/start_child.t ........... ok
t/waitpid-conflict.t ...... # code outside of P::FM stole -3648
child process '-3648' disappeared. A call to `waitpid` outside of Parallel::F
Manager might have reaped it.
t/waitpid-conflict.t ...... ok
t/waitpid-waitonechild.t .. # code outside of P::FM stole -5312
t/waitpid-waitonechild.t .. ok
t/waitpid_blocking.t ...... ok
All tests successful.
Test Summary Report
-------------------
t/waitpid-conflict.t (Wstat: 0 Tests: 2 Failed: 0)
TODO passed: 1-2
t/waitpid-waitonechild.t (Wstat: 0 Tests: 3 Failed: 0)
TODO passed: 2-3
Files=12, Tests=28, 70 wallclock secs ( 0.09 usr + 0.00 sys = 0.09 CPU)
Result: PASS
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- OK
Running make install
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager.pm
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager\Child.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK
I think the problem may be you're just not running cpan from your \perl\bin directory.
I installed via the .msi installer to a custom location, but for some reason the path didn't get reconfigured internally. Cpan continued downloading to C:\straberry, even if there was no Perl installation there.
Luckily, this is what the relocation.pl.bat is for. Downloading the .zip distribution, extracting the batch-file to my Perl installation and running it solved the Problem.
Read the README file that comes with the Perl installation for more information.