Win32-SerialPort installation error - perl

When tried to install Win32-SerialPort in windows command prompt getting the following error, using activeperl 5.24.1 build(2402)64 bit, could anyone tell were it went wrong and the ways to insatll win32::SerialPort, I have both strawberry and active perl installed
cmd> perl -MCPAN -e shell
cpan> install Win32::SerialPort
Database was generated on Thu, 09 Mar 2017 12:01:53 GMT
Running install for module 'Win32::SerialPort'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/CHECKSUMS
Checksum for C:\STRAWB~1\cpan\sources\authors\id\B\BB\BBIRTH\Win32-SerialPort-0.22.tar.gz ok
Scanning cache C:\STRAWB~1\cpan\build for sizes
............................................................................DONE
Configuring B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz with Makefile.PL
Can't spawn "cmd.exe": No such file or directory at Makefile.PL line 35.
Device COM1 does not appear to exist. Testing impossible
No 'Makefile' created BBIRTH/Win32-SerialPort-0.22.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Win32::SerialPort'.
Failed during this command:
BBIRTH/Win32-SerialPort-0.22.tar.gz : writemakefile NO -- No 'Makefile' created
EDIT:
After suggestion from Jens I have set the path to set PATH=%PATH%;C:\windows\system32
Thanks for the suggestion "cmd.exe" error vanished but
shows up with the following error now, any solutions?
Test Summary Report
-------------------
t/test1.t (Wstat: 256 Tests: 309 Failed: 1)
Failed test: 157
Non-zero exit status: 1
t/test2.t (Wstat: 256 Tests: 146 Failed: 1)
Failed test: 27
Non-zero exit status: 1
t/test3.t (Wstat: 256 Tests: 264 Failed: 1)
Failed test: 149
Non-zero exit status: 1
t/test4.t (Wstat: 256 Tests: 518 Failed: 1)
Failed test: 366
Non-zero exit status: 1
t/test7.t (Wstat: 512 Tests: 90 Failed: 2)
Failed tests: 21-22
Non-zero exit status: 2
Files=7, Tests=1808, 6 wallclock secs ( 0.27 usr + 0.05 sys = 0.31 CPU)
Result: FAIL
Failed 5/7 test programs. 6/1808 subtests failed.
dmake.exe: Error code 130, while making 'test_dynamic'
BBIRTH/Win32-SerialPort-0.22.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports BBIRTH/Win32-SerialPort-0.22.tar.gz
Also I am using both Activeperl and strwaberry perl will that be a problem?

Strawberry Perl Version > 5.32:
This problem should be resolved on Strawberry Perl 5.32, Win32::SerialPort module will be installed by default.
Strawberry Perl Version < 5.32:
Here is a solution if you need to install Win32::SerialPort module but the Strawberry Perl < 5.32:
Download the module tar ball:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
unzip and you will get this folder:
Modified the Makefile.PL to comment out all "COM1" section:
using cmd:
cd Win32-SerialPort-0.22
perl Makefile.PL
dmake
dmake install
Enjoy it!!

Related

Error installing module File::NFSLock with perl from conda

I installed perl from conda and fixed installation to be able to install modules via cpanm following instructions from: Unable to install perl modules via cpanm in conda environments
Unfortunately, I wasn't still able to properly install File::NFSLock module both with cipanm and manually (perl Makefile.PL) unless I use --force --notest. The problem is that tests fail with:
# Failed test at t/300_bl_sh.t line 115.
Shared locks not running simultaneously at t/300_bl_sh.t line 116, <$rd3> line 18.
# Looks like your test exited with 4 just after 27.
t/300_bl_sh.t ..... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 47/73 subtests
t/400_kill.t ...... ok
t/410_die.t ....... ok
t/420_crash.t ..... ok
t/430_taint.t ..... ok
Test Summary Report
-------------------
t/300_bl_sh.t (Wstat: 1024 Tests: 27 Failed: 1)
Failed test: 27
Non-zero exit status: 4
Parse errors: Bad plan. You planned 73 tests but ran 27.
I'm working on an nfs4 filesystem. Can there be any possible issue in using this module in this filesystem even if some tests failed?

How do I 'use diagnostics' for Perl on Cygwin?

