Perl 5.22 CLI 2.03 - activeperl

I am facing problem for accessing my serial port device from Control::CLI( ver 2.03) on Perl 5.22. Issue is connection gets established but I can't write on the port.
The same code was working well with Control::CLI( ver 1.03) on Perl 5.14
Please help.
Thanks.

Unfortunately there isn't more of information to go on but the problem sounds like it might be one of two areas:
1) there might be issues with the newer version of Control::CLI that you are using. This would be something to ask the maintainer of Control::CLI about.
Chances are you might need to modify your existing code.
2) the OS that you are running 5.22 on. What's not clear is if you ran 5.14 on an older version of Windows (ie, Win 7, Win XP) and are trying to run your script with 5.22 on a newer version (ie, Win 10).
Sorry that I can't give an exact answer but these would be areas I would advise looking into to begin troubleshooting.

Related

Bugzilla - Host upgraded perl - browse/search is the only function failing any way to update just that?

The bugzilla install is very old now (4.0.1) and although it would be best, upgrading is a real pain as I suck at Perl related stuff. It has worked with no issue for many years and stopped in December. On checking the serverhost changed to Perl 5.16.3. Originally it was 5.8.8 and even after 15.10 it worked fine.
The issue I get is very similar to this issue - Bugzilla: bugs are not showing up (show up in DB and everything seems to be fine)
But it is not a template or character problem (the site ran fine with no changes) that I can see and happened the same week the host updated Perl , so I am 99% sure it is Perl related. I am assuming the issue is with either buglist.cgi itself or search pm. Any time I browse or search the Product, component, resolution etc shows "ARRAY and a number. e.g. Product: ARRAY(0x30090f0) Component: ARRAY(0x3993420) Resolution: ARRAY(0x3993378).
The bugzilla is only accessible internally (but hosted by a third-party, so no admin) it only allows user accounts access to search and browse so I cannot demo the issue. Is there a known depreciated Perl command?
Would love to fix but may have to install a new version and import DB, last time it took a few weeks to get running hence looking to avoid that for now.
I had the exact same issue. After digging a little figured this is an issue with the Perl version. In Search.pm, $params->param("field$chart-$row-$col", shift(#$ref)); this line is causing the issue. With 5.8.8 its returning Array object, whereas with 5.16.3 it is returning SCALAR.
My option is to install 5.8.8 and re-install the compatible modules. Or, is there any quick workaround for this?
Update:
Going through the docs, figured that 4.0.10 version of bugzilla has added support for Perl 5.16. Copied the CGI.pm from that and tested.. bugzilla is working. This is a bad hack. But, at least now I know that upgrading to 4.0.10 is another viable solution instead of upgrading Perl.

Does twisted.internet.serialport 17.1.0 work on Windows?

I am trying to use twisted.internet.serial on Windows and it always fails to create with the message :
"File "C:\Program Files\Python36\lib\site-packages\twisted\internet_win32seria
lport.py", line 65, in _finishPortSetup
flags, comstat = win32file.ClearCommError(self._serial.hComPort)
AttributeError: 'Serial' object has no attribute 'hComPort'"
I have tried on Windows 10 x64 as well as Windows 7 x64, running as administrator, with Python 3.6.1 and Python 2.7.13.
I have installed twisted 17.1.0, PySerial 3.3, pywin32 221.
It appears to me that PySerial has been revised at some point to privatize the com port handle as self._port_handle rather than self.hComPort which twisted is expecting.
Is this a known issue? Is there a work-around? Are twisted and/or PySerial being improved w/r/t this issue?
Thanks, Dick
To answer my own question, I have discovered that this issue has been known for over a year. See https://twistedmatrix.com/trac/ticket/8159 .
There is a work-around: it is patch #2 which can be found at the link above.
No word yet as to whether the twisted folks has put any priority on releasing this patch into the mainline.
While Twisted is not updated to use newer PySerial versions, I have resolved this by downgrading PySerial to 'pyserial<3.0' (which installs pyserial==2.7).
pip install pyserial<3.0

Installing a driver (.inf) file from command line

I am working in Windows 8.1.
I need to install a driver file (.inf file) from command line. Which command do I need to use?
I know I have many other method for installing a .inf file, but I must install this from command line.
Please help me
Thanks in advance...
Granger's comment works in Windows 7 too. According to MS, PnPUtil (PnPUtil.exe) is included in every version of Windows, starting with Windows Vista.
It is useful for device drivers that do not have default install (right-click "Install" does not work for them).
pnputil -i -a <driverinf>
The default way for device drivers is:
pnputil -i -a <driverinf>
Legacy Drivers canĀ“t be installed with pnputil and have to use LaunchINFSectionEx-Call
I tested the following and it works with several drivers from Windows 2000 up to Windows 10, 2012R2, 2016, 2019.
rundll32.exe advpack.dll,LaunchINFSectionEx ykmd.inf,Yubico64_Install.NT,,4,N
Pay attention to use the correct section
The correct section of the inf-File must be used, when there is no [DefaultInstall]-Section. This lacks in most answers. Look it up in your drivers inf-File and use the correct section (in my example "Yubico64_Install.NT"). Using the wrong section wont prompt an error. Im my example I use Quiet mode, no UI (4) and Never reboot (N) to install the driver automated via GPO. All options are documented in detail here:
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768006(v%3Dvs.85)
There are many variants ... and many complications with newer versions of Windows.
But for starters, try something like this:
rundll32.exe advpack.dll,LaunchINFSectionEx myinf.inf,,c:\temp\mydata.cab,36
http://www.msfn.org/board/topic/104891-how-can-i-install-a-inf-file-from-the-command-line/
http://msdn.microsoft.com/en-us/library/aa768006%28v=vs.85%29.aspx
Programmatic driver install via .inf causing reboot
Note: beware older links that suggest "setupapi" instead of "advpack". You definitely want advpack.dll.

rvm installation fails on powerpc ibook g4

I am trying to install ruby version manager on a g4 ibook running 10.4 but I receive two error messages right off the bat when I try to run the first command:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
bash: line 6: set: errtrace: invalid option name
bash: line 13: conditional binary operator expected
I am new to ruby, rails, and fairly inexperienced with the command line too. I've done a bit of searching and have seen other people having problems installing a specific version of ruby on a powerpc using rvm, but no other examples of someone having a problem installing rvm first of all.
Does this seem like a powerpc issue? Or is there something simple with the command line that I am missing here?
I have also searched on these specific error messages but haven't found any solutions yet. Oh and I should also add that I have xcode installed and I also installed macports because I thought that might help...but it hasn't.
The most probable cause of the error you're getting is your bash version is far too old to be used with any relatively new RVM version. Also, the likelihood of you being able to easily compile rubies on a G4 now is very low. You'll likely end up needing to compile many tools and libraries from source which you'll have to do from the command-line. Finding the right combination of library versions that both support your arch and are still available for download might not be as easy as it sounds. Much of the ruby compilation on OS X depends on libraries that come with Xcode. So, you might hit a wall there too with rubies now requiring newer libraries that can be provided with a version of Xcode that can be installed on your system.
You can try upgrading your bash version and/or use a much older version of RVM, although, I don't remember RVM ever working on 10.4. Or, you can try to compile everything from source, including Ruby. You'll might be able to get Ruby 1.8.6, maybe 1.8.7 working but anything higher is very unlikely.
Good luck =/

Perl script seg faults in Cmenu

I am getting a core dump when I use the Cmenu module on Solaris 8. The script works fine on Solaris 10. Could somebody please suggest a possible workaround for this? Using dbx shows the following:
terminated by signal SEGV (no mapping at the fault address)
Current function is Perl_safesysmalloc
92 Ptr = (Malloc_t)PerlMem_malloc(size?size:1)
Perl_safesysmalloc(size = 4U), line 92 in "util.c"
I built version 5.10 of Perl using gcc on this machine. Please let me know if you have need any other information.
That's probably a bug on the module. Send a bug report to the author!
... though, the last release is from 2001, probably not being maintained anymore :-(
Cmenu is a pure perl module that uses Curses.pm which is based on a C library. So mosts probable place for core dump is Curses.pm. Try upgrading it to latest version. Also try upgrading curses library.
If this does not help, try minimizing your program to get a minimal program that would still result a core dump. Report it to Cmenu bug tracker.