I want to install DBD::AnyData which requires SQL::Statement which requires Math::Base::Convert. However, it's giving me this error
$ cpan install Math::Base::Convert
...
t/overload.t .............. couldn't find diagnostic data in /usr/lib/perl5/5.22/pods/perldiag.pod /home/Chloe/.cpan/build/Math-Base-Convert-0.11-EySfLp/blib/lib /home/Chloe/.cpan/build/Math-Base-Convert-0.11-EySfLp/blib/arch /usr/lib/perl5/site_perl/5.22/i686-cygwin-threads-64int /usr/lib/perl5/site_perl/5.22 /usr/lib/perl5/vendor_perl/5.22/i686-cygwin-threads-64int /usr/lib/perl5/vendor_perl/5.22 /usr/lib/perl5/5.22/i686-cygwin-threads-64int /usr/lib/perl5/5.22 . t/overload.t at /usr/lib/perl5/5.22/diagnostics.pm line 259, <POD_DIAG> line 704.
Compilation failed in require at t/overload.t line 1.
BEGIN failed--compilation aborted at t/overload.t line 1.
t/overload.t .............. Dubious, test returned 2 (wstat 512, 0x200)
Test Summary Report
-------------------
t/overload.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=20, Tests=5327, 2 wallclock secs ( 0.28 usr 0.01 sys + 0.76 cusr 0.42 csys = 1.48 CPU)
Result: FAIL
Failed 1/20 test programs. 0/5327 subtests failed.
Makefile:859: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
MIKER/Math-Base-Convert-0.11.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIKER/Math-Base-Convert-0.11.tar.gz
I already ran cpan -u.
CPAN version 1.61, Perl 5.22.0
The diagnostics module gets its explanations for messages from the perldoc file perldiag.pod. Both of these are core parts of perl, but some packaging systems choose to distribute documentation in a separate package that might not be installed even when perl is. In the case of Cygwin this package is perl_pods. Installing that package should make the diagnostics module work properly.

Undefined subroutine Win32::MSgBox when trying to install Win32::Watir on Strawberry Perl

I am trying to install Win32::Watir on to a 64 bit machine via strawberry perl. I'm getting an error. This is a windows automation tool - so it should have be to be able to be installed on a windows machine via strawberry perl.
reports SHIMI/Win32-Watir-0.06-withoutworldwritebles.tar.gz
cpan> install Win32::Watir
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Database was generated on Wed, 29 Jul 2015 22:17:00 GMT
Updating database file ...
Done!
Running install for module 'Win32::Watir'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/S/SH/SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/S/SH/SHIMI/CHECKSUMS
Checksum for C:\UBS\DEV\STRAWB~1\cpan\sources\authors\id\S\SH\SHIMI\Win32-Watir-0.06-withoutworldwriteables.tar.gz ok
Scanning cache C:\UBS\DEV\STRAWB~1\cpan\build for sizes
............................................................................DONE
Configuring S/SH/SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Win32::Watir
Writing MYMETA.yml and MYMETA.json
SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
C:\UBS\DEV\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for S/SH/SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
cp lib/Win32/Watir/Table.pm blib\lib\Win32\Watir\Table.pm
cp lib/Win32/Watir/AutoItX3.dll blib\lib\Win32\Watir\AutoItX3.dll
cp lib/Win32/Watir.pm blib\lib\Win32\Watir.pm
cp lib/Win32/Watir/AutoItX.chm blib\lib\Win32\Watir\AutoItX.chm
cp lib/Win32/Watir/AutoItX3_x64.dll blib\lib\Win32\Watir\AutoItX3_x64.dll
cp lib/Win32/Watir/Element.pm blib\lib\Win32\Watir\Element.pm
SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
C:\UBS\DEV\STRAWB~1\c\bin\dmake.exe -- OK
Running make test
"C:\UBS\DEV\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest: :Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.tt/01.IE_default.t .. 1/? DEBUG:_check_os_name(): Win7
Undefined subroutine &Win32::MSgBox called at
C:\UBS\DEV\STRAWB~\cpan\build\Win32-Watir-0.062RxegT\blib\lib/Win32/Watir.pm line 1370.
# Looks like your test exited with 255 just after 1.
t/01.IE_default.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
All 1 subtests passed
Test Summary Report
-------------------
t/01.IE_default.t (Wstat: 65280 Tests: 1 Failed: 0)
Non-zero exit status: 255
Files=1, Tests=1, 2 wallclock secs ( 0.02 usr + 0.11 sys = 0.13 CPU)
Result: FAIL
Failed 1/1 test programs. 0/1 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
C:\UBS\DEV\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz
Stopping: 'install' failed for 'Win32::Watir'.
Failed during this command:
SHIMI/Win32-Watir-0.06-withoutworldwriteables.tar.gz: make_test NO
cpan> sudo install Win32::Watir
Unknown shell command 'sudo'. Type ? for help.
cpan>
The module calls Win32::MSgBox when it should have called Win32::MsgBox.

Error while installing WWW::Selenium through CPAN

I have installed ActivePerl PPM and Strawberry Perl(Padre). Tried installing WWW::Selenium CPAN from command prompt through
perl -MCPAN -e shell
install WWW::Selenium
It throws the following error
Test Summary Report
-------------------
t/test_default_server.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 7 tests but ran 1.
Files=12, Tests=344, 31 wallclock secs ( 0.14 usr + 0.06 sys = 0.20 CPU)
Result: FAIL
Failed 1/12 test programs. 1/344 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
MATTP/Test-WWW-Selenium-1.36.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MATTP/Test-WWW-Selenium-1.36.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
MATTP/Test-WWW-Selenium-1.36.tar.gz : make_test NO
Also I have installed Selenium stand alone server (a jar file). But the following code doesn't work in command prompt.
java -jar <path of the selenium server>
P.S: I don't know Perl. I'm a beginner.

Why does CPAN install fail when installing Scrappy?

I understand that it is missing dependencies but I thought that CPAN would install all the dependant modules automatically. Here is the error:
Test Summary Report
-------------------
t/00_load_scrappy.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 12 tests but ran 1.
t/00_test_function_back.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_content.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_control.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_cookies.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_crawl.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_debug.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_domain.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_download.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/01_load_scrappy.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 8 tests but ran 1.
Files=39, Tests=2, 1 wallclock secs ( 0.08 usr 0.08 sys + 0.85 cusr 0.15 csys = 1.16 CPU)
Result: FAIL
Failed 10/39 test programs. 2/2 subtests failed.
make: *** [test_dynamic] Error 255
AWNCORP/Scrappy-0.94112090.tar.gz
7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed
make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AWNCORP/Scrappy-0.94112090.tar.gz
Running make install
make test had returned bad status, won't install without force
Could not read metadata file. Falling back to other methods to determine prerequisites
Failed during this command:
ROBIN/PadWalker-1.96.tar.gz : make NO
ABW/Template-Toolkit-2.24.tar.gz : make NO
BOBTFISH/String-TT-0.03.tar.gz : make_test NO 2 dependencies missing (PadWalker,Template); additionally test harness failed
GAAS/HTML-Parser-3.69.tar.gz : make NO
CJM/HTML-Tree-5.03.tar.gz : make_test NO 2 dependencies missing (HTML::Parser,HTML::Entities); additionally test harness failed
MIROD/HTML-TreeBuilder-XPath-0.14.tar.gz : make_test NO one dependency not OK (HTML::TreeBuilder); additionally test harness failed
GAAS/libwww-perl-6.04.tar.gz : make_test NO 2 dependencies missing (HTML::HeadParser,HTML::Entities); additionally test harness failed
MIYAGAWA/Web-Scraper-0.36.tar.gz : make_test NO 4 dependencies missing (HTML::TreeBuilder::XPath,HTML::Entities,HTML::TreeBuilder,LWP); additionally test harness failed
DOY/Package-Stash-XS-0.25.tar.gz : make NO
DROLSKY/Class-Load-XS-0.04.tar.gz : make NO
DOY/Moose-2.0604.tar.gz : make NO
GAAS/HTML-Form-6.03.tar.gz : make_test NO one dependency not OK (HTML::TokeParser); additionally test harness failed
JESSE/WWW-Mechanize-1.72.tar.gz : make_test NO 7 dependencies missing (HTML::Form,LWP::UserAgent,HTML::TokeParser,HTML::Parser,HTML::HeadParser,HTML::TreeBuilder,LWP); additionally test harness failed
TODDR/YAML-Syck-1.21.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512
AWNCORP/Scrappy-0.94112090.tar.gz : make_test NO 7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed
Then I tried to install one of the dependant modules alone:
cpan[2]> install PadWalker
Running install for module 'PadWalker'
Running make for R/RO/ROBIN/PadWalker-1.96.tar.gz
Has already been unwrapped into directory /root/.cpan/build/PadWalker-1.96-n6C9km
Could not make: Unknown error
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Could someone point me in the right direction? I am root and it is Ubuntu 12.04.1 up to date as of now.
It is possible to install Scrappy with CPAN. In my case only Moose had to be forced (Failed 1/382 test programs. 0/18150 subtests failed).
cpan[6]> force install Moose
[...]
cpan[7]> install Scrappy
Running install for module 'Scrappy'
Running make for A/AW/AWNCORP/Scrappy-0.94112090.tar.gz
[...]
Installing /home/david/perl5/bin/scrappy
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
AWNCORP/Scrappy-0.94112090.tar.gz
/usr/bin/make install -- OK
You should try to install PadWalker manually to find out what is the reason behind Could not make: Unknown error.
In my case PadWalker could be installed from ~/.cpan/build/PadWalker-1.96-XW0Mq2 as follow:
perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for PadWalker
Writing MYMETA.yml
make
cp PadWalker.pm blib/lib/PadWalker.pm
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap PadWalker.xs > PadWalker.xsc && mv PadWalker.xsc PadWalker.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.96\" -DXS_VERSION=\"1.96\" -fPIC "-I/usr/lib/perl/5.14/CORE" PadWalker.c
[...]
chmod 755 blib/arch/auto/PadWalker/PadWalker.so
cp PadWalker.bs blib/arch/auto/PadWalker/PadWalker.bs
chmod 644 blib/arch/auto/PadWalker/PadWalker.bs
Manifying blib/man3/PadWalker.3pm
make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/closure.t ... ok
t/dm.t ........ ok
[...]
Result: PASS
make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/david/perl5/man/man3/PadWalker.3pm
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